Revision [696]
This is an old revision of Tips made by AdminUser on 2015-04-13 22:20:49.
Tips & Tricks
Table of Contents
Tutorials
Make sure you have read the tutorials in this wiki: Tagger Panel, Album List viewDid you know that...
- you can start the script and foobar2000 will get launched if not already running?
- there are text-files in the folder of foobar2000.exe, that contain last analysis results per target?
- you can edit or comment any page in this wiki to add your own tips? Just sign up as a new user! :-)
Automatic sync when your target gets connected with USBDLM
can be archived with the freeware USBDLM. A really great tool that manages drive letters for USB devices. You should check it out even if you are not interested in an automatic sync.Here is a sample section, showing how to configure the sync in USBDLM.INI
[DriveLetters29] Letters=GHIJ ;Start FoobarSync if FoobarSync.flag exists on drive [OnArrival13] FileExists1=%Drive%\""FoobarSync"".flag open1=c:\windows\system32\cmd.exe /k cscript "c:\foobar\Sync.vbs" tasks=mp runid=%root% open2=%usbdlmpath%\usbdlm.exe -balloon -time=4000 -title="FOOBAR SYNC %FriendlyName%" -text1="FOOBAR SYNC for %root% (%FriendlyName%)" -icon=113 -onclick=%windir%\explorer.exe %root%
FFmpeg knowledge
FFMPEG is a very very powerful tool. So do not expect deep knowledge from me! But for audio conversion with FoobarSync I can provide you the following hints:First, here are some command line examples:
- ffmpeg.exe -i "c:\infile.m4a" -c:a speex -ab 30000 d:\outfile.spx
- ffmpeg -i "c:\infile.m4a" -vn -c:a libvorbis -q:a 6 d:\outfile.ogg
- ffmpeg -i "d:\infile.mp3" -vn -c:a libopus -ac 2 -ab 200k d:\opustest.ogg
... and here are some explainations about their meaning:
- c:a <codec> select codec for audio, (speex,libvorbis,aac_he_v2,...)
- vn video none (do not encode any video streams)
- ab <n> average bitrate (numberformat depends on codec!), ex. -ab 150k
- ac <n> number of audio channels, ex. -ac 2
- q:a <n> quality level <n> for audio, ex. -q:a 5
MP3
Is very well known and supported by 99.9% on all targets. But this codec is the oldest too and there are some better ones, which provide higher quality at the same bitrates. Beside that, there are codecs for special needs and purposes: use very limited bitrate, low latency on networks, low CPU consumption on decode, special frequencies (human speach) ...- only one audio stream is supportet (no need for option -vn)
- MP3 does not have multichannel support
- use variable bitrate for better quality (-ab)
Vorbis
Is - what I know - the successor of MP3. I really recomment this codec, if your targets can play it. It uses OGG as container format, has a better quality than MP3 is quick to encode and doesn't consume much CPU power when decoded.- Use -vn to supress any existing video stream (OGG can have multiple video/audio streams)
- Use -ac 2 to downsample to stereo. If you want to sync multichannel: Tell me if it works. I didn't try!
- Vorbis does not provide a "real" variable bitrate! Vorbis will ALWAYS use a quality-setting! There is no way to forecast the bitrate. You also should know, that Vorbis will put a bitrate-label on the audio stream. But this label simply bound to the quality setting - look at the table below.
- This is why you must use FFprobe or a fileprefix within SyncRules.
Vorbis quality | label in stream | Vorbis quality | label in stream |
---|---|---|---|
-q 0 | ? | -q1 | 80 kbit/s |
-q 2 | 96 | -q 3 | 112 |
-q 4 | 128 | -q 5 | 160 |
-q 6 | 192 | -q 7 | 224 |
-q 8 | 256 | -q 9 | 320 |
-q 10 | 500 |
Opus
is - what I think - the best codec out there. But it is not supported on most targets. My Android 4 device did have no native support. And because Opus needs some CPU power while decoding my Rockbox-based Ipod Video did not decode in realtime.AAC-LC
is also very common and well known on targets. It should provide slightly better quality then MP3.AAC-HE
Should (!) be a good codec for low bitrates but as I know there are problems because of patents. AAC-HE is supported by the official FFmpeg binaries (library aac_he_v2), but it is known to give bad quality. I've testet it and must say: Yes, quality IS bad. :-) If you need very low bitrates use other codecs where possible or get your hands on a FFmpeg binary with a better library. If you found such library and it is legal, please let me know!SPEEX
is a special purpose codec for spoken content that is supported on few targets like Rockbox Player. You can get very low bitrates with a good quality. Very nice for audio books, but as soon as there are some environmental sounds or some music, quality will be bad.WSH - make life easier
As soon as you often run FoobarSync manually from command line you'll get nerved to have "cscript" added as prefix. On Windows 7 you can make life easier with following steps:- Open a command prompt
- Type
assoc .vbs=VBscript
- Type
ftype VBscript="c:\windows\system32\cscript.exe" /nologo "%0" %1 %2 %3 %4 %5 %6 %7
From now on you can just run your VBS-Scripts directly from prompt:
sync.vbs /help
Be aware that you may have to use double-quotation on paths with spaces:
sync.vbs runid=""c:\test folder\mytarget.id"" tasks=pt
- Check out the other Pages, that belong to the wiki-category Documentation !
- Ask and discuss at the FoobarSync discussion thread on Hydrogenaudio Forums