ffmpeg/doc
Anton Khirnov 4740fea7dd fftools/ffmpeg: rework -shortest implementation
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.
2022-07-23 11:53:19 +02:00
..
dev_community
doxy
examples doc/examples/transcode_aac: Bump date 2022-05-02 15:01:15 +05:30
.gitignore
APIchanges lavu/frame: add a duration field to AVFrame 2022-07-19 12:27:17 +02:00
Doxyfile
Makefile doc: fix css file install for out-of-tree builds 2022-04-19 13:04:42 +02:00
authors.texi
bitstream_filters.texi lavc/pgs_frame_merge_bsf: add bsf to merge PGS segments 2022-05-10 10:03:30 +02:00
bootstrap.min.css
build_system.txt
codecs.texi
decoders.texi doc/decoders: add docs for v210 decoder 2022-06-20 22:56:50 +02:00
default.css
demuxers.texi avformat/hls: add #EXT-X-START tag support by prefer_x_start opt 2022-06-29 14:03:36 +08:00
developer.texi
devices.texi
doxy-wrapper.sh
encoders.texi libavcodec/qsvenc: Use parameter from AVCodecContext to reset qsv codec 2022-07-20 12:35:23 +08:00
errno.txt
faq.texi
fate.texi doc/fate: add note about showing test names and running a tests subset 2022-04-06 09:22:31 +02:00
fate_config.sh.template
ffmpeg-bitstream-filters.texi
ffmpeg-codecs.texi
ffmpeg-devices.texi
ffmpeg-filters.texi
ffmpeg-formats.texi
ffmpeg-protocols.texi
ffmpeg-resampler.texi
ffmpeg-scaler.texi
ffmpeg-utils.texi
ffmpeg.texi fftools/ffmpeg: rework -shortest implementation 2022-07-23 11:53:19 +02:00
ffmpeg.txt
ffplay.texi doc/ffplay: put keystrokes to decrease and increase volume on the same line 2022-04-21 12:28:05 +05:30
ffprobe.texi ffprobe: add -o option 2022-06-13 22:42:55 +02:00
ffprobe.xsd ffprobe: print AVFrame.duration 2022-07-19 12:27:18 +02:00
fftools-common-opts.texi cmdutils: add an option for listing stream dispositions 2021-11-16 10:51:32 +01:00
filter_design.txt
filters.texi lavfi: use AVFrame.duration instead of AVFrame.pkt_duration 2022-07-19 12:27:17 +02:00
formats.texi
general.texi
general_contents.texi avcodec: add Radiance HDR image format support 2022-07-16 21:43:54 +02:00
git-howto.texi
indevs.texi avdevice/pulse_audio_dec: deprecate frame_size option 2022-06-16 21:28:20 +02:00
issue_tracker.txt
lexicon
libav-merge.txt
libavcodec.texi
libavdevice.texi
libavfilter.texi
libavformat.texi
libavutil.texi
libswresample.texi
libswscale.texi
mailing-list-faq.texi
metadata.texi
mips.txt
multithreading.txt
muxers.texi avformat/hlsenc: Use HLS version 2 if rounded durations are enabled 2022-06-29 14:03:32 +08:00
nut.texi
optimization.txt
outdevs.texi
patchwork
platform.texi
print_options.c
protocols.texi avformat/librist: allow setting fifo size and fail on overflow 2022-06-09 23:57:20 +02:00
rate_distortion.txt
resampler.texi
scaler.texi
snow.txt
style.min.css
swresample.txt
swscale.txt
t2h.init
t2h.pm doc/t2h.pm: fix missing TOC with texinfo 6.8 and above 2021-11-14 09:30:06 +05:30
tablegen.txt
texi2pod.pl
texidep.pl
transforms.md
undefined.txt
utils.texi doc/utils: add missing 22.2 layout entry 2022-03-25 09:26:45 -03:00
writing_filters.txt