Playing raw video using gst-launch

I have created a raw video file using fileink, I can play the file using vlc with the following command

 vlc --demux rawvideo --rawvid-fps 24 --rawvid-width 1920 --rawvid-height 816 --rawvid-chroma I420 /home/user/Videos/out.yuv

      

But, with

 gst-launch-1.0 filesrc location=/home/user/Videos/out.yuv ! video/x-raw,format=I420,height=816,width=1920,framerate=24 ! autovideoconvert ! autovideosink

      

gives an error message

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format
Additional debug info:
gstcapsfilter.c(348): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
Output caps are unfixed: EMPTY
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

      

Is it possible to determine how to resolve this error?

+3


source to share


1 answer


There are 2 questions. At first, the frame rate is expected to be a fraction, so you should use 24/1 instead of 24.

The second problem is that filesrc will read chunks of the file that are not the expected frame size, so the frames will not be aligned with the gstreamer buffers. You can use the filesrc blocksize property to pass in the correct frame byte size (width * height * bytes per pixel), or you can just use a video receiver.



 gst-launch-1.0 filesrc location=/home/user/Videos/out.yuv ! videoparse width=1920 height=816 framerate=24/1 format=2 ! autovideoconvert ! autovideosink

      

Check "gst-inspect-1.0 videoparse" for available properties

+6


source







All Articles