• wm4's avatar
    avformat, ffmpeg: deprecate old rotation API · ddef3d90
    wm4 authored
    The old "API" that signaled rotation as a metadata value has been
    replaced by DISPLAYMATRIX side data quite a while ago.
    
    There is no reason to make muxers/demuxers/API users support both. In
    addition, the metadata API is dangerous, as user tags could "leak" into
    it, creating unintended features or bugs.
    
    ffmpeg CLI has to be updated to use the new API. In particular, we must
    not allow to leak the "rotate" tag into the muxer. Some muxers will
    catch this properly (like mov), but others (like mkv) can add it as
    generic tag. Note applications, which use libavformat and assume the
    old rotate API, will interpret such "rotate" user tags as rotate
    metadata (which it is not), and incorrectly rotate the video.
    
    The ffmpeg/ffplay tools drop the use of the old API for muxing and
    demuxing, as all muxers/demuxers support the new API. This will mean
    that the tools will not mistakenly interpret per-track "rotate" user
    tags as rotate metadata. It will _not_ be treated as regression.
    
    Unfortunately, hacks have been added, that allow the user to override
    rotation by setting metadata explicitly, e.g. via
    
      -metadata:s:v:0 rotate=0
    
    See references to trac #4560. fate-filter-meta-4560-rotate0 tests this.
    It's easier to adjust the hack for supporting it than arguing for its
    removal, so ffmpeg CLI now explicitly catches this case, and essentially
    replaces the "rotate" value with a display matrix side data. (It would
    be easier for both user and implementation to create an explicit option
    for rotation.)
    
    When the code under FF_API_OLD_ROTATE_API is disabled, one FATE
    reference file has to be updated (because "rotate" is not exported
    anymore).
    Tested-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    ddef3d90
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_cuvid.c Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_qsv.c Loading commit data...
ffmpeg_vaapi.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...