gstreamer x264enc matroskamux issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer x264enc matroskamux issue

paul.praet
I am trying to convert a DVD to mkv file with gstreamer. The pipeline I use is:

gst-launch -evv multifilesrc location="VTS_01_%d.VOB" index=1 ! dvddemux name=demuxer \
 matroskamux name=mux ! filesink location=test.mkv \
 demuxer.current_video ! queue ! mpeg2dec ! x264enc ! mux. \
 demuxer.current_audio ! queue ! ffdec_ac3 ! lamemp3enc ! mux.
(I cannot use dvdreadsrc because I get another error on the iso file)
Unfortunately the pipeline does not go beyond prerolling. When I replace x264enc with for instance ffenc_mpeg4, then everything works fine..
Some people suggested adding byte-stream=1 to x264enc but it did not change anything.


Output :
spetsnaz@seefhoek:~/work$ dvd2mkv 
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDVDDemux:demuxer.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)true, parsed=(boolean)true
/GstPipeline:pipeline0/GstDVDDemux:demuxer.GstPad:current_video: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/GstPipeline:pipeline0/GstMpeg2dec:mpeg2dec0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/GstPipeline:pipeline0/GstMpeg2dec:mpeg2dec0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1, interlaced=(boolean)false
/GstPipeline:pipeline0/GstDVDDemux:demuxer.GstPad:current_audio: caps = audio/x-ac3
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/x-ac3
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/x-ac3
/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:sink: caps = audio/x-ac3
/GstPipeline:pipeline0/ffdec_ac3:ffdec_ac30.GstPad:src: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
/GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)2, rate=(int)48000
/GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:sink: caps = audio/x-raw-int, rate=(int)48000, channels=(int)2, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
Redistribute latency...
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)2, rate=(int)48000
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, width=(int)720, height=(int)576, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)16/15, codec_data=(buffer)0164001effe1001d6764001eacd940b4126ffc0040003d220000030002ee6b28001e2c5b2c01000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)high
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1, interlaced=(boolean)false

[nothing happens anymore]




_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer x264enc matroskamux issue

Tim-Philipp Müller-2
On Thu, 2012-10-25 at 20:49 +0200, [hidden email] wrote:


> I am trying to convert a DVD to mkv file with gstreamer. The pipeline
> I use is:
>
> gst-launch -evv multifilesrc location="VTS_01_%d.VOB" index=1 ! dvddemux name=demuxer \
>  matroskamux name=mux ! filesink location=test.mkv \
>  demuxer.current_video ! queue ! mpeg2dec ! x264enc ! mux. \
>  demuxer.current_audio ! queue ! ffdec_ac3 ! lamemp3enc ! mux
> [nothing happens anymore]

The queues are probably too small (more precisely: the audio queue).
x264enc will by default consume a few seconds' worth of frames before it
outputs the first encoded frame. The audio queue needs to be able to
contain that much audio data as well then (otherwise the demuxer will
get blocked and stop outputting more video too, and nothing happens any
more).

So in short, try:

  ! queue max-size-bytes=0 max-size-buffers=0
max-size-time=10000000000 ! ..

(or x264enc tune=zerolatency to find out if that is the problem - but
this is not a good setting for transcoding, since it will reduce
quality)

Cheers
 -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer x264enc matroskamux issue

Chuck Crisler-2
Tim, why does 'zerolatency' reduce quality in transcoding? He is reading from a file so I would think that there shouldn't be any jitter concern.

On Thu, Oct 25, 2012 at 3:51 PM, Tim-Philipp Müller <[hidden email]> wrote:
On Thu, 2012-10-25 at 20:49 +0200, [hidden email] wrote:


> I am trying to convert a DVD to mkv file with gstreamer. The pipeline
> I use is:
>
> gst-launch -evv multifilesrc location="VTS_01_%d.VOB" index=1 ! dvddemux name=demuxer \
>  matroskamux name=mux ! filesink location=test.mkv \
>  demuxer.current_video ! queue ! mpeg2dec ! x264enc ! mux. \
>  demuxer.current_audio ! queue ! ffdec_ac3 ! lamemp3enc ! mux
> [nothing happens anymore]

The queues are probably too small (more precisely: the audio queue).
x264enc will by default consume a few seconds' worth of frames before it
outputs the first encoded frame. The audio queue needs to be able to
contain that much audio data as well then (otherwise the demuxer will
get blocked and stop outputting more video too, and nothing happens any
more).

So in short, try:

  ! queue max-size-bytes=0 max-size-buffers=0
max-size-time=10000000000 ! ..

(or x264enc tune=zerolatency to find out if that is the problem - but
this is not a good setting for transcoding, since it will reduce
quality)

Cheers
 -Tim


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel