Reputation: 114
Im trying to transcode mp3 files into wav format, so that they can be used in another script. The script requires the file to be 44.1Khz, so i add that to ffmpeg command.
The problem comes when a file has an embedded cover image:
Duration: 00:05:53.85, start: 0.000000, bitrate: 319 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s Stream #0:1: Video: mjpeg, gray, 938x936 [SAR 300:300 DAR 469:468], 90k tbr, 90k tbn, 90k tbc Metadata: title : comment : Cover (front) Stream #0:2: Video: mjpeg, yuvj420p, 88x31 [SAR 96:96 DAR 88:31], 90k tbr, 90k tbn, 90k tbc Metadata: title : comment : Cover (front)
The ffmpeg command i use is:
ffmpeg -loglevel warning -y -i :source -vn -ac 2 -ar 44100 -f wav :dest
So when transcoding a file this throws warnings:
[mp3 @ 0xa0bba60] Format mp3 detected only with low score of 24, misdetection possible!
[mp3 @ 0xa0bba60] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0xa0bba60] Estimating duration from bitrate, this may be inaccurate
The resulting wav file has some problems (perhaps wrong header info?), i think it reports to have more frames than are in the file so the follow-up script overshoots the end of data.
I believe the problem is with extra streams (cover images) in the mp3 file, but i cant seem to tell ffmpeg to just deal with audio.
The file i am using for the example is: 07-Zimmer070-KOSMORAUM-_Junior85-For_reason_forgotten.mp3 (http://archive.org/details/ZIMMER070)
And the ffmpeg is the latest from their git repo: git://source.ffmpeg.org/ffmpeg.git
Many thanks for any info in advance!
Upvotes: 2
Views: 2261