Symphony

Symphony

Not enough ratings
Fixing / Converting your media files
By Riddlebox
This is a guide on how to use FFMPEG ( A free open source program ) to convert almost any music format you have to another so the game will read them.
   
Award
Favorite
Favorited
Unfavorite
Overview
Just a tidbit of what is covered.

Basic Audio Information
  • This is just some real basic audio file information

Software Information
  • Information on how FFmpeg (an open source software project) to convert your non playable files into playable files.
Conversion Examples
  • Scripts and One-Line command interfaces to convert audio files.

This guide will also help those who do not want to install QuickTime onto their PC.

Please use all audio content responsibly and do not use stolen media. I do not condone the use of this guide to fix your pirate stuff. I just don't like QuickTime.

Back in the old days before AAC existed and space cost a fortune everything even valid self copied CDs were converted to WMA or MP3. Over the years things can happen to those files and they may not play well on all new stuff today. This guide will help you try to fix those files.
Basic Information Audio File Information
While audio codec can be a pain in the rump they can have some great advantages and disadvantages.

Using a codec like MP3 is good for fast easy decent compression; but this day and age AAC is much better in every shape and form.

But there are fees to pay when you use some things like AAC+ or MP3-Pro the list can go on.
But I am only going to give you some info that you will need for this guide.

When we have audio on our computer they can come in nearly any format. The most import thing though is what the quality of that audio file is. If you have a FLAC type file from a proper source such as you ripped it from a CD you own, or you Bought it Online; you have a proper source file.

What I mean by a proper source file is that FLAC and other like it are a LOSSLESS codec, meaning that all the authors original audio for that song is in that file. You are not missing any highs mids or lows.

The downside to a FLAC type files, they are large. But that is the price you pay for full quality.

Then you will get the next best option files like AAC, ( M4a) is great because its near lossless but much better compression. A properly ripped AAC file in 256bp/s the human ear will almost 99.99999% of the time will never be able to tell the difference.

Then we have lower ones like MP3. LOSSY but small you can have a great sounding mp3 and 192vbr ( Variable Bit Rate ) but it will not compare to an AAC or FLAC type.

For most people though MP3 is more then enough. It is lossy but still good enough.

A quick note.

You can always change a lossless format to any other lossless format without losing any quality. So lets say you have a Lossless M4A file from lets say ITunes but you want to play it here but are like me and do not want to install QuickTime convert it to FLAC. (Examples Follow Later In Guide)

You can always Downgrade an Audio File but you can never really upgrade an audio file.

If you have a FLAC file you can easily convert it to a MP3 file and make the MP3 file sound good enough. But you can never take a crappy lets say 128bpp/s MP3 and convert it to a FLAC file and automatically have it sounding better. The data just wont be there to do anything.

But you can convert a good mp3 that is bad ( ~corrupted~ ) to a fixed mp3, or an AAC file to an MP3. and keep them sounding the same or near the same ( AAC to MP3 you lose some data ).

The other thing you can do is if you don't want to lose the quality of the AAC but don't want to install QuickTime then you can convert your AAC to FLAC and play it, but remember you can't get Better Quality it will just be the exact same quality in another format. ( Probably a larger file too :P )
Basic Software Information
Some Info About FFmpeg ( My preferred software package for easy audio conversion. )

From ffmpeg.org

FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.


Builds of FFmpeg are located at:
https://github.com/BtbN/FFmpeg-Builds/releases

You are looking for ffmpeg-master-latest-win64-gpl.zip

Extract the Zip File to any location that you prefer it to be used from.

The main exe that we will be using in the examples is located in the bin\ folder called ffmpeg.exe

If you are not used to using command line you can hold SHIFT and RIGHT CLICK inside the bin\ folder and open a command window here.

For more conversion info go to the next section.

FFmpegLEGAL
https://ffmpeg.org/legal.html
Conversion Examples
Conversion Examples

One File At A Time

Convert Single File TO FLAC
  • ffmpeg.exe -i "<FULL_File_Name>" -acodec flac "<Out_File_Name>.flac"

So in the above example we see how to change any file type to flac. Just replace <FULL_File_Name> with something like "C:\Audio\Billy Joel - Piano Man.m4a" and the <Out_File_Name> with something like "C:\Converted-Audio\Billy Joel - Piano Man.flac"

NOTE Whatever The OUTPUT Location is set to the folder MUST Exist Ahead of time or it will give you an error.

Convert Single File to MP3 320kbs ('Best Quality')
  • ffmpeg.exe -i "<FULL_File_Name>" -codec:a libmp3lame -qscale:a 0 "<Out_File_Name>.mp3"

So in the above example we see how to change any file type to flac. Just replace <FULL_File_Name> with something like "C:\Audio\Billy Joel - Piano Man.m4a" and the <Out_File_Name> with something like "C:\Converted-Audio\Billy Joel - Piano Man.mp3"

NOTE Whatever The OUTPUT Location is set to the folder MUST Exist Ahead of time or it will give you an error.

ADVANCED QUICK BULK

Place the Batch or CMD script In the Folder You wish to convert ( Sub Folders will automatically be scanned and converted)

Bulk One Line File Conversion

Requires Path OR for you to edit where it just says ffmpeg to the full file location.
Example where you see "do ffmpeg -i " you would have to change it to something like "do "C:\FFmpeg\bin\ffmpeg.exe" -i " <-- Notice the QUOTES around the FFmpeg path.
Or
Add To Path[www.wikihow.com])


The following one line scripts need to be put into a batch script. ( Use notepad to save file as select all file types and then save the file as something like "aac-to-flac.bat" )

These one line scripts will convert every file in the folder from one type to another and its sub folders. So if you have a bunch of M4a Files that you want to take to flack in one folder this script will do it. But be warned it will NOT delete your old files it will render A NEW COPY into the new codec in the SAME FOLDER with the SAME NAME, just the new file extension for the codec selected.

Any Type To FLAC replace the *.m4a with the file extension of your choosing
  • @for /R %%x in (*.m4a) do ffmpeg -i "%%x" -acodec flac "%%~dpnx.flac"

Any Type To MP3 320 replace the *.m4a with the file extension of your choosing
  • @for /R %%x in (*.m4a) do ffmpeg -i "%%x" -codec:a libmp3lame -qscale:a 0 "%%~dpnx.mp3"

-------------------------------
ADVANCED Conversion Script. ( Replicate your library in another format folder for folder )

Entire Library in an odd format? Want to convert the entire thing at once or at least every file of a specific type? Here you go. you want to have this in a cmd file. ( Use notepad to save file as select all file types and then save the file as something like "Convert-Audio-Library.cmd" )

Code Also Be Found AT http://scripts.the009.net/cmd/RecursiveFolderTranscoding.cmd OR BELOW
Click to view in txt format or Right Click and Save Link As and just save the .cmd file.

Usage
It will ask for the original codec use something like *.flac

It will ask you for the destination use something like "C:RedoneAudio\" <-- It will make the directory if it dose not exist.

It will ask you for a Destination Extension use one of the listed.

Mp3 - 320kb/s MP3 file
mp4 - 256kb/s AAC file
flac - Lossless FLAC ( or copy of source )

Once you hit enter, it will start copying eve



CODE FOLLOWS

@echo off
setlocal EnableExtensions EnableDelayedExpansion

set source=%cd%

set /p acodec=Original Codec:
set /p dest=Destination Path:
set /p profile=Destination Extension (Output Codec) ^<m4a ^| mp3 ^| flac ^| ^>:

set profile_m4a=-c:a aac -b:a 256k
set profile_mp3=-codec:a libmp3lame -qscale:a 0
set profile_flac=-acodec flac

for /r %%F in (!acodec!) do (

rem create destination directory
set destdir=%%~dpF
set destdir=%dest%!destdir:%source%=!

md "!destdir!" 2> nul

rem transcode file
ffmpeg -i "%%F" !profile_%profile%! "!destdir!%%~nF.!profile!"
)


------------------------------------------------------------------------


More information can be found out on the FFmpeg site.
https://ffmpeg.org/documentation.html

This guide is only for converting music you legally own. I do not condone the use of pirated audio