问题描述
我正在尝试使用gstreamer重新多路播放QuickTime电影(视频/jpeg,音频/mpeg).
i'm trying to re-multiplex a quicktime movie (video/jpeg, audio/mpeg) using gstreamer.
gst-launch filesrc location="${INFILE}" \
! qtdemux name=demux \
! queue \
! qtmux name=mux \
! filesink location="${OUTFILE}" \
demux.audio_00 \
! queue \
! mux.audio_0
不幸的是,这个管道没有启动(它先启动PREROLLING,然后等待).如果我省略了音频流(或为音频流指定了不存在的接收板(例如mux.audio.0
),则完成了多路复用(但没有音频)
unfortunately this pipeline does not start (it starts PREROLLING and then waits).if i omit the audio stream (or specify a non-existing sink-pad for the audio-stream (e.g. mux.audio.0
), remultiplexing is done (but without audio)
提供更多的内容:
我有一个快速时间,音频和视频之间的时间间隔很长.现在,我想将音频轨道移动几毫秒,但又不做过多的重新编码.类似于以下内容:
i have a quicktime where there is a serious time-lag between audio and video.now i want to shift the audio-track by some milliseconds, but without doing too much re-encoding.something like the following:
gst-launch filesrc location="${INFILE}" \
! qtdemux name=demux \
! videorate force-fps=25 \
! qtmux name=mux \
! filesink location="${OUTFILE}" \
demux.audio_00 \
! queue \
! mad \
! audioconvert \
! ladspa-delay-n Delay-Time=322 \
! audioconvert \
! lame bitrate=224 \
! mux.
有什么想法可以让我的管道播放吗?
any ideas how i can get my pipeline PLAYing?
推荐答案
最后,我发现造成停滞管道的原因是上限协商问题.为每个预期从解复用器中流出的流指定上限将使其正常工作:
finally i found out that the cause for my stalling pipeline is a caps-negotiation problem.specifying caps for each stream that is expected to come out of the demuxer makes it work:
gst-launch filesrc location="${INFILE}" \
! qtdemux name=demux \
! queue \
! video/jpeg \
! qtmux name=mux \
! filesink location="${OUTFILE}" \
demux.audio_00 \
! queue \
! audio/mpeg \
! mux.audio_0
这篇关于使用gstreamer重新复用流,从而在PREROLLING中停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!