将m4a转换为aac并在Windows 7上保留元数据

时间:2014-11-23 23:46:02

标签: ffmpeg aac m4a id3-tag

我想将m4a文件转换为aac *。我可以这样做:

ffmpeg -i song.m4a -acodec copy song.aac

但在Windows 7上,元数据不兼容。似乎应该使用-id3v2_version 3标志,以便使用Windows兼容的ID3标签版本2.3:

ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac

但是,使用上面的命令我仍然没有在song.aac中获得任何元数据。我使用Windows文件浏览器,mp3tag和winamp来确认没有标签。

*:原因; m4a将无法在汽车音响上播放,因此请遵循此建议(http://www.vwaudiforum.co.uk/forum/showthread.php?153728-Tip-Getting-M4A-(iTunes)-format-music-to-play-on-a-VW-head-unit

控制台输出:

C:\temp>ffmpeg -i song.m4a -acodec copy -id3v2_version 3 song.aac
ffmpeg version N-67914-gf87a344 Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov 22 2014 22:10:18 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
opencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.100 / 56. 15.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002dcc760] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'song.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 0
    compatible_brands: M4A mp42isom
    creation_time   : 1980-07-20 13:32:00
    iTunSMPB        :  00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000
    iTunNORM        :  0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
    title           : Time Away
    artist          : Andy Stott
    album_artist    : Andy Stott
    album           : Faith In Strangers
    genre           : Electronic
    track           : 1/9
    disc            : 1/1
    compilation     : 0
    gapless_playback: 0
    date            : 2014-11-17T08:00:00Z
    copyright       : Ôäù 2014 Modern Love
    media_type      : 1
    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?>
                    : <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.d
td">
                    : <plist version="1.0">
                    : <dict>
                    :   <key>asset-info</key>
                    :   <dict>
                    :           <key>file-size</key>
                    :           <integer>14359364</integer>
                    :           <key>flavor</key>
                    :           <string>2:256</string>
                    :   </dict>
                    : </dict>
                    : </plist>
                    :
  Duration: 00:06:24.20, start: 0.000000, bitrate: 298 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 285 kb/s (default)
    Metadata:
      creation_time   : 1980-07-20 13:32:00
    Stream #0:1: Video: mjpeg, gray(bt470bg/unknown/unknown), 1400x1400 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc

Output #0, adts, to 'song.aac':
  Metadata:
    major_brand     : M4A
    minor_version   : 0
    compatible_brands: M4A mp42isom
    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?>
                    : <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.d
td">
                    : <plist version="1.0">
                    : <dict>
                    :   <key>asset-info</key>
                    :   <dict>
                    :           <key>file-size</key>
                    :           <integer>14359364</integer>
                    :           <key>flavor</key>
                    :           <string>2:256</string>
                    :   </dict>
                    : </dict>
                    : </plist>
                    :
    iTunSMPB        :  00000000 00000840 0000007C 0000000001027F44 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000
    iTunNORM        :  0000061A 0000052A 00001C40 000021EE 00035E0A 00046912 00007B8C 00007B99 0002845B 00024D35
    title           : Time Away
    artist          : Andy Stott
    album_artist    : Andy Stott
    album           : Faith In Strangers
    genre           : Electronic
    track           : 1/9
    disc            : 1/1
    compilation     : 0
    gapless_playback: 0
    date            : 2014-11-17T08:00:00Z
    copyright       : Ôäù 2014 Modern Love
    media_type      : 1
    encoder         : Lavf56.15.100
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 285 kb/s (default)
    Metadata:
      creation_time   : 1980-07-20 13:32:00
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=   13523kB time=00:06:24.19 bitrate= 288.3kbits/s
video:0kB audio:13410kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.843272%

C:\temp>

1 个答案:

答案 0 :(得分:1)

文件无法在汽车音响上播放的原因可能不是M4A,它可能是快速启动

FFmpeg corrupts iTunes files