Cannot encode stream using x264enc
William Metcalf
wmetcalf at niftytv.com
Tue Jun 7 11:42:02 PDT 2011
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
> <mailto: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
> <mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110607/506fed4c/attachment.htm>
More information about the gstreamer-devel
mailing list