AnsweredAssumed Answered

Record from imxv4l2src into 2 video files

Question asked by Tu Tran on Aug 22, 2016
Latest reply on Sep 22, 2016 by Tu Tran

Hi,

 

I am trying with capture from camera, encode and save in two mkv files (one have fullHD 30fps and other have WVGA/HD resolution)

As the first thinking, I tried with tee by using the pipeline:

 

gst-launch-1.0 -v imxv4l2src device=/dev/video1 !  video/x-raw, format=I420,width=1920, height=1080, framerate=30/1 ! tee name=t ! queue ! imxvideoconvert_ipu l! video/x-raw, width=1280, height=720 ! imxvpuenc_h264 gop-size=30 bitrate=2000 ! h264parse ! matroskamux ! filesink location=/home/root/video2 t. ! queue ! vpuenc gop-size=30 bitrate=4000 ! h264parse ! matroskamux ! filesink location=/home/root/video1 &

 

When I play two video files in VLC, I found that the bitrates is decrease half. This maybe cause by the limitation of VPU encoder, only support encode one fullhd 30fps. For encode two streams at the same time, it is over limitation of VPU.

Is my understanding correct?

How can I improve the quality of two encoded videos?

I also tried with x264enc to encode WVGA file, VPU used for fullHD stream. But this is not the correct solution.

Outcomes