简体   繁体   English

gstreamer与x264enc混合

[英]gstreamer muxing with x264enc

I am trying to convert a DVD to mkv file with gstreamer. 我正在尝试使用gstreamer将DVD转换为mkv文件。 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.. 当我用ffenc_mpeg4替换x264enc时,一切正常。

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 字节流应为0-抱歉

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 您需要在x264enc之后提供视频的上限,并且需要增加音频队列的限制以处理x264enc中的延迟

These two changes have the pipeline running at my end. 这两个更改使管道在最后运行。

The deinterlacer is optional but desirable for interlaced content. 去隔行扫描是可选的,但对于隔行扫描的内容是理想的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM