Search code examples
ffmpegmp3

how to choose ffmpeg video mp3 audio version id?


I am having issues on ffmpeg encoded video files audio tracks. My encoded video contains ID for audio track as extracted from mediainfo:

I use CODEC_ID_MP3 in guess_format "mov" container for quicktime

Audio
ID                                       : 2
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Codec ID                                 : .mp3
Duration                                 : 2s 916ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 16.0 KHz
Compression mode                         : Lossy
Stream size                              : 45.3 KiB (2%)
Language                                 : English

This is not recognized on a vanilla codecless installation of windows 7, only played by k-lite codec libmad

I have noticed, that another test file contains similar mp3 track and is played by media player OK:

Audio
ID                                       : 2
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Mode                                     : Joint stereo
Mode extension                           : MS Stereo
Codec ID                                 : 6B
Duration                                 : 1mn 9s
Bit rate mode                            : Constant
Bit rate                                 : 320 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 2.67 MiB (38%)
Writing library                          : LAME3.98

The difference I noticed is in Format version number and Codec ID, which is Version 2 from ffmpeg output - I couldnt locate this version setting in ffmpeg source files, so my question is - is there a way to influence this format version identificator and set the codec id as in above playable video?


Solution

  • I had to hack ffmpeg sources to change the codec ID to the one I needed