"Downsampling" to HE-AAC?

General discussions.

Moderator: moderators

"Downsampling" to HE-AAC?

Postby qupfer » Wed Jun 26, 2013 1:15 pm

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..
qupfer
 
Posts: 8
Joined: Tue Feb 19, 2013 2:37 pm

Re: "Downsampling" to HE-AAC?

Postby stozher » Wed Jun 26, 2013 4:26 pm

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.
http://music.stozher.com:8080/login.view?user=guest&password=
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria

Re: "Downsampling" to HE-AAC?

Postby qupfer » Fri Jul 12, 2013 8:38 am

Thank You, works gread with isub.
qupfer
 
Posts: 8
Joined: Tue Feb 19, 2013 2:37 pm

Re: "Downsampling" to HE-AAC?

Postby stozher » Fri Jul 12, 2013 12:42 pm

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)...
http://music.stozher.com:8080/login.view?user=guest&password=
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria


Return to General

Who is online

Users browsing this forum: No registered users and 18 guests