[FFmpeg-trac] #2798(avformat:closed): Write cover art to mov files

FFmpeg trac at avcodec.org
Thu Oct 25 22:40:39 EEST 2018


#2798: Write cover art to mov files
-------------------------------------+------------------------------------
             Reporter:  svnpenn      |                    Owner:
                 Type:  enhancement  |                   Status:  closed
             Priority:  wish         |                Component:  avformat
              Version:  git-master   |               Resolution:  fixed
             Keywords:  mov          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by vn.khangnt):

 Still facing this problem, is it really fixed?


 {{{
 ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
   built with Apple LLVM version 10.0.0 (clang-1000.10.44.2)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2_1 --enable-shared
 --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-
 avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay
 --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy
 --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-
 openssl --enable-videotoolbox --enable-nonfree
   libavutil      56. 14.100 / 56. 14.100
   libavcodec     58. 18.100 / 58. 18.100
   libavformat    58. 12.100 / 58. 12.100
   libavdevice    58.  3.100 / 58.  3.100
   libavfilter     7. 16.100 /  7. 16.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  1.100 /  5.  1.100
   libswresample   3.  1.100 /  3.  1.100
   libpostproc    55.  1.100 / 55.  1.100
 Splitting the commandline.
 Reading option '-i' ... matched as input url with argument 'test.m4a'.
 Reading option '-i' ... matched as input url with argument 'cover.jpeg'.
 Reading option '-map' ... matched as option 'map' (set input stream
 mapping) with argument '0'.
 Reading option '-map' ... matched as option 'map' (set input stream
 mapping) with argument '1'.
 Reading option '-c' ... matched as option 'c' (codec name) with argument
 'copy'.
 Reading option 'out.m4a' ... matched as output url.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Successfully parsed a group of options.
 Parsing a group of options: input url test.m4a.
 Successfully parsed a group of options.
 Opening an input file: test.m4a.
 [NULL @ 0x7fcfc9007400] Opening 'test.m4a' for reading
 [file @ 0x7fcfc741a000] Setting default whitelist 'file,crypto'
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] Format mov,mp4,m4a,3gp,3g2,mj2
 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] ISO: File Type Major Brand: M4A
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] Unknown dref type 0x206c7275
 size 12
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] Processing st: 0, edit list 0 -
 media time: 0, duration: 13549593
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] Before
 avformat_find_stream_info() pos: 4877049 bytes read:86458 seeks:1
 nb_streams:1
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fcfc9007400] After
 avformat_find_stream_info() pos: 404 bytes read:119226 seeks:2 frames:1
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     creation_time   : 2018-10-22T05:56:39.000000Z
     encoder         : Lavf57.71.100
   Duration: 00:05:07.25, start: 0.000000, bitrate: 126 kb/s
     Stream #0:0(eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D),
 44100 Hz, stereo, fltp, 125 kb/s (default)
     Metadata:
       creation_time   : 2018-10-22T05:56:39.000000Z
       handler_name    : SoundHandler
 Successfully opened the file.
 Parsing a group of options: input url cover.jpeg.
 Successfully parsed a group of options.
 Opening an input file: cover.jpeg.
 [NULL @ 0x7fcfc900a600] Opening 'cover.jpeg' for reading
 [file @ 0x7fcfc741af80] Setting default whitelist 'file,crypto'
 [image2 @ 0x7fcfc900a600] Format image2 probed with size=2048 and score=50
 [image2 @ 0x7fcfc900a600] Before avformat_find_stream_info() pos: 0 bytes
 read:23087 seeks:0 nb_streams:1
 [mjpeg @ 0x7fcfc900b800] marker=d8 avail_size_in_buf=23085
 [mjpeg @ 0x7fcfc900b800] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x7fcfc900b800] marker=db avail_size_in_buf=23083
 [mjpeg @ 0x7fcfc900b800] index=0
 [mjpeg @ 0x7fcfc900b800] qscale[0]: 3
 [mjpeg @ 0x7fcfc900b800] index=1
 [mjpeg @ 0x7fcfc900b800] qscale[1]: 6
 [mjpeg @ 0x7fcfc900b800] marker parser used 132 bytes (1056 bits)
 [mjpeg @ 0x7fcfc900b800] marker=c0 avail_size_in_buf=22949
 [mjpeg @ 0x7fcfc900b800] Changing bps from 0 to 8
 [mjpeg @ 0x7fcfc900b800] sof0: picture: 460x460
 [mjpeg @ 0x7fcfc900b800] component 0 2:2 id: 0 quant:0
 [mjpeg @ 0x7fcfc900b800] component 1 1:1 id: 1 quant:1
 [mjpeg @ 0x7fcfc900b800] component 2 1:1 id: 2 quant:1
 [mjpeg @ 0x7fcfc900b800] pix fmt id 22111100
 [mjpeg @ 0x7fcfc900b800] Format yuvj420p chosen by get_format().
 [mjpeg @ 0x7fcfc900b800] marker parser used 17 bytes (136 bits)
 [mjpeg @ 0x7fcfc900b800] marker=c4 avail_size_in_buf=22930
 [mjpeg @ 0x7fcfc900b800] marker parser used 0 bytes (0 bits)
 [mjpeg @ 0x7fcfc900b800] escaping removed 114 bytes
 [mjpeg @ 0x7fcfc900b800] marker=da avail_size_in_buf=22510
 [mjpeg @ 0x7fcfc900b800] marker parser used 22396 bytes (179168 bits)
 [mjpeg @ 0x7fcfc900b800] marker=d9 avail_size_in_buf=0
 [mjpeg @ 0x7fcfc900b800] decode frame unused 0 bytes
 [image2 @ 0x7fcfc900a600] After avformat_find_stream_info() pos: 23087
 bytes read:23087 seeks:0 frames:1
 Input #1, image2, from 'cover.jpeg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 4617 kb/s
     Stream #1:0, 1, 1/25: Video: mjpeg, 1 reference frame, yuvj420p(pc,
 bt470bg/unknown/unknown, center), 460x460, 0/1, 25 tbr, 25 tbn, 25 tbc
 Successfully opened the file.
 Parsing a group of options: output url out.m4a.
 Applying option map (set input stream mapping) with argument 0.
 Applying option map (set input stream mapping) with argument 1.
 Applying option c (codec name) with argument copy.
 Successfully parsed a group of options.
 Opening an output file: out.m4a.
 File 'out.m4a' already exists. Overwrite ? [y/N] y
 [file @ 0x7fcfc741d180] Setting default whitelist 'file,crypto'
 Successfully opened the file.
 [ipod @ 0x7fcfc900d600] Could not find tag for codec mjpeg in stream #1,
 codec not currently supported in container
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid argument
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #1:0 -> #0:1 (copy)
     Last message repeated 1 times
 [AVIOContext @ 0x7fcfc76004c0] Statistics: 0 seeks, 0 writeouts
 [AVIOContext @ 0x7fcfc741a140] Statistics: 119226 bytes read, 2 seeks
 [AVIOContext @ 0x7fcfc741e040] Statistics: 23087 bytes read, 0 seeks
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/2798#comment:13>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list