You are not logged in.
The handy script used to convert flac to mp3 in the wiki [1] converts to the format V0.
I want to modify it to convert flac files to a fixed bitrate of 320,
but I cannot find the proper option in ffmpeg documentation.
the relevant line in the (very simple) is
< /dev/null ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}"now, the ffmpeg option -qscale: a is only valid for variable bitrate encodings.
What would be the option for fixed bitrate?
The closest suggestion I got is from ffmepg's website, where the documentation lists the following among the audio options:
-ar[:stream_specifier] freq (input/output,per-stream)
Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream.
For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options. But I am lost on how to use this option.
Help appreciated
[1] https://wiki.archlinux.org/index.php/Co … lac_to_Mp3
Last edited by stefano (2014-12-15 22:14:49)
Offline
Why do you need this particular quality?
You can first decode flac then use 'lame <infile> <outfile> -b 320' w/o ffmpeg.
https://wiki.archlinux.org/index.php/Co … out_FFmpeg
Last edited by karol (2014-12-15 20:05:42)
Offline
I pipe flac input into
lame -S --noreplaygain --preset insane![]()
Offline
Why do you need this particular quality?
Long story....
But I found the solution using ffmpeg on an ubuntu forum. Apparently the correct parameter is:
-c:a libmp3lame -b:a 320k
so a version of the wiki's script for 320 fixed bit rate conversion would be:
#!/bin/bash
for a in *.flac; do
< /dev/null ffmpeg -i "$a" -c:a libmp3lame -b:a 320k "${a[@]/%flac/mp3}"
doneOffline
I see no reason to use a bitrate of 320k when encoding with lame. FLAC achieves any need for archiving, and lame VBR of 0-4 normally achieves transparency.
Offline