Gstreamer 转码流水线 1 source N sinks
Gstreamer transcoding pipeline 1 source N sinks
大家好,我有一个 mkv 想要转换为 mp4、ogg 和 webm
我尝试遵循管道但卡住了
gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
qtmux name=mp4 ! filesink location=output.mp4 \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! x264enc ! progressreport update-freq=1 ! mp4. \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg.
输出
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
progressreport2 (00:00:01): 0 seconds
progressreport2 (00:00:02): 0 seconds
progressreport0 (00:00:02): 0 seconds
据我所知,队列有问题,因为它只能识别 2 个并且应该有 3 个
此外,如果我从管道中删除一个队列,似乎工作正常
即
gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg.
输出
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
progressreport1 (00:00:01): 0 seconds
progressreport0 (00:00:02): 0 seconds
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
progressreport1 (00:00:02): 0 seconds
progressreport1 (00:00:03): 0 seconds
progressreport1 (00:00:04): 0 seconds
progressreport1 (00:00:05): 0 seconds
progressreport1 (00:00:06): 0 seconds
progressreport0 (00:00:08): 0 seconds
progressreport1 (00:00:09): 0 seconds
请指教
问候
x264enc
默认情况下的延迟高于默认队列大小,导致您的管道停滞。 (它必须消耗比当前实际创建输出缓冲区更多的数据。这样管道将永远不会完成预滚动)。
两个选项:
- 增加所有队列的队列大小的缓冲区大小。
- 使用
x264enc tune=zerolatency
作为编码器。
大家好,我有一个 mkv 想要转换为 mp4、ogg 和 webm
我尝试遵循管道但卡住了
gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
qtmux name=mp4 ! filesink location=output.mp4 \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! x264enc ! progressreport update-freq=1 ! mp4. \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg.
输出
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
progressreport2 (00:00:01): 0 seconds
progressreport2 (00:00:02): 0 seconds
progressreport0 (00:00:02): 0 seconds
据我所知,队列有问题,因为它只能识别 2 个并且应该有 3 个 此外,如果我从管道中删除一个队列,似乎工作正常
即
gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg.
输出
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
progressreport1 (00:00:01): 0 seconds
progressreport0 (00:00:02): 0 seconds
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
progressreport1 (00:00:02): 0 seconds
progressreport1 (00:00:03): 0 seconds
progressreport1 (00:00:04): 0 seconds
progressreport1 (00:00:05): 0 seconds
progressreport1 (00:00:06): 0 seconds
progressreport0 (00:00:08): 0 seconds
progressreport1 (00:00:09): 0 seconds
请指教
问候
x264enc
默认情况下的延迟高于默认队列大小,导致您的管道停滞。 (它必须消耗比当前实际创建输出缓冲区更多的数据。这样管道将永远不会完成预滚动)。
两个选项:
- 增加所有队列的队列大小的缓冲区大小。
- 使用
x264enc tune=zerolatency
作为编码器。