Reputation: 2892
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?
Upvotes: 1
Views: 1233
Reputation: 60853
Version 1 only supports sample frequencies of 32 kHz, 44.1 kHz, and 48 kHz. For 16 kHz you need version 2, or you could resample to 32 kHz (-ar 32k
) if you need version 1.
If necessary you can override the codec id with -atag
id (and -strict unofficial
if you are doing something contrary to the standard and want ffmpeg to not be bothered by that).
Upvotes: 0
Reputation: 2892
I had to hack ffmpeg sources to change the codec ID to the one I needed
Upvotes: 0