From 7bfb240309225fa6fb4e51a0deda8fd8e34953e0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 12 Apr 2018 22:08:56 +0200 Subject: f_lavfi: add an option to use old audio PTS handling for af_lavfi The fix-pts option basically uses the old af_lavfi's (before filter rewrite) timestamp logic. The rest is explained in the manpage. --- DOCS/interface-changes.rst | 2 +- DOCS/man/af.rst | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index e3d50021ed..576a472cd0 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -68,7 +68,7 @@ Interface changes - if filters do not pass through PTS values correctly, A/V sync can result over time. Some libavfilter filters are known to be affected by this, such as af_loudnorm, which can desync over time, depending on - how the audio track was muxed. + how the audio track was muxed (af_lavfi's fix-pts suboption can help). - remove out-format sub-parameter from "format" audio filter (no replacement) - --lavfi-complex now requires uniquely named filter pads. In addition, unconnected filter pads are not allowed anymore (that means every filter diff --git a/DOCS/man/af.rst b/DOCS/man/af.rst index 93a25cd4bb..4e806d482e 100644 --- a/DOCS/man/af.rst +++ b/DOCS/man/af.rst @@ -245,3 +245,16 @@ Available filters are: ``o=`` AVOptions. + + ``fix-pts=`` + Determine PTS based on sample count (default: no). If this is enabled, + the player won't rely on libavfilter passing through PTS accurately. + Instead, it pass a sample count as PTS to libavfilter, and compute the + PTS used by mpv based on that and the input PTS. This helps with filters + which output a recomputed PTS instead of the original PTS (including + filters which require the PTS to start at 0). mpv normally expects + filters to not touch the PTS (or only to the extent of changing frame + boundaries), so this is not the default, but it will be needed to use + broken filters. In practice, these broken filters will either cause slow + A/V desync over time (with some files), or break playback completely if + you seek or start playback from the middle of a file. -- cgit v1.2.3