Derating two video streams

Hi,

I’m trying to capture two the same scene using a camera at two different FPSs, this is my pipeline

gst-launch-1.0 nvarguscamerasrc num-buffers=150 ! tee name=t t. ! queue ! nvtee ! nvvidconv ! ‘video/x-raw(memory:NVMM),width=400,height=300,framerate=60/1’ ! nvv4l2h265enc ! h265parse ! matroskamux ! filesink location=a.mp4 t. ! queue ! nvtee ! nvvidconv ! ‘video/x-raw(memory:NVMM),width=320,height=240,framerate=15/1’ ! nvv4l2h265enc ! h265parse ! matroskamux ! filesink location=b.mp4

It works fine if I set both frame rates the same, however, it crashes if they are different, is something wrong with my pipeline?

Hi,
The source can only run in fixed framerate, either 15 fps or 60 fps. If you need one 60 fps and one 15 fps, one possible solution is to run like:

nvarguscamerasrc num-buffers=150 ! tee name=t t. ! queue ! nvtee ! nvvidconv ! video/x-raw(memory:NVMM),width=400,height=300,framerate=60/1 ! nvv4l2h265enc ! h265parse ! matroskamux ! filesink location=a.mp4 t. ! queue ! appsink

And drop frames in appsink to get 15fps. For encoding, would need to run another pipeline in appsink like:

appsrc ! video/x-raw(memory:NVMM) ! nvv4l2h265enc ! h265parse ! matroskamux ! filesink location=b.mp4

If you would like to encode 60fps data into 15fps to have slow motion effect, may try videorate plugin: videorate

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.