Opened 5 years ago

Last modified 5 years ago

#3623 reopened defect

Mixed results writing M4A metadata

Reported by: svnpenn Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: mov metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Given this file
http://bitbucket.org/svnpenn/a/downloads/superuser.mp4
I am having mixed results writing metadata. For example these commands

ffmpeg -i superuser.mp4 -c copy good.aac
ffmpeg -i good.aac -c copy -bsf aac_adtstoasc -metadata title=Confetti \
  -movflags faststart good.m4a

Will generate an M4A file that plays correctly with metadata that is recognized. However this command

ffmpeg -i superuser.mp4 -c copy -vn -movflags faststart \
  -metadata title=Confetti bad.m4a

Generates a file that plays correctly, but my player does not recognize the
metadata. Note I also tried adding -bsf aac_adtstoasc to the bad command to no
avail. How can I tweak the second command to get it working?

Command-line output
http://gist.github.com/svnpenn/82e7f7685084759c7483

Source question
http://superuser.com/q/750627

Attachments (2)

confetti.mp4 (2.0 MB) - added by svnpenn 5 years ago.
planes.mp4 (349.5 KB) - added by svnpenn 5 years ago.

Change History (12)

comment:1 Changed 5 years ago by cehoyos

  • Keywords mov metadata added

Please post the command line that does not produce the expected output file together with the complete, uncut console output here to make this a valid ticket.

comment:2 follow-up: Changed 5 years ago by svnpenn

Last edited 5 years ago by svnpenn (previous) (diff)

comment:3 in reply to: ↑ 2 Changed 5 years ago by cehoyos

Replying to svnpenn:

@cehoyos , did you even read the ticket? Both the problem command and complete
output are already included.

Where? I am sorry, I was unable to see the console output in your ticket description.
Please always post the complete, uncut console output here, external resources may disappear.

comment:4 Changed 5 years ago by svnpenn

Last edited 5 years ago by svnpenn (previous) (diff)

comment:5 Changed 5 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

Please feel free to reopen this ticket if you can provide the missing information.

Changed 5 years ago by svnpenn

Changed 5 years ago by svnpenn

comment:6 Changed 5 years ago by svnpenn

@cehoyos my arrogance has cost me, I apologize. It seems "-f mp4" does not work
in all cases. I found that with the attached "confetti.mp4", only "-f mp4"
produced desired result while with "planes.mp4", only "-f ipod" or "-f f4v"
produce desired result.

comment:7 Changed 5 years ago by svnpenn

ffmpeg started on 2014-05-09 at 02:28:01
Report written to "ffmpeg-20140509-022801.log"
Command line:
"C:\\ffmpeg.exe" -i confetti.mp4 -c copy -vn -movflags faststart -metadata "title=Confetti" -report confetti.m4a
ffmpeg version git-2014-01-22-94a5241 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jan 21 2014 19:33:07 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --disable-doc --enable-nonfree --enable-libx264 --enable-libfdk-aac --arch=x86_64 --target-os=mingw32 --logfile=/dev/stdout --extra-ldflags=-static --cross-prefix=x86_64-w64-mingw32-
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 48.102 / 55. 48.102
  libavformat    55. 25.101 / 55. 25.101
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'confetti.mp4'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument 'faststart'.
Reading option '-metadata' ... matched as option 'metadata' (add metadata) with argument 'title=Confetti'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option 'confetti.m4a' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file confetti.mp4.
Successfully parsed a group of options.
Opening an input file: confetti.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000001846c60] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000001846c60] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000001846c60] Before avformat_find_stream_info() pos: 2055829 bytes read:39809 seeks:1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000001846c60] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000001846c60] After avformat_find_stream_info() pos: 819 bytes read:72577 seeks:2 frames:2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'confetti.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.25.101
  Duration: 00:00:10.01, start: 0.000000, bitrate: 1643 kb/s
    Stream #0:0(und), 1, 1/24000: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1444 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 1, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output file confetti.m4a.
Applying option c (codec name) with argument copy.
Applying option vn (disable video) with argument 1.
Applying option metadata (add metadata) with argument title=Confetti.
Successfully parsed a group of options.
Opening an output file: confetti.m4a.
Successfully opened the file.
Output #0, ipod, to 'confetti.m4a':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Confetti
    encoder         : Lavf55.25.101
    Stream #0:0(und), 0, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.
[ipod @ 000000000418f6c0] Starting second pass: moving the moov atom to the beginning of the file
[AVIOContext @ 0000000001859ae0] Statistics: 240981 bytes read, 0 seeks
size=     238kB time=00:00:10.00 bitrate= 194.6kbits/s    

video:0kB audio:235kB subtitle:0 global headers:0kB muxing overhead 1.040919%
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 00000000018cfc60] Statistics: 32 seeks, 462 writeouts
[AVIOContext @ 000000000198fbc0] Statistics: 1856308 bytes read, 33 seeks

comment:8 Changed 5 years ago by svnpenn

ffmpeg started on 2014-05-09 at 02:29:04
Report written to "ffmpeg-20140509-022904.log"
Command line:
"C:\\ffmpeg.exe" -i planes.mp4 -c copy -vn -movflags faststart -metadata "title=Planes" -report planes.m4a
ffmpeg version git-2014-01-22-94a5241 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jan 21 2014 19:33:07 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --disable-doc --enable-nonfree --enable-libx264 --enable-libfdk-aac --arch=x86_64 --target-os=mingw32 --logfile=/dev/stdout --extra-ldflags=-static --cross-prefix=x86_64-w64-mingw32-
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 48.102 / 55. 48.102
  libavformat    55. 25.101 / 55. 25.101
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'planes.mp4'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument 'faststart'.
Reading option '-metadata' ... matched as option 'metadata' (add metadata) with argument 'title=Planes'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option 'planes.m4a' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file planes.mp4.
Successfully parsed a group of options.
Opening an input file: planes.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000336c20] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000336c20] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000336c20] Before avformat_find_stream_info() pos: 357849 bytes read:36726 seeks:1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000336c20] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000336c20] After avformat_find_stream_info() pos: 25214 bytes read:69494 seeks:2 frames:2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'planes.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.25.101
  Duration: 00:00:10.01, start: 0.000000, bitrate: 286 kb/s
    Stream #0:0(und), 1, 1/12288: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 90 kb/s, 6 fps, 6 tbr, 12288 tbn, 12 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 1, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output file planes.m4a.
Applying option c (codec name) with argument copy.
Applying option vn (disable video) with argument 1.
Applying option metadata (add metadata) with argument title=Planes.
Successfully parsed a group of options.
Opening an output file: planes.m4a.
Successfully opened the file.
Output #0, ipod, to 'planes.m4a':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Planes
    encoder         : Lavf55.25.101
    Stream #0:0(und), 0, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.
[ipod @ 000000000033f0e0] Starting second pass: moving the moov atom to the beginning of the file
[AVIOContext @ 000000000033e4a0] Statistics: 240441 bytes read, 0 seeks
size=     237kB time=00:00:10.00 bitrate= 194.2kbits/s    

video:0kB audio:235kB subtitle:0 global headers:0kB muxing overhead 1.042425%
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 00000000003bfc00] Statistics: 32 seeks, 462 writeouts
[AVIOContext @ 00000000003dfbc0] Statistics: 364281 bytes read, 4 seeks

comment:9 Changed 5 years ago by svnpenn

  • Resolution needs_more_info deleted
  • Status changed from closed to reopened

comment:10 Changed 5 years ago by svnpenn

This command also works

ffmpeg -i confetti.mp4 -c copy -f adts - |
ffmpeg -i - -c copy -bsf aac_adtstoasc -movflags faststart \
  -metadata title=Confetti good.m4a

Note, this issue was discussed over 3 years ago

http://lists.infradead.org/pipermail/get_iplayer/2011-March/001171.html

Note: See TracTickets for help on using tickets.