Reputation:
This is to be converted:
gst-launch -v ximagesrc startx=0 starty=0 endx=800 endy=600 ! ffmpegcolorspace ! "video/x-raw-yuv,width=800,height=600,framerate=30/1" ! v4l2sink device=/dev/video0
I found here that
The "ffmpegcolorspace" element has been replaced with the new "videoconvert" element.
Simply replacing gst-launch
with gst-launch-1.0
and ffmpegcolorspace
with videoconvert
is not sufficient and produces an error:
WARNING: erroneous pipeline: could not link videoconvert0 to v4l2sink0
A simple gst-launch-1.0 videotestsrc ! ximagesink
works fine, while gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video0
produces a different error:
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Upvotes: 1
Views: 3955
Reputation: 3378
Two things, first, GStreamer changed the way they do caps, so video/x-raw-yuv
becomes video/x-raw,format=YUV9
(or one of many other formats). So your caps would be wrong under GStreamer 1.0.
Secondly, you can probably trim your pipeline up a bit. I'd guess you could do this:
gst-launch -v ximagesrc startx=0 starty=0 endx=800 endy=600 ! videoconvert ! v4l2sink device=/dev/video0
And if the frame rates don't match between the source and sink you'd have to add videorate:
gst-launch -v ximagesrc startx=0 starty=0 endx=800 endy=600 ! videoconvert ! videorate ! video/x-raw,framerate=30/1 ! v4l2sink device=/dev/video0
Upvotes: 3