问题
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
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)
to give a bit mor context:
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?
回答1:
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
来源:https://stackoverflow.com/questions/12983043/remultiplexing-a-stream-with-gstreamer-stops-in-prerolling