<div dir="ltr"><div><div><div>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.<br><br></div>You need to get all your caps right. This works. Adapt it to your resolution.<br><br>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<br><br></div>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.<br><br></div>P<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 2:37 PM, Claire Mantel <span dir="ltr"><<a href="mailto:clma@fotonik.dtu.dk" target="_blank">clma@fotonik.dtu.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="DA">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Hi Peter,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Ah ok oups, sorry I thought that video/x-h264 was the encoder…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">So.. now I’ve tried the command line<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">gst-launch-1.0 filesrc location=/mnt/sdcard/<wbr>testGSTPipelines/IRSeq_BUTIV_<wbr>Davis1A_420_short.yuv ! \<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">video/x-raw,format=I420,width=<wbr>640,height=512,framerate=25/1 \<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">! x264enc ! filesink location=test.mp4<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">(I don’t care about the settings of the encoder for now just would like to get the pipeline running)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">And now I get the error<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">ERROR: from element /GstPipeline:pipeline0/<wbr>GstFileSrc:filesrc0: Internal data flow error.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Additional debug info:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/<wbr>GstFileSrc:filesrc0:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">streaming task paused, reason error (-5)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">ERROR: pipeline doesn't want to preroll.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I get the same error if I try from an avi file (gst-launch-1.0 filesrc location=/mnt/sdcard/<wbr>testGSTPipelines/IRSeq_BUTIV_<wbr>Davis1A_420_short.avi
 ! \<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">x264enc ! filesink location=test.mp4)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I tried adding avimux and setting the output to avi but tthat doesn’t change anything.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Sorry for being such a newbie…
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> gstreamer-devel [mailto:<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank">gstreamer-devel-<wbr>bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Peter Maersk-Moller<br>
<b>Sent:</b> Monday, August 15, 2016 12:20 PM<span class=""><br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Subject:</b> Re: error "no element "video"" when input is yuv<u></u><u></u></span></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Claire.<u></u><u></u></p><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Aug 15, 2016 at 10:24 AM, Claire Mantel <<a href="mailto:clma@fotonik.dtu.dk" target="_blank">clma@fotonik.dtu.dk</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Hey Alan,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Thanks for answering. </span><span lang="EN-US">
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">My aim is to encode the video yes.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Based on your answer I tried the following command line:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">gst-launch-1.0 filesrc location=/mnt/sdcard/<wbr>testGSTPipelines/IRSeq_BUTIV_<wbr>Davis1A_420_short.yuv
 blocksize=491520 ! \</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">video/x-raw,format=i420,width=<wbr>640,height=512,framerate=25/1 \</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">! video/x-h264 ! avimux ! queue ! filesink location=test.avi</span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The element '<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">video/x-raw,format=i420,<wbr>width=640,height=512,<wbr>framerate=25/1' and the element 'video/x-h264' are cap specifications or cap filters.
 They <b>DO NOT</b> 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.</span><span lang="EN-US">
</span><u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">But I still get the same error.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">I don’t get the first answer (“</span><span lang="EN-US">video/x-raw and video/x-h264
 are incompatible”) as x264 is a video encoder…</span><u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">No, you are mistaken. x264 is an encoder project which code GStreamer has used to based their H.264 encoder, the x264enc element, on.
<b>You have not</b> included any encoder element at all in your pipeline. I'd suggest you include one.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Best Peter<u></u><u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>