Opened 4 years ago

Last modified 2 months ago

#2798 open enhancement

Write cover art to mov files

Reported by: svnpenn Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

.m4a files support album art
.mp4 files support cover art

currently you can add the art in this way

atomicparsley infile.mp4 --artwork infile.png --overWrite

However once muxed with FFmpeg some changes happen

ffmpeg -i infile.mp4 -c copy -map 0 outfile.mp4
  1. The png stream changes from
png

to

png (m[0][0][0] / 0x006D)
  1. Thumbnail disappears, example http://superuser.com/a/524120
  1. If you open in VLC instead of just playing video it also opens a second window with the png
ffmpeg version N-37428-gf18d2df Copyright (c) 2000-2013 the FFmpeg developers
  built on May 23 2013 01:35:26 with gcc 4.8.0 (rubenvb-4.8.0)
  configuration: --enable-gpl --enable-libx264 --enable-nonfree --enable-libfdk-aac --arch=x86 --target-os=mingw32 --logfile=/dev/stdout --extra-ldflags=-static --cross-prefix=i686-w64-mingw32- --host-cc=i686-w64-mingw32-gcc
  libavutil      52. 28.100 / 52. 28.100
  libavcodec     55.  7.100 / 55.  7.100
  libavformat    55.  4.101 / 55.  4.101
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 63.101 /  3. 63.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 035e5f00] stream 0, timescale not set
[mov,mp4,m4a,3gp,3g2,mj2 @ 035e5f00] max_analyze_duration 5000000 reached at 5005031 microseconds
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infile.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.4.101
  Duration: 00:01:00.06, start: 0.000000, bitrate: 4923 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1040 [SAR 1:1 DAR 24:13], 4019 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2: Video: png, rgb24, 1920x1040 [SAR 1:1 DAR 24:13], 90k tbr, 90k tbn, 90k tbc
[mp4 @ 035f65c0] track 1: codec frame size is not set
Output #0, mp4, to 'outfile.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.4.101
    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1040 [SAR 1:1 DAR 24:13], q=2-31, 4019 kb/s, 23.98 fps, 16k tbn, 16k tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, 5.1(side), 384 kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2: Video: png (m[0][0][0] / 0x006D), rgb24, 1920x1040 [SAR 1:1 DAR 24:13], q=2-31, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame= 1440 fps=0.0 q=-1.0 Lq=-1.0 size=   36097kB time=00:01:00.00 bitrate=4928.4kbits/s    

video:33241kB audio:2812kB subtitle:0 global headers:0kB muxing overhead 0.118462%

Change History (7)

comment:1 Changed 4 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords mov added

Is this problem reproducible with current git head?

comment:2 Changed 4 years ago by svnpenn

If it helps, I tested it again with

ffmpeg version N-54802-gfc6de70 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 18 2013 18:07:01 with gcc 4.7.3 (GCC)

same result. If need be I can build from HEAD and try again.

comment:3 Changed 4 years ago by jamal

mov/mp4/m4a muxer currently doesn't support cover art.
A patch that implements this was submitted to ffmpeg-devel a few weeks ago.

This is the thread: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/165509

comment:5 Changed 4 years ago by cehoyos

  • Priority changed from normal to wish
  • Status changed from new to open
  • Type changed from defect to enhancement
  • Version changed from unspecified to git-master

comment:6 Changed 4 years ago by cehoyos

  • Summary changed from Unexpected behavior with cover art to Write cover art to mov files

comment:7 Changed 2 months ago by vitaly-zdanevich

Still no way to add a cover to the m4a?

Note: See TracTickets for help on using tickets.