error "no element "video"" when input is yuv

Peter Maersk-Moller pmaersk at gmail.com
Mon Aug 15 13:15:40 UTC 2016


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 <clma at 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-
> bounces at 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 <clma at 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-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160815/31ba2f8b/attachment-0001.html>


More information about the gstreamer-devel mailing list