8

With this command

    for file in *.flac; do \
       ffmpeg -i $file \
       -codec:a libmp3lame -qscale:a 6 \
       "${file%.*}.mp3"; \
    done

I converted flac files to mp3. But I get the following message:

[swscaler @ 0x55b43902b900] deprecated pixel format used, make sure you did set range correctly
[mp3 @ 0x55b438d08d00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2

The flac files have an emmbed jpg Cover with 1976x1772 pixels. Maybe it has something to do with the Cover? If somebody could help me to find out what this message means, I would be very happy.

Thanks John

3 Answers 3

7

FFmpeg will treat attached pictures such as cover images as regular streams and its MP3 muxer defaults to constant frame-rate which is leading to frame duplication. The solution is to change video sync method to passthrough, so

for file in *.flac; do \
   ffmpeg -i $file \
   -vsync 0 -codec:a libmp3lame -qscale:a 6 \
   "${file%.*}.mp3"; \
done
3
  • Thanks for your answer. With your solution, I now get the first part of the output message. "[swscaler @ 0x55b43902b900] deprecated pixel format used, make sure you did set range correctly"
    – john-soda
    Aug 2, 2018 at 11:30
  • 3
    Not an issue. ffmpeg is primarily for video transcoding. Cover/still images have a different color range so the scaler is printing a precautionary msg.
    – Gyan
    Aug 2, 2018 at 11:52
  • Great and concise explanation. Sep 22, 2021 at 17:06
2

Public note to self: When going -c:a libmp3lame -q:a 5 on 320kb/s input (down to quality 5 ~130kb/s), I noticed that FFmpeg (version 4.3.1, built 20200726) blew up efficient 20KB JPEGs into wasteful 300KB PNGs. I expected plain copy, which is arguably a more reasonable default in this case. Solution is to specify either -c:v copy to do just that or -vn to exclude the image altogether.

0

I've been using somewhat like yours with no problems this is the line I use:

find -name "*.${format}" -exec bash -c 'ffmpeg -i "{}" -y -vsync 0 -c:v copy -acodec libmp3lame -ab '${BITRATE}'k "${0/.'${format}'}.mp3"' {} \;

I made a small bash script do deal with my media a little easier... maybe you wanna take a look https://github.com/surtarso/bash-media-manager

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .