remultiplexing a stream with gstreamer stops in PREROLLING

让人想犯罪 __ 提交于 2019-12-13 04:54:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!