Gstreamer, video recording does not work as intended

I am using Gstreamer to record 4 videos (MKV container, Mjpeg codec, 25 frames per second, 5 minutes) to create a video wall (basically a 2x2 matrix). I am using the following pipeline:

#!/bin/sh
gst-launch -e videomixer name=mix ! ffmpegcolorspace !  jpegenc ! avimux ! filesink location=$1.avi \
uridecodebin uri="file://${PWD}/$1/1.mkv" ! videoscale ! videorate ! video/x-raw-yuv,width=300,height=200, framerate=25/1 ! videobox border-alpha=0 top=0 left=0 ! mix. \
uridecodebin uri="file://${PWD}/$1/2.mkv" ! videoscale  ! videorate ! video/x-raw-yuv,width=300,height=200,framerate=25/1 ! videobox border-alpha=0 top=0 left=-300 ! mix. \
uridecodebin uri="file://${PWD}/$1/3.mkv" ! videoscale  ! videorate ! video/x-raw-yuv,width=300,height=200,framerate=25/1 ! videobox border-alpha=0 top=-200 left=0 ! mix. \
uridecodebin uri="file://${PWD}/$1/4.mkv" ! videoscale  ! videorate ! video/x-raw-yuv,width=300,height=200,framerate=25/1 ! videobox border-alpha=0 top=-200 left=-300 ! mix. \

      

The code works, but the end result is only 17 seconds instead of 5 minutes as the original videos, and it seems to me that I am not using the video element correctly - the output video seems to randomly "speed up" "reading frames as they become available, instead of to maintain the speed of the original videos.

Interestingly, when the source files are .wmv (Windows Media 9 codec), everything works fine. Any ideas?

+3


source to share


1 answer


Try putting your capsule in quotes ... video! "video / x-raw-yuv, width = 300, height = 200, frameerate = 25/1"! video ads ... also try videomixer2



+2


source







All Articles