Hello, I’m trying to input a 420 yuv file. I’m trying the following command line: gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv ! \
video/x-raw,format=i420,width=640,height=512,framerate=25/1 \
!
video/x-h264
! filesink location=test.mp4 And get the error “(gst-launch-1.0:1231): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed WARNING: erroneous pipeline: no element "video" ” The weird thing is that when I encapsulate the same yuv file in avi it works well with the command line: gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.avi ! \
video/x-h264
! filesink location=test.mp4 Any idea what I might be doing wrong? Thanks in advance! Claire _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
video/x-raw and video/x-h264 are incompatible video types. You cannot link them without conversion. In other words, you need to put encoder element between them. Best, Weipeng On 10/08/16 16:52, Claire Mantel wrote: > Hello, > > > > I’m trying to input a 420 yuv file. > > I’m trying the following command line: > > > > gst-launch-1.0 filesrc > location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv ! \ > > video/x-raw,format=i420,width=640,height=512,framerate=25/1 \ > > ! video/x-h264! filesink location=test.mp4 > > > > And get the error “(gst-launch-1.0:1231): GStreamer-CRITICAL **: > gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed > > WARNING: erroneous pipeline: no element "video" ” > > > > The weird thing is that when I encapsulate the same yuv file in avi it > works well with the command line: > > > > gst-launch-1.0 filesrc > location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.avi ! \ > > video/x-h264 ! filesink location=test.mp4 > > > > Any idea what I might be doing wrong? > > Thanks in advance! > > > > Claire > > > > > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello Claire What's your purpose here ? You want just play a yuv raw frames or encode yuv frames. If you want to play yuv raw frames with gstreamer. You need command line like: gst-launch-1.0 filesrc location=/home/user/Videos/out.yuv ! videoparse width=1920 height=816 framerate=24/1 format=2 ! autovideoconvert ! autovideosink If you want to encoder raw frames, you need command line like: gst-launch-1.0 filesrc location=test_240X135.yuv blocksize=64800 ! video/x-raw, format=YUY2,width=240,height=135,framerate=25/1 ! omxmjpegvideoenc ! avimux ! queue ! filesink location=240x135_2.avi 2016-08-10 23:22 GMT+08:00 Weipeng HE <[hidden email]>: Hi, _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hey Alan, Thanks for answering. My aim is to encode the video yes. Based on your answer I tried the following command line: gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv blocksize=491520 ! \ video/x-raw,format=i420,width=640,height=512,framerate=25/1 \ ! video/x-h264 ! avimux ! queue ! filesink location=test.avi But I still get the same error. I don’t get the first answer (“video/x-raw and video/x-h264 are incompatible”) as x264 is a video encoder… Best Claire
From: gstreamer-devel [mailto:[hidden email]]
On Behalf Of alan wang Hello Claire What's your purpose here ? You want just play a yuv raw frames or encode yuv frames. If you want to play yuv raw frames with gstreamer. You need command line like: gst-launch-1.0 filesrc location=/home/user/Videos/out.yuv ! videoparse width=1920 height=816 framerate=24/1 format=2 ! autovideoconvert ! autovideosink If you want to encoder raw frames, you need command line like: gst-launch-1.0 filesrc location=test_240X135.yuv blocksize=64800 ! video/x-raw, format=YUY2,width=240,height=135,framerate=25/1 ! omxmjpegvideoenc ! avimux ! queue ! filesink location=240x135_2.avi 2016-08-10 23:22 GMT+08:00 Weipeng HE <[hidden email]>: Hi, _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Claire.
On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <[hidden email]> wrote:
The element 'video/x-raw,format=i420,width=
No, you are mistaken. x264 is an encoder project which code GStreamer has used to based their H.264 encoder, the x264enc element, on. You have not included any encoder element at all in your pipeline. I'd suggest you include one. Best Peter _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Peter, Ah ok oups, sorry I thought that video/x-h264 was the encoder… So.. now I’ve tried the command line gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv ! \ video/x-raw,format=I420,width=640,height=512,framerate=25/1 \ ! x264enc ! filesink location=test.mp4 (I don’t care about the settings of the encoder for now just would like to get the pipeline running) And now I get the error ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0: streaming task paused, reason error (-5) ERROR: pipeline doesn't want to preroll. I get the same error if I try from an avi file (gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.avi
! \ x264enc ! filesink location=test.mp4) I tried adding avimux and setting the output to avi but tthat doesn’t change anything. Sorry for being such a newbie…
From: gstreamer-devel [mailto:[hidden email]]
On Behalf Of Peter Maersk-Moller Hi Claire. On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <[hidden email]> wrote: Hey Alan, Thanks for answering.
My aim is to encode the video yes. Based on your answer I tried the following command line: gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv
blocksize=491520 ! \ video/x-raw,format=i420,width=640,height=512,framerate=25/1 \ ! video/x-h264 ! avimux ! queue ! filesink location=test.avi The element 'video/x-raw,format=i420,width=640,height=512,framerate=25/1' and the element 'video/x-h264' are cap specifications or cap filters.
They DO NOT change/encode/decode any data at all. You don't get encoded H.264 video by declaring that it is by some magical and mysterious way. You need to add an encoder element. Such element could be the x264enc element.
No, you are mistaken. x264 is an encoder project which code GStreamer has used to based their H.264 encoder, the x264enc element, on.
You have not included any encoder element at all in your pipeline. I'd suggest you include one. Best Peter _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
The x264enc does not output a container format such as mp4. Hence you can not save x264enc as mp4 without a muxer such as mp4mux. You need to get all your caps right. This works. Adapt it to your resolution.gst-launch-1.0 -v filesrc blocksize=115200 location=myfile.yuv do-timestamp=true ! 'video/x-raw,format=I420,width=320,height=240,framerate=25/1,pixel-aspect-ratio=1/1,interlace-mode=progressive' ! x264enc ! avimux ! filesink location=myfile.avi On Mon, Aug 15, 2016 at 2:37 PM, Claire Mantel <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Ok! It works now!
Thanks a lot! Claire From: gstreamer-devel [mailto:[hidden email]]
On Behalf Of Peter Maersk-Moller The x264enc does not output a container format such as mp4. Hence you can not save x264enc as mp4 without a muxer such as mp4mux. You need to get all your caps right. This works. Adapt it to your resolution. You can omit the do-timestamp=true as these are actually not the right timestamps, but you will get complaints about a critical error altrhough it still works. P On Mon, Aug 15, 2016 at 2:37 PM, Claire Mantel <[hidden email]> wrote: Hi Peter, Ah ok oups, sorry I thought that video/x-h264 was the encoder… So.. now I’ve tried the command line gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv
! \ video/x-raw,format=I420,width=640,height=512,framerate=25/1 \ ! x264enc ! filesink location=test.mp4 (I don’t care about the settings of the encoder for now just would like to get the pipeline
running) And now I get the error ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0: streaming task paused, reason error (-5) ERROR: pipeline doesn't want to preroll. I get the same error if I try from an avi file (gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.avi
! \ x264enc ! filesink location=test.mp4) I tried adding avimux and setting the output to avi but tthat doesn’t change anything. Sorry for being such a newbie…
From: gstreamer-devel
[mailto:[hidden email]]
On Behalf Of Peter Maersk-Moller Hi Claire. On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <[hidden email]> wrote: Hey Alan, Thanks for answering.
My aim is to encode the video yes. Based on your answer I tried the following command line: gst-launch-1.0 filesrc location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv
blocksize=491520 ! \ video/x-raw,format=i420,width=640,height=512,framerate=25/1 \ ! video/x-h264 ! avimux ! queue ! filesink location=test.avi The element 'video/x-raw,format=i420,width=640,height=512,framerate=25/1' and the element
'video/x-h264' are cap specifications or cap filters. They DO NOT change/encode/decode any data at all. You don't get encoded H.264 video by declaring that it is by some magical and mysterious way. You need to add an encoder element. Such element could
be the x264enc element.
No, you are mistaken. x264 is an encoder project which code GStreamer has used to based their H.264 encoder, the x264enc element, on.
You have not included any encoder element at all in your pipeline. I'd suggest you include one. Best Peter
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |