Cannot encode stream using x264enc

Stefan Kost ensonic at hora-obscura.de
Thu Jun 9 04:31:32 PDT 2011


Am 07.06.2011 22:14, schrieb William Metcalf:
> Matt, I have tried finishing the pipeline to account for audio and video just as
> you have suggested already and I get the same error. 
> 
> Tim, I am *not* exactly sure how to post a bug about gst-plugins-ugly on
> bugzilla, but below this is the standard output, and the error output of my
> pipeline if you want to add the bug to bugzilla yourself. 

Its easy:
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&component=gst-plugins-ugly

Stefan

> 
> Thanks, 
> William 
> 
> Output: 
> 
> 
> Setting pipeline to PAUSED ... 
> Pipeline is PREROLLING ... 
> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:sink: caps =
> video/x-theora, width=(int)720, height=(int)400, framerate=(fraction)25/1,
> pixel-aspect-ratio=(fraction)1/1 
> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:src: caps =
> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400 
> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400 
> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400 
> ERROR: from element /GstPipeline:pipeline0/GstX264Enc:x264enc0:
> Could *not* encode stream. 
> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264,
> width=(int)720, height=(int)400, framerate=(fraction)25/1,
> stream-format=(string)avc 
> Additional debug info: 
> ..\..\..\..\..\Source\gst-plugins-ugly\ext\x264\gstx264enc.c(737):
> gst_x264_enc_header_buf (): /GstPipeline:pipeline0/GstX264Enc:x264enc0: 
> Unexpected x264 header. 
> Setting pipeline to NULL ... 
> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw-yuv,
> format=(fourcc)I420, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
> width=(int)720, height=(int)400 
> /GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = NULL 
> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = NULL 
> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = NULL 
> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = NULL 
> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = NULL 
> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:src: caps = NULL 
> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:sink: caps = NULL 
> /GstPipeline:pipeline0/GstOggDemux:oggdemux0.GstOggPad:serial_0dcdfd30: caps = NULL 
> /GstPipeline:pipeline0/GstOggDemux:oggdemux0.GstOggPad:serial_6c22f681: caps = NULL 
> Freeing pipeline ... 
> 
> Error Output: 
> 
> ** (gst-launch-0.10:1208): CRITICAL **: file
> ..\..\..\Source\gstreamer\gst\gstinfo.c: line 470: assertion `category != NULL'
> failed 
> 
> ** (gst-launch-0.10:1208): CRITICAL **: file
> ..\..\..\Source\gstreamer\gst\gstinfo.c: line 470: assertion `category != NULL'
> failed 
> 
> ** (gst-launch-0.10:1208): CRITICAL **: file
> ..\..\..\Source\gstreamer\gst\gstinfo.c: line 470: assertion `category != NULL'
> failed 
> 
> ** (gst-launch-0.10:1208): CRITICAL **: file
> ..\..\..\Source\gstreamer\gst\gstinfo.c: line 470: assertion `category != NULL'
> failed 
> 0:00:00.182018000  1208   016C2E20 INFO                 x264enc
> .:0::<x264enc0> using SAR=1/1 
> 
> 0:00:00.184018000  1208   016C2E20 INFO                 x264enc
> .:0::<x264enc0> using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 
> 
> 0:00:00.209021000  1208   016C2E20 INFO                 x264enc
> .:0::<x264enc0> profile Main, level 3.0 
> 
> 0:00:00.209021000  1208   016C2E20 WARN                 x264enc
> gstx264enc.c:737:gst_x264_enc_header_buf:<x264enc0> error: Unexpected x264 header. 
> ERROR: pipeline doesn't want to preroll. 
> 0:00:00.221022000  1208   006F07D8 LOG                  x264enc
> .:0::<x264enc0> frame=   0 QP=10.00 NAL=3 Slice:I Poc:0   I:1125 P:0    SKIP:0  
>  size=783 bytes 
> 
> 0:00:00.222022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> frame I:1     Avg QP:10.00  size:   783 
> 
> 0:00:00.222022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> mb I  I16..4: 99.9%  0.0%  0.1% 
> 
> 0:00:00.222022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% 
> 
> 0:00:00.222022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> i16 v,h,dc,p: 96%  0%  4%  0% 
> 
> 0:00:00.222022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0% 
> 
> 0:00:00.223022000  1208   006F07D8 INFO                 x264enc
> .:0::<x264enc0> kb/s:156.60 
> 
> 
> 
> On 6/7/2011 1:56 PM, Matt Veenstra wrote:
>> Try putting in a "queue" after "theoradec".  All of my pipelines do
>> that.  Not sure if this is a requirement and would cause this error or
>> not.
>>
>> If your source has audio you might need to deal with this stream as
>> well.  I forget the details when not using "gnolin".  So something
>> like this...
>> gst-launch filesrc location="c:\\video(low_res).ogg" ! oggdemux name="demux"
>> .demux ! theoradec ! ffmpegcolorspace ! x264enc ! qtmux name="mux" !
>> filesink location="c:\\video(blah).mp4
>> .demux ! vorbisdec ! audioconvert ! faac ! .mux
>>
>> Cheers,
>> Matt
>>
>> On Tue, Jun 7, 2011 at 11:42 AM, William Metcalf <wmetcalf at niftytv.com> wrote:
>>> Running with videoparse did not solve the problem.  When I run it with the
>>> -v option, I get the following output.
>>>
>>> C:\Users\wmetcalf>gst-launch -v filesrc location="c:\\video(low_res).ogg" !
>>> oggdemux ! theoradec ! ffmpegcolorspace ! x264enc ! qtmux ! filesink
>>> location="c:\\video(blah).mp4
>>> Setting pipeline to PAUSED ...
>>> Pipeline is PREROLLING ...
>>> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:sink: caps =
>>> video/x-theora, width=(int)720, height=(int)400, framerate=(fraction)25/1,
>>> pixel-aspect-ratio=(fraction)1/1
>>> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:src: caps =
>>> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
>>> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400
>>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
>>> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
>>> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400
>>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
>>> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
>>> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400
>>> ERROR: from element /GstPipeline:pipeline0/GstX264Enc:x264enc0: Could not
>>> encode stream.
>>> Additional debug info:
>>> ..\..\..\..\..\Source\gst-plugins-ugly\ext\x264\gstx264enc.c(737):
>>> gst_x264_enc_header_buf (): /GstPipeline:pipeline0/GstX264Enc:x264enc0:
>>> Unexpected x264 header.
>>> ERROR: pipeline doesn't want to preroll.
>>> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264,
>>> width=(int)720, height=(int)400, framerate=(fraction)25/1,
>>> stream-format=(string)avc
>>> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps =
>>> video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)25/1,
>>> pixel-aspect-ratio=(fraction)1/1, width=(int)720, height=(int)400
>>> Setting pipeline to NULL ...
>>> /GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = NULL
>>> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = NULL
>>> /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = NULL
>>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = NULL
>>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = NULL
>>> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:src: caps = NULL
>>> /GstPipeline:pipeline0/GstTheoraDec:theoradec0.GstPad:sink: caps = NULL
>>> /GstPipeline:pipeline0/GstOggDemux:oggdemux0.GstOggPad:serial_0dcdfd30: caps
>>> = NULL
>>> /GstPipeline:pipeline0/GstOggDemux:oggdemux0.GstOggPad:serial_6c22f681: caps
>>> = NULL
>>> Freeing pipeline ...
>>>
>>>
>>> It seems to me like the caps are correct to my understanding.  The sink of
>>> the decoder is theora, and it outputs raw.  FFMPCS takes in raw and ouputs
>>> raw, and x264enc takes in raw and outputs h264.  Can you see something else
>>> that is wrong or is my understanding incorrect?
>>>
>>> Thank you,
>>> William
>>>
>>> On 6/7/2011 1:31 PM, sudarshan bisht wrote:
>>>
>>> You can try using videoparse before x264enc. And use -v option with
>>> gst-launch to get some caps related logs.
>>>
>>>
>>> On Tue, Jun 7, 2011 at 6:33 PM, William Metcalf <wmetcalf at niftytv.com>
>>> wrote:
>>>> I have a pipeline I am using to convert an .ogg file to an .mp4.  I am
>>>> currently using ffenc_mpeg4 to encode the video, and this encoder sets the
>>>> video format as .mp4v.  I need my video to be encoded as AVC so I am trying
>>>> to use x264enc instead.  However every time I try to use x264enc, I get the
>>>> error "failed to encode stream".  Below is a sample pipeline I am using in
>>>> my converter.  Can any one tell my why x264enc is failing to encode the
>>>> stream?  Thank you in advance.
>>>>
>>>> gst-launch filesrc location="c:\\video(low_res).ogg" ! oggdemux !
>>>> theoradec ! ffmpegcolorspace ! x264enc ! qtmux ! filesink
>>>> location="c:\\video(blah).mp4
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>> --
>>> Regards,
>>>
>>> Sudarshan Bisht
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list