HydrogenAudio

Lossy Audio Compression => AAC => AAC - Tech => Topic started by: coppla on 2013-04-09 07:35:43

Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-09 07:35:43
Hi all,

I'm trying encoding some of my audio files into low bitrate (24kpbs) streams. I found HE_AAC_V2 as the best option.

Suprisingly, encoding one audio file (wmav2 format) containing conversation produces an silent audio file. I've tried neroaacenc, winamppro on Windows and ffmpeg with libaacplus, ffmpeg with libfdk_aac, Max and XLD on Mac.

Then I used Audacity to mix this audio file with another audio file into one audio file. This second audio file can be properly encoded by HE_AAC_V2. Next I encoded this mixed file into m4a with HE_AAC_V2 and I'm astonished to find out that sound from the first audio file does not exist in the resulting file while sound from the second file is OK.

Command line I used is as follows:

ffmpeg -i <input_file> -vn -sn -c:a libfdk_aac -profile:a aac_he_v2 -ar:a 44100 -ac:a 2 -b:a 24k -f adts <output_file>
ffmpeg -i <input_file> -vn -sn -c:a libaacplus -ar:a 44100 -ac:a 2 -b:a 24k -f adts <output_file>

What does this mean? Some sound cannot be encoded by it?
Title: HE_AAC_V2 encoder ignored much sound
Post by: LithosZA on 2013-04-09 08:25:55
It might not be an encoder problem. The file might not be able to decoded properly.
Try:
ffmpeg -i <input_file> -c:a pcm_s16le -ar:a 44100 -ac:a 2 output_file.wav
Can you playback output_file.wav? If not then ffmpeg was unable to decode the audio correctly.
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-09 09:09:57
Thanks for your quick replay but
Yes, it can
Title: HE_AAC_V2 encoder ignored much sound
Post by: C.R.Helmrich on 2013-04-09 10:02:05
Coppla, can you upload a part of the wma2 file which is encoded as silence in the upload forum? HE-AACv2 might have problems with out-of-phase files.

Chris
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-09 10:08:40
Hi Helmrich,

I've just registered and I cannot find the way to upload attachments.
Title: HE_AAC_V2 encoder ignored much sound
Post by: pdq on 2013-04-09 14:31:42
Try playing output_file.wav in mono. My guess is that you will hear silence.

HE AAC V2 files contain mono data with information to direct the output toward one channel or the other. Out-of-phase audio will simply cancel.
Title: HE_AAC_V2 encoder ignored much sound
Post by: db1989 on 2013-04-09 17:15:48
I've just registered and I cannot find the way to upload attachments.
At the bottom of the first group of forums on the list: http://www.hydrogenaudio.org/forums/index.php?showforum=35 (http://www.hydrogenaudio.org/forums/index.php?showforum=35)

Please do not include quotations of previous posts when they are completely unnecessary, and if you must quote in relevant circumstances, please place it above your reply, not below.
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-10 01:01:56
Coppla, can you upload a part of the wma2 file which is encoded as silence in the upload forum? HE-AACv2 might have problems with out-of-phase files.

Chris


Hi Chris,

I've uploaded the file here: http://www.hydrogenaudio.org/forums/index....howtopic=100352 (http://www.hydrogenaudio.org/forums/index.php?showtopic=100352)
Please check it out.

Thank you!
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-10 01:09:02
Try playing output_file.wav in mono. My guess is that you will hear silence.

HE AAC V2 files contain mono data with information to direct the output toward one channel or the other. Out-of-phase audio will simply cancel.


Hi pdq,

You're right. I used Audacity to mix the two channels into one channel and the resulting waveform is a straight line...
What can I do to this audio file to correctly encode it into HE AAC V2?
Title: HE_AAC_V2 encoder ignored much sound
Post by: Brazil2 on 2013-04-10 07:35:16
What can I do to this audio file to correctly encode it into HE AAC V2?

With Audacity:

Click on the drop down menu at the top of the properties box of the sound, on the left
Split stereo track
Select right channel sound
Effect -> Invert
Drop down menu at the top of the properties box -> Make Stereo Track
Save the resulting sound
Done.
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-10 11:29:32
What can I do to this audio file to correctly encode it into HE AAC V2?

With Audacity:

Click on the drop down menu at the top of the properties box of the sound, on the left
Split stereo track
Select right channel sound
Effect -> Invert
Drop down menu at the top of the properties box -> Make Stereo Track
Save the resulting sound
Done.


Thank you, it works.

BTW, I'm still wondering if i can invert channel with ffmpeg
Title: HE_AAC_V2 encoder ignored much sound
Post by: Brazil2 on 2013-04-10 12:21:11
I'm still wondering if i can invert channel with ffmpeg

I'm not sure about ffmpeg but you can do it with SoX:
Code: [Select]
sox input.wav output.wav remix -m 1 2i0
Title: HE_AAC_V2 encoder ignored much sound
Post by: coppla on 2013-04-10 14:46:34
I'm still wondering if i can invert channel with ffmpeg

I'm not sure about ffmpeg but you can do it with SoX:
Code: [Select]
sox input.wav output.wav remix -m 1 2i0



Yah! sox is so powerful!
Thanks!