Splitting big mp3 files

When splitting big mp3 files (like audiobooks) into digestible chunks (say 20 minutes) with ffmpeg, there are several things to keep in mind:

  1. It really, really matters where you put the -ss option on the command line! If you use it as an output option (i.e. after -i), input is read but discarded, so you end up with a file containing silence at the start. You have to use it as an input option (i.e. before -i) to get the proper result.
  2. Same goes for -t, only that you have to use this one as an output option (i.e. after -i but before the output file name. Also note that -t denotes a duration, not a position!
  3. If you want to transfer the split files to an Android device, you need to adjust the IDv3-tag “title”. Android uses that plus the original extension as the display file name. If the title-tag does not contain some string to differentiate files, you end up with identical file names. So you have to fix the title to something like “audiobook – 01 of 37”. Of course the track-tag is ignored (why bother with something so obvious šŸ™ ).

But do not fret. I put this all together in a quick and dirty quick and dirty perl script. First argument is the input file, second the base for output file names and third the base for the title tag:

$ splitmp3.pl "Big Input file.mp3" "Output file" "Name"

outputs files like this:

Output file - 01.mp3
Output file - 02.mp3
...

with titles like this:

Name - 01 of 37
Name - 02 of 37
...

That’s all, folks!

Unbrick Yoga tablet

Since my Lenovo Yoga tabletĀ (10″, dunno the model number any more) has a tendency to turn itself into a expensive paper weight after updates, here’s the procedure to unbrick it:

  1. Get a physical Windows 7 PC. Windows > 7 will not do, since it recognizes the tablet and installs theĀ wrong device drivers! You really need Windows 7!
  2. Get the image file and the device drivers. A working image with the file nameĀ Yoga_tablet_10_A422_000_040_131023_WW_WIFI.rar is available onĀ tollanaĀ or atĀ http://www.lenovo-forums.ru. The driver filename isĀ SP_Flash_Tool_Driver_Auto_Installer_v1.1236.00.7z, btw.
  3. Start the tablet in rescue mode. Press Vol+Down (that is theĀ upper part of the volume switch if it’s standing on the foot) and the power button simultaneously until some Chinese Characters appear and plug it in. You should get unknown devices in the Windows Device Manager.
  4. Install the drivers and don’t be afraid about the warnings andĀ unplug the device once it’s done.
  5. Unpack the firmware image and start the included SP Flash Tool. Under “Options” turn the USB Mode on if applicable.
  6. “Scatter Load” the file “Yoga_tablet_10_A422_000_040_131023_WW_WIFI/target_bin/target_bi
    n/MT6589_Android_scatter_emmc.txt” and wait until Flash Tool is done, showing “Searching” in the lower toolbar.
  7. Click “Download” and ignore the warning.
  8. Select the menu entry containing “eMMC” on the tablet.
  9. Only now plug it back in, wait for Flash Tool to recognize it and download the firmware.
  10. Once Flash Tool is done, unplug the tablet, restart it and wait for the installation to finish.
  11. Install several updates and reconfigure it.

Don’t share, but enjoy!

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 šŸ™