• Timo Teräs's avatar
    avformat/movenc: support writing iTunes cover image · 9af71b32
    Timo Teräs authored
    Fixes https://trac.ffmpeg.org/ticket/2798
    
    This makes movenc handle AV_DISPOSITION_ATTACHED_PIC and write
    the associated pictures in iTunes cover atom. This corresponds
    to how 'mov' demuxer parses and exposes the cover images when
    reading.
    
    Most of the existing track handling loops properly ignore
    these 'virtual streams' as MOVTrack->entry is never incremented
    for them. However, additional tests are added as needed to ignore
    them.
    
    Tested to produce valid output with:
      ffmpeg -i movie.mp4 -i thumb.jpg -disposition:v:1 attached_pic \
             -map 0 -map 1 -c copy movie-with-cover.mp4
    
    The cover image is also copied correctly with:
      ffmpeg -i movie-with-cover.mp4 -map 0 -c copy out.mp4
    
    AtomicParseley says that the attached_pic stream is properly
    not visible in the main tracks of the file.
    Signed-off-by: 's avatarTimo Teräs <timo.teras@iki.fi>
    9af71b32
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools 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...
configure Loading commit data...