0
votes

I found that for .avi files

gst-launch-1.0 -v filesrc location=test.avi ! avidemux ! decodebin ! videoconvert ! "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video0

and this one ouptput screen into /dev/video0 :

gst-launch-1.0 -v ximagesrc startx=1 starty=1 endx=320 endy=240 ! videoconvert ! "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video0

Any idea on how to use Gstreamer to input a .mp4 file instead of .avi file ?

1

1 Answers

1
votes

gst-launch-1.0 -v filesrc location=test.mp4 ! qtdemux ! decodebin ! videoconvert ! "video/x-raw,format=YUY2" ! v4l2sink device=/dev/video0

Since MP4 files do not have a concept of a fixed frame rate you have to add a video rate element and set a desired frame rate (may depend on the output device).

gst-launch-1.0 -v filesrc location=test.mp4 ! qtdemux ! decodebin ! videorate ! videoconvert ! "video/x-raw,format=YUY2,framerate=30/1" ! v4l2sink device=/dev/video0