Есть битый mp3 файл, на компе и в плеерах он проигрывается спорадически, mp3check -e test_000/input.mp3 --show-valid -s выдаёт 9085 строчек такого вида:
test_000/input.mp3: frame 26179/15:42: bitrate switching (160 -> 128) test_000/input.mp3: frame 26180/15:42: bitrate switching (128 -> 160) test_000/input.mp3: frame 26181/15:42: bitrate switching (160 -> 128) test_000/input.mp3: frame 26184/15:42: bitrate switching (128 -> 160) test_000/input.mp3: frame 26185/15:42: bitrate switching (160 -> 128) test_000/input.mp3: frame 26186/15:42: bitrate switching (128 -> 160) test_000/input.mp3: frame 26190/15:42: bitrate switching (160 -> 128) test_000/input.mp3: frame 26194/15:42: bitrate switching (128 -> 160) test_000/input.mp3: frame 26195/15:43: bitrate switching (160 -> 128) test_000/input.mp3: frame 26199/15:43: bitrate switching (128 -> 160) test_000/input.mp3: frame 26200/15:43: bitrate switching (160 -> 128) test_000/input.mp3: frame 26204/15:43: bitrate switching (128 -> 160) test_000/input.mp3: frame 26205/15:43: bitrate switching (160 -> 128) test_000/input.mp3: frame 26209/15:43: bitrate switching (128 -> 160) test_000/input.mp3: frame 26213/15:43: bitrate switching (160 -> 128) test_000/input.mp3: frame 26234/15:44: bitrate switching (128 -> 160) test_000/input.mp3: frame 26235/15:44: bitrate switching (160 -> 128) test_000/input.mp3: frame 26236/15:44: bitrate switching (128 -> 160) test_000/input.mp3: frame 26238/15:44: bitrate switching (160 -> 128) test_000/input.mp3: frame 26239/15:44: bitrate switching (128 -> 160) test_000/input.mp3: frame 26241/15:44: bitrate switching (160 -> 128) test_000/input.mp3: frame 26278/15:46: bitrate switching (128 -> 160) test_000/input.mp3: frame 26279/15:46: bitrate switching (160 -> 128) test_000/input.mp3: frame 26299/15:46: bitrate switching (128 -> 160) test_000/input.mp3: frame 26300/15:46: bitrate switching (160 -> 32)
С помощью:
ffmpeg -i input.mp3 newfile.mp3 ; mp3check --cut-junk-start newfile.mp3
удаётся пофиксить
$mp3check -e newfile.mp3 --show-valid -s
newfile.mp3: valid audio mpeg stream
Но теряется битрейт:
input.mp3: MPEG ADTS, layer III, v1, 128 kbps, 32 kHz, Stereo
newfile.mp3: MPEG ADTS, layer III, v1, 96 kbps, 32 kHz, JntStereo
И откуда взялось JntStereo?