Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A How to convert Flac to Mp3 with FFmpeg?

The best method is to navigate to the folder containing your Flac audio files and use the following 'for' loop: for j in *.flac do ffmpeg -i "$j" -c:a libmp3lame -b:a 128k mp3/"${j%.flac}.mp3" ...

posted 1y ago by andrew.46‭  ·  edited 1y ago by andrew.46‭

Answer
#2: Post edited by user avatar andrew.46‭ · 2023-06-10T02:45:15Z (over 1 year ago)
  • The _best_ method is to navigate to the folder containing your Flac audio files and use the following 'for' loop:
  • ```
  • for j in *.flac
  • do
  • ffmpeg -i "$j" -c:a libmp3lame -b:a 128k mp3/"${j%.flac}.mp3"
  • done
  • ```
  • Note the following points:
  • 1. The output files will all be created in a subdirectory called 'mp3'
  • 2. The output bitrate can be manipulated with the `-b:a 128k` setting
  • 3. Or by using a quality setting (rather than bitrate): `-q:a 5`
  • 3. The naming convention of your output files will be preserved
  • And enjoy your music!
  • The _best_ method is to navigate to the folder containing your Flac audio files and use the following 'for' loop:
  • ```
  • for j in *.flac
  • do
  • ffmpeg -i "$j" -c:a libmp3lame -b:a 128k mp3/"${j%.flac}.mp3"
  • done
  • ```
  • Note the following points:
  • 1. The output files will all be created in a subdirectory called 'mp3'
  • 2. The output bitrate can be manipulated with the `-b:a 128k` setting
  • 3. Or by using a quality setting (rather than bitrate): `-q:a 5`
  • 3. The naming convention of your _input_ files will be preserved in the _output_ files
  • And enjoy your music!
#1: Initial revision by user avatar andrew.46‭ · 2023-06-10T02:42:18Z (over 1 year ago)
The _best_ method is to navigate to the folder containing your Flac audio files and use the following 'for' loop:

```
for j in *.flac
do 
ffmpeg -i "$j" -c:a libmp3lame -b:a 128k mp3/"${j%.flac}.mp3"
done
```
Note the following points:

 1. The output files will all be created in a subdirectory called 'mp3'
 2. The output bitrate can be manipulated with the `-b:a 128k` setting
 3. Or by using a quality setting (rather than bitrate): `-q:a 5`
 3. The naming convention of your output files will be preserved
 
And enjoy your music!