How we can read from YUV file using C code and encode that file using x264enc and finally save that encoded output in .264 file?
Please do let me know. Thanks in advance. |
On Tue, 2016-02-16 at 01:23 -0800, gstreader wrote:
> How we can read from YUV file using C code and encode that file using > x264enc and finally save that encoded output in .264 file? It depends what format your YUV file is in. If it's y4m use filesrc location=video.y4m ! y4mdec ! ... If it's just raw YUV data use filesrc location=video.yuv ! videoparse format=i420 width=.. height=.. ! ... Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by gstreader
On Di, 2016-02-16 at 01:23 -0800, gstreader wrote:
> How we can read from YUV file using C code and encode that file using > x264enc and finally save that encoded output in .264 file? Take a look at the videoparse element and its properties :) > View this message in context: http://gstreamer-devel.966125.n4.nabble > .com/Read-from-YUV-file-tp4675875.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. Please don't use Nabble for posting on this mailing list, it tends to drop text from mails and otherwise corrupt the text. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (968 bytes) Download Attachment |
In reply to this post by Tim Müller
Thanks for the reply.
I have tried this pipeline: gst-launch-0.10 -v filesrc location=akiyo_cif.yuv ! videoparse format=i420 width=352 height=288 framerate=15/1 ! x264enc ! filesink location=encstr.h264 but it is not working properly. I am getting the error when I parse that encstr.h264 file using ldecod. Error:Error while getting the NALU in file format Annex B exit What am doing wrong here!!! |
On Tue, 2016-02-16 at 23:38 -0800, gstreader wrote:
Hi, You're using an ancient version of GStreamer that is no longer maintained, you should really try and upgrade to 1.x if possible at all. > I have tried this pipeline: > gst-launch-0.10 -v filesrc location=akiyo_cif.yuv ! videoparse > format=i420 > width=352 height=288 framerate=15/1 ! x264enc ! filesink > location=encstr.h264 > > but it is not working properly. > I am getting the error when I parse that encstr.h264 file using > ldecod. > Error:Error while getting the NALU in file format Annex B exit > > What am doing wrong here!!! I think in older versions x264enc would output H.264 in AVC stream- format by default. You can force it to bytestream like this: ... ! x264enc ! video/x-h264,stream-format=byte-stream ! fakesink Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thank you very much. It works after set byte-stream=TRUE for x264enc.
|
In reply to this post by Tim Müller
Hello, i had written a c program to implement appsink in the pipeline.But i
am getting errors as could not demultiplex stream. Any suggestions? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by gstreader
Le mar. 16 févr. 2016 04 h 23, gstreader <[hidden email]> a écrit : How we can read from YUV file using C code and encode that file using x264enc You can read raw yuv from file using rawvideoparse element, don't forget to configure it properly.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |