======Section ""ConvertFormats"" explained====== ""ConvertFormats"" contain detailed instructions how to convert a source item (Medialibrary or playlist item) and also contains information how ""FoobarSync"" should verify if an existing file already matches the convert-instructions. Any rule can point to a ""ConvertFormats""-set. <<{{{toc title="Table of Contents" levels="h2,h3,h4,h5"}}}<<::c:: =====Configuration file syntax===== |=|Name|=|optional|=|array|=|items|=|sperator|=|status|| ||"" ConvertFormats""||no||yes||4-5||*||ok|| ||(x:6)%% ' DEFAULT ConvertFormats=OGG_Quality2*OGG*-vn -c:a libvorbis -ac 2 -ab 96k*96*_q2 ' MP3 ConvertFormats=MP3_256*MP3*-vn -ac 2 -ab 256k*256%%|| =====Parameter description===== |=|Parameter 1|=|Parameter 2|=|Parameter 3|=|Parameter 4|=|Parameter 5|| ||identifier||fileextension||encoder parameters||bitrate in kbit/s||match|| ||OGG_Quality2||OGG||-vn -c:a libvorbis -ac 2 -ab 96k ||96||_q2|| |=|Parameter|=|describtion|| ||1||__Identifier:__ The //identifier// is used with //SyncRules//. If a rule in //""SyncRules""// is evaluated to true, ""FoobarSync"" will look for the corresponding //identifier// in your ""ConvertFormats""-sets. As you can see it makes sense to use a combination of format and bitrate for the //identifier// to make it more readable for human eyes.|| ||2||__Fileextension:__ The encoded audio-files will get this //fileextension//. Some audio formats offer different //fileextensions// (container formats) for one codec and this gives you the chance to take influence.|| ||3||__Encoder Parameters:__ Are the parameters for FFmpeg to convert the source item. Take a look at the button of this page for some ready-to-use examples and see [[Tips|section tips & tricks]] for some hints.|| ||4||__Bitrate in kbit/s:__ Is used to estimate the target filesize of the item to a) estimate space needed on target, time to complete AND b) may be used to check if an existing audio-file needs to be reconverted (depending on parameter //match// below).|| ||5||__Match:__ {{color text="(optional)" c="blue"}} Influences how ""FoobarSync"" decides if an existing file needs to be reconverted. - '?' will invoke usage of FFprobe to check, if the audio stream in the file has the bitrate of parameter 4. **This is slow** because [[FFPROBE|FFprobes']] output (Example: ''Stream #0:0, 1, 1/44100: Audio: vorbis, 44100 Hz, stereo, fltp, 96 kb/s'') is searched with a RegExp (''"Stream #.* Audio:.*, //// kb/s"''). - '_suffix' will check/add the string '_suffix' to the destination filename. When present, the //_suffix// is used to identify the codec/format/bitrate in an existing file and to check, if it needs to be reconverted. Therefore, if you change encoder settings make sure to change //_suffix// too! This is simple and as fast as comparing filesizes (see below). - if you leave //parameter 5// empty (or even omit it) the calculated filesize on target (length multiplied by //parameter 4//) will be used to decide if the item needs to be reconverted. - Please note that ""FoobarSync"" has a built in **tolerance of 10 %** when comparing the filesize because other things like tags and container influence filesize too. Some formats simply have no predictable bitrate (Vorbis for example). You then have to use '?' or //'_suffix'//. - Also this method does not really compare any encoder settings. For example it would make no difference in filesize if you change the encoder settings for a MP3 from stereo to mono.|| =====Examples===== To just get started here are some ready-to-use examples for common formats which work fine. %%'VORBIS ConvertFormats=VORBIS_96*OGG*-vn -c:a libvorbis -ac 2 -ab 96k*96*_q2 ConvertFormats=VORBIS_128*OGG*-vn -c:a libvorbis -ac 2 -ab 128k*128*_q4 ConvertFormats=VORBIS_150*OGG*-vn -c:a libvorbis -ac 2 -ab 150k*150*_q5 ' OPUS ConvertFormats=OPUS_96*-vn -c:a libopus -ac 2 -ab 96k*96 ConvertFormats=OPUS_128*OGG*-vn -c:a libopus -ac 2 -ab 128k*128 ' AAC-HE SBR (High Efficiancy) **Caution: libvo_aacenc is known to produce bad quality!** ConvertFormats=AAC_HE_80*AAC*-vn -c:a libvo_aacenc -profile:a aac_he_v2 -ac 2 -ab 80k*80 %% ---- - This page belongs to category [[ConfigurationFiles]] - Check out the other Pages, that belong to the wiki-category [[Documentation]] ! - Ask and discuss at the [[http://www.hydrogenaud.io/forums/index.php?showtopic=108834|FoobarSync discussion thread on Hydrogenaudio Forums]]