Page 1 of 1

"Downsampling" to HE-AAC?

PostPosted: Wed Jun 26, 2013 1:15 pm
by qupfer
Hi

i'm using subsonic on a mobiledevice and want to use low bitrates. But if i go down to 64 kbit/s or 32 kbit/s mp3 sounds bad. So i want using HE-AAC, which sounds with 32 kbit/s acceptable. But how? ;)
With the magic help of google, I found out, that NeroAacEnc have He-AAC and works with linux. But it only accept wav-Files. So i have to transcode to wav first and then to aac. But for the "Downsampling", subsonic hasn't a second step field. So what can i do?

I tried:
ffmpeg -i %s -v 0 -f wav - | neroAacEnc -br 32000 -ignorelength -if - -of -
but without success.

Code: Select all
[26.06.13 17:11:35 MSK]   DEBUG   InputStreamReaderThread   (/var/subsonic/transcode/ffmpeg) Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
[26.06.13 17:11:35 MSK]   DEBUG   InputStreamReaderThread   (/var/subsonic/transcode/ffmpeg) [NULL @ 0x97da8e0] Unable to find a suitable output format for '|'
[26.06.13 17:11:35 MSK]   DEBUG   InputStreamReaderThread   (/var/subsonic/transcode/ffmpeg) |: Invalid argument


Of course, a simple commandline like
ffmpeg -i /var/itunes/Music/pathToSong/song.mp3 -v 0 -f wav - | ./neroAacEnc -br 32000 -ignorelength -if - -of /home/qupfer/test.m4a
works.

Edit:
okay, found the HE-tutorial..

Re: "Downsampling" to HE-AAC?

PostPosted: Wed Jun 26, 2013 4:26 pm
by stozher
Example /usr/lib/subsonic/transcode/nero-aac.sh
Code: Select all
#!/bin/sh

ffmpeg -v 0 -i "$1" -f wav -vn -codec:a pcm_s16le - | neroAacEnc -cbr "$2" -ignorelength -if - -of -

chmod 755 /usr/lib/subsonic/transcode/nero-aac.sh
downsample command: nero-aac.sh %s %b000

...not tested, but this is your solution.

Re: "Downsampling" to HE-AAC?

PostPosted: Fri Jul 12, 2013 8:38 am
by qupfer
Thank You, works gread with isub.

Re: "Downsampling" to HE-AAC?

PostPosted: Fri Jul 12, 2013 12:42 pm
by stozher
Remark: MP3 and AAC is a 32-bit float. If you have to not lose dynamic range always transcode to 32-bit PCM or float WAV at middle step (audio codec option)...