[FFmpeg-trac] #8375(ffmpeg:new): FFmpeg produces m4a file unplayable by portable music player
FFmpeg
trac at avcodec.org
Mon Nov 11 16:48:59 EET 2019
#8375: FFmpeg produces m4a file unplayable by portable music player
--------------------------------+----------------------------------
Reporter: Nslw | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: 4.1.4
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+----------------------------------
Summary of the bug:
FFmpeg merely copying AAC stream into new container makes the file
unplayable for my portable music player.
How to reproduce:
I've got an audio file for which
ffprobe originalFile.m4a
gives
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
My portable player recognizes it as music and is able to play it. After
doing
ffmpeg -i originalFile.m4a -vn -sn -dn -acodec copy convertedFile.m4a
I get a new audio file. My portable player doesn't recognize it as music
and isn't able to play it, although desktop players have no troubles
playing it.
Command
ffprobe convertedFile.m4a
gives
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
To make it recognizable and playable on my portable player I do
MP4Box -brand M4A:0 -rb isom -rb iso2 convertedFile.m4a
Command
ffprobe convertedFile.m4a
now gives
Metadata:
major_brand : M4A:
minor_version : 0
compatible_brands: M4A mp42M4A:
It wouldn't work if I only invoked one of below commands:
MP4Box -brand M4A:0 convertedFile.m4a
MP4Box -brand M4A:0 -rb isom convertedFile.m4a
MP4Box -brand M4A:0 -rb iso2 convertedFile.m4a
MP4Box -rb isom -rb iso2 convertedFile.m4a
MP4Box -rb isom convertedFile.m4a
MP4Box -rb iso2 convertedFile.m4a
Afterwards I could call
MP4Box -brand M4A:0 -ab isom -ab iso2 convertedFile.m4a
and the file would be playable as well.
Command
ffprobe convertedFile.m4a
would then give
Metadata:
major_brand : M4A:
minor_version : 0
compatible_brands: M4A mp42M4A:isomiso2
I see two culprits here:
1) compatible_brands should contain M4A as its first entry
2) minor_version should be 0 instead of 512
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8375>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list