This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sample GStreamer code for multiple encodings with H.264 codec

Could anyone give me a sample code for multipe H264 encoding from one v4l2 captured video into several files with diffrent name??

I found this sample code , but want to do 3 encodings at the same time.

# pipeline to capture and encode video over v4l2
gst-launch v4l2src always-copy=false queue-size=12 num-buffers=2000 ! 'video/x-raw-yuv-strided,format=(fourcc)NV12,width=1280,height=720,framerate=(fraction)60/1' ! omxbufferalloc numBuffers=12 ! omx_h264enc bitrate=5000000 ! gstperf ! filesink location=v4l2cap.h264

  • Hi,

    Above code demonstrates capture and encode. Do you want to do same thing. Right now capture is supported using only 1 capture port.

    Regards,

    Hardik Shah

  • Hi Hardik. Thanks again for your reply. You have been very helpful for me to understand this DM8168.

    Yes. Basically my final goal is to enable all three(or two) HDVICPs, and measure the power consumption. Since we only have one video capturing input and one encoding requires one HDVICP to run, I am wondering if I can make GStreamer pipelines which takes one v4l2src and branch it to three different pipelines and make each branched video stream be encoded to a file simultaneously (thus, total three files will be created). Does my method make sense to achieve my goal? If it is possible, do you know how I should modify GStreamer pipeline?