Discussion:
error "no element "video"" when input is yuv
Claire Mantel
2016-08-10 14:52:13 UTC
Permalink
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
Weipeng HE
2016-08-10 15:22:21 UTC
Permalink
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
Post by Claire Mantel
Hello,
I’m trying to input a 420 yuv file.
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
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
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
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
alan wang
2016-08-11 08:19:57 UTC
Permalink
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
Post by Weipeng HE
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
Post by Claire Mantel
Hello,
I’m trying to input a 420 yuv file.
gst-launch-1.0 filesrc
location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.yuv
! \
Post by Claire Mantel
video/x-raw,format=i420,width=640,height=512,framerate=25/1 \
! video/x-h264! filesink location=test.mp4
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
gst-launch-1.0 filesrc
location=/mnt/sdcard/testGSTPipelines/IRSeq_BUTIV_Davis1A_420_short.avi
! \
Post by Claire Mantel
video/x-h264 ! filesink location=test.mp4
Any idea what I might be doing wrong?
Thanks in advance!
Claire
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Claire Mantel
2016-08-15 08:24:34 UTC
Permalink
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:gstreamer-devel-***@lists.freedesktop.org] On Behalf Of alan wang
Sent: Thursday, August 11, 2016 10:20 AM
To: Discussion of the development of and with GStreamer
Subject: Re: error "no element "video"" when input is yuv

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 <***@gmail.com<mailto:***@gmail.com>>:
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
Post by Claire Mantel
Hello,
I’m trying to input a 420 yuv file.
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
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
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
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
gstreamer-***@lists.freedesktop.org<mailto:gstreamer-***@lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Peter Maersk-Moller
2016-08-15 10:20:10 UTC
Permalink
Hi Claire.
Post by Claire Mantel
Hey Alan,
Thanks for answering.
My aim is to encode the video yes.
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.
Post by Claire Mantel
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

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
Claire Mantel
2016-08-15 12:37:24 UTC
Permalink
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:gstreamer-devel-***@lists.freedesktop.org] On Behalf Of Peter Maersk-Moller
Sent: Monday, August 15, 2016 12:20 PM
To: Discussion of the development of and with GStreamer
Subject: Re: error "no element "video"" when input is yuv

Hi Claire.

On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <***@fotonik.dtu.dk<mailto:***@fotonik.dtu.dk>> 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.

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


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
Peter Maersk-Moller
2016-08-15 13:15:40 UTC
Permalink
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

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
Post by Claire Mantel
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.
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/
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:gstreamer-devel-
*Sent:* Monday, August 15, 2016 12:20 PM
*To:* Discussion of the development of and with GStreamer
*Subject:* Re: error "no element "video"" when input is yuv
Hi Claire.
Hey Alan,
Thanks for answering.
My aim is to encode the video yes.
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.
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

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
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Claire Mantel
2016-08-15 14:40:49 UTC
Permalink
Ok! It works now!
Thanks a lot!

Claire


From: gstreamer-devel [mailto:gstreamer-devel-***@lists.freedesktop.org] On Behalf Of Peter Maersk-Moller
Sent: Monday, August 15, 2016 3:16 PM
To: Discussion of the development of and with GStreamer
Subject: Re: error "no element "video"" when input is yuv

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
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 <***@fotonik.dtu.dk<mailto:***@fotonik.dtu.dk>> 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:gstreamer-devel-***@lists.freedesktop.org<mailto:gstreamer-devel-***@lists.freedesktop.org>] On Behalf Of Peter Maersk-Moller
Sent: Monday, August 15, 2016 12:20 PM
To: Discussion of the development of and with GStreamer
Subject: Re: error "no element "video"" when input is yuv

Hi Claire.

On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <***@fotonik.dtu.dk<mailto:***@fotonik.dtu.dk>> 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.

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


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
gstreamer-***@lists.freedesktop.org<mailto:gstreamer-***@lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

Loading...