mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
4740fea7dd
The -shortest option (which finishes the output file at the time the shortest stream ends) is currently implemented by faking the -t option when an output stream ends. This approach is fragile, since it depends on the frames/packets being processed in a specific order. E.g. there are currently some situations in which the output file length will depend unpredictably on unrelated factors like encoder delay. More importantly, the present work aiming at splitting various ffmpeg components into different threads will make this approach completely unworkable, since the frames/packets will arrive in effectively random order. This commit introduces a "sync queue", which is essentially a collection of FIFOs, one per stream. Frames/packets are submitted to these FIFOs and are then released for further processing (encoding or muxing) when it is ensured that the frame in question will not cause its stream to get ahead of the other streams (the logic is similar to libavformat's interleaving queue). These sync queues are then used for encoding and/or muxing when the -shortest option is specified. A new option – -shortest_buf_duration – controls the maximum number of queued packets, to avoid runaway memory usage. This commit changes the results of the following tests: - copy-shortest[12]: the last audio frame is now gone. This is correct, since it actually outlasts the last video frame. - shortest-sub: the video packets following the last subtitle packet are now gone. This is also correct. |
||
---|---|---|
.. | ||
aac.mak | ||
ac3.mak | ||
acodec.mak | ||
adpcm.mak | ||
alac.mak | ||
als.mak | ||
amrnb.mak | ||
amrwb.mak | ||
api.mak | ||
apng.mak | ||
atrac.mak | ||
audio.mak | ||
bmp.mak | ||
build.mak | ||
caf.mak | ||
canopus.mak | ||
cbs.mak | ||
cdxl.mak | ||
checkasm.mak | ||
concatdec.mak | ||
cover-art.mak | ||
dca.mak | ||
demux.mak | ||
dfa.mak | ||
dnn.mak | ||
dnxhd.mak | ||
dpcm.mak | ||
dvvideo.mak | ||
ea.mak | ||
exif.mak | ||
ffmpeg.mak | ||
ffprobe.mak | ||
fft.mak | ||
fifo-muxer.mak | ||
filter-audio.mak | ||
filter-video.mak | ||
fits.mak | ||
flac.mak | ||
flvenc.mak | ||
gapless.mak | ||
gif.mak | ||
h264.mak | ||
hap.mak | ||
hevc.mak | ||
hlsenc.mak | ||
hw.mak | ||
id3v2.mak | ||
image.mak | ||
imf.mak | ||
indeo.mak | ||
lavf-audio.mak | ||
lavf-container.mak | ||
lavf-image2pipe.mak | ||
lavf-image.mak | ||
lavf-video.mak | ||
libavcodec.mak | ||
libavdevice.mak | ||
libavformat.mak | ||
libavutil.mak | ||
libswresample.mak | ||
libswscale.mak | ||
lossless-audio.mak | ||
lossless-video.mak | ||
matroska.mak | ||
microsoft.mak | ||
monkeysaudio.mak | ||
mov.mak | ||
mp3.mak | ||
mpc.mak | ||
mpeg4.mak | ||
mpegps.mak | ||
mpegts.mak | ||
mxf.mak | ||
oma.mak | ||
opus.mak | ||
pcm.mak | ||
pixfmt.mak | ||
pixlet.mak | ||
probe.mak | ||
prores.mak | ||
qt.mak | ||
qtrle.mak | ||
real.mak | ||
screen.mak | ||
seek.mak | ||
segment.mak | ||
source-check.sh | ||
source.mak | ||
speedhq.mak | ||
subtitles.mak | ||
truehd.mak | ||
utvideo.mak | ||
vbn.mak | ||
vcodec.mak | ||
video.mak | ||
voice.mak | ||
vorbis.mak | ||
vpx.mak | ||
vqf.mak | ||
wavpack.mak | ||
webm-dash-manifest.mak | ||
wma.mak | ||
xvid.mak |