diff options
author | wm4 <wm4@nowhere> | 2019-05-31 16:24:06 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:05 +0200 |
commit | 8812530b312c8beeaeefdaaa54fc26cf779cb3c2 (patch) | |
tree | f56ac62296c518e3df0bcb0341bada5c3c19f6d2 /DOCS/man | |
parent | da6e862c4fff9b33996607ce7ab18d3714704620 (diff) | |
download | mpv-8812530b312c8beeaeefdaaa54fc26cf779cb3c2.tar.bz2 mpv-8812530b312c8beeaeefdaaa54fc26cf779cb3c2.tar.xz |
demux: more backwards playback preroll packets for vorbis and mp3
Together with the previous commit, this seems to make backward playback
work in files with vorbis and mp3 audio codecs.
For Vorbis (with libavcodec's decoder, didn't test libvorbis), the first
packet was just always completely discarded. This happened even though
we tell libavcodec that we do discarding of padding manually. It simply
happened inside the codec, not libavcodec's general initial padding
handling. In addition, the first output decoded frame seems to contain
partial data. (Unlike the opus decoder, it doesn't report any padding at
all.)
The Opus decoder (again libavcodec only tested) reports an initial
padding, but it appears to be too small, and it sounds right only with 2
packets discarded. So its status doesn't change.
I'm not sure why I need 2 frames for mp3, but with that value I had
success on the samples I tested.
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/options.rst | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index f0d138ec1c..0a081c3363 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -493,13 +493,6 @@ Playback Control framestep commands are transposed. Backstepping will perform very expensive work to step forward by 1 frame. - - Backward playback with Vorbis does not work. libavcodec's decoder - discards the first Vorbis packet (after each decoder reset), and the - mechanism behind ``--audio-reversal-buffer`` assumes that it strictly - outputs a frame for each packet fed to it (the mechanism discards output - based on frame count, not timestamps). Since this tries to decode each - frame on its own, the player never gets a usable audio frame. - Tuning: - Remove all ``--vf``/``--af`` filters you have set. Disable deinterlacing. @@ -565,8 +558,8 @@ Playback Control The solution is to feed a previous packet to the decoder each time, and then discard the output. This option controls how many packets to feed. The ``auto`` choice is currently hardcoded to 0 for video, and uses 1 for lossy - audio, 0 for lossless audio. As a hack, it sets it to 2 for Opus, which - requires this for unknown reasons. + audio, 0 for lossless audio. For some specific lossy audio codecs, this is + set to 2. ``--video-backward-overlap`` can potentially handle intra-refresh video, depending on the exact conditions. You may have to use the |