flac + cue to mp3

To convert a single flac file with a cue sheet to mp3, first split it up:

$ shnsplit -f <sheet.cue> <source.flac>

Then convert the wav-files to mp3 with ffmpeg:

for i in *.wav ; do ffmpeg -i ${i} -codec:a libmp3lame -qscale:a 2 ${i%%wav}mp3 ; done

Or, if you have individual flac files:

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

qscale:a 2 produces mp3s with an average bitrate around 170-210 kbit/s. It should be close to lossless.

Create a Ringtone for Android 5

Conversion

This should be easy, wouldn’t you think? Of course it isn’t! Here’s a step-by-step instruction:

1. Extract the sound from the video or sound file. Write down the start and and position. For notifications don’t make it more than 3 seconds or it’ll get annoying. Do this with ffmpeg:

$ ffmpeg -i <input-file> -ss <hh:mm:ss.ms> -to <hh:mm:ss.ms> -f wav out.wav

Check with eg. ffplay if you got it right or adjust:

$ ffplay out.wav

2. Most likely you want to increase the volume:

$ ffmpeg -i out.wav -af 'volume=4|5|...> out2.wav

3. Convert to mp3

$ ffmpeg -i out2.wav -codec:a libmp3lame -qscale:a 8 out.mp3

qscale:a 8 is 70-105 kbit/s (default is 16 kbit/s, crappy)

Make a SAMSUNG S5 Galaxy acutally play it

Turned out this is the hard part.

1. Download it to the phone with “Eigene Dateien” (“My Files”?, dunno).

2. Select “Benachrichtigungston” (Notification in english?) and open with ES File explorer or something

3. Browse to the downloaded file and select it

4. OK everything

When selecting the dialog again, use “Medienspeicher”. Now the file name should show up there. Test it!

Results

Stargate alert:

Now What? (O’Neill)

Sorry for Denglish 🙁