Paul Praet
Paul Praet

Reputation: 1387

gstreamer muxing with x264enc

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.

Unfortunately the pipeline does not go beyond prerolling. When I replace x264enc with for instance ffenc_mpeg4, then everything works fine..

Upvotes: 0

Views: 7530

Answers (1)

av501
av501

Reputation: 6729

This may work :

gst-launch filesrc location=file.vob \
  ! queue \
  ! dvddemux name=demuxer matroskamux name=mux \
  ! queue \
  ! filesink location=test.mkv demuxer.current_video\
  ! queue \
  ! ffdec_mpeg2video \
  ! ffdeinterlace  \
  ! x264enc \
  ! 'video/x-h264, width=720, height=576, framerate=25/1' \
  ! mux.  demuxer.current_audio \
  ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=10000000000 \
  ! ffdec_ac3 \
  ! audioconvert \
  ! lamemp3enc \
  ! mux.

Byte stream should be 0 - sorry for that earlier

You need to give the caps of the video after the x264enc and you need to increase the limits on the audio queue to handle the delay in x264enc

These two changes have the pipeline running at my end.

The deinterlacer is optional but desirable for interlaced content.

Upvotes: 5

Related Questions