How to transcode into AAC using ffmpeg - Debian 8 - Subsonic
Posted: Wed Jul 13, 2016 1:10 am
Hi!
In this tutorial we will built our very own ffmpeg, in order to use fdkaac, and obtain a better transcoding quality in low bitrate situations. You might want this if your bandwith is very low, or you don't want to consume as much mobile data.
This does work pretty well in the iPhone Apps iSub and play:sub, and as far as i know also in Android App. It doesn't work as good in my web browser (Safari) but there i mostly use mp3 transcoder or "No Limit".
That's it. Enjoy AAC Streaming
In this tutorial we will built our very own ffmpeg, in order to use fdkaac, and obtain a better transcoding quality in low bitrate situations. You might want this if your bandwith is very low, or you don't want to consume as much mobile data.
This does work pretty well in the iPhone Apps iSub and play:sub, and as far as i know also in Android App. It doesn't work as good in my web browser (Safari) but there i mostly use mp3 transcoder or "No Limit".
- 1. Follow this guide in order to compile ffmpeg on your machine. https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
Make sure to include libfdk-aac and also libmp3lame. As I'm using ffmpeg for many tasks i compile everything described in the manual.
2. copy the freshly compiled ffmpeg binary to /var/subsonic/transcode. You will most probably find it in ~/bin/ffmpeg
3. Open subsonic "Transcoding" settings in your web browser and insert below MP3 a new preset for AAC:
AAC (Name) - ogg oga aac m4a flac wav wma aif aiff ape mpc shn (Convert from) - m4a (Convert to) - ffmpeg -i %s -vn -map 0:0 -c:a libfdk_aac -b:a %bk -f adts - (Step 1)
I also changed the "Downsample Command" to:
ffmpeg -i %s -vn -map 0:0 -c:a libfdk_aac -b:a %bk -f adts -
4. If you are using a smartphone app, fire it up and make sure you are connected to your server and played at least one file. Otherwise there won't be any player to edit.
5. Go to Settings -> Players and under "Select player" choose the preset that fits your Smartphone App. In my case it is named "playSub".
6. Choose your maximum bitrate as per your wish and uncheck the mp3 audio checkbox. Check AAC checkbox.
That's it. Enjoy AAC Streaming