I'm trying to encode an ac3 file to an aac file. I've seen other people doing this, but are they all running linux? Does neroaacenc only support wav input for windows?
+ Reply to Thread
Results 1 to 30 of 56
-
-
same as any other pipe in ffmpeg
It's probably easier for you to use a GUI if you're not already familiar with the syntax
e.g
Code:ffmpeg -i input.ac3 -acodec pcm_s32le -ac 6 -ar 48000 -f wav - | neroAacEnc -if - -q 0.4 -ignorelength -of output.mp4
-
I'm familiar with the syntax, I just didn't know how to pipe, but I can see now that it's very simple. Would this produce a lower quality end product than just using ffmpeg's aac encoders? The only reason I ask is because I remember seeing someone say that neroaacenc is better than ffmpeg. Is neroaacenc better than ffmpeg?
-
Yes nero is clearly better than the AAC encoders ffmpeg uses . Even I can tell the difference (and I'm far from an audiophile)
But there were a few different versions commonly included with various distributed ffmpeg binaries; libvo-aacenc, libavcodec aacenc, etc... and they all sucked, but not sure about newest one by VisualOn , it might be better? not sure
The other AAC encoder you might want to check is apple AAC (qaac or qtaac) , it scores slightly higher than nero on ABX testing
https://sites.google.com/site/qaacpage/ -
NeroAacEnc has the biggest initial audio delay ever
,
therefore it's not recommended for the (occasional) reencode of movie audio tracks.
OTOH, qaac has a --no-delay option, to whom this may interest. -
Typically ~ 35-40ms for nero
Typically ~25-30ms for qaac
OTOH, qaac has a --no-delay option, to whom this may interest. -
Thanks for the input, PDR
Regarding qaac's --no-delay thing, you have a point, no discussion about it.
But now I think it's important to point out that Nero and qaac are NOT the only toys on the block
If one doesn't mind using higher bitrates for the same quality, they can give a try to fhgaacenc, enc_aacplus, or even faac (all of these generate smaller audio delays than NeroAacEnc, IIRC)Last edited by El Heggunte; 25th Jul 2013 at 02:22. Reason: better wording
-
here some code I wrote to compute the encoder delay
Code:if (heaac) { //HE-AAC if (nero) { encoderDelay = int(2336 * 2000 / audioOutputSampleRate.toDouble() + 0.5); } else if (qaac) { encoderDelay = int(2585 * 2000 / audioOutputSampleRate.toDouble() + 0.5); mkvDelayFix = encoderDelay; // mkvmerge only compensates some of the delay mkvDelayFix -= int(2112 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } else if (fhg) { encoderDelay = int(794 * 2000 / audioOutputSampleRate.toDouble() + 0.5); } } else if (heaacv2) { //HE-AAC V2 if (nero) { encoderDelay = int(2808 * 2000 / audioOutputSampleRate.toDouble() + 0.5); } else if (qaac) { encoderDelay = int(2585 * 2000 / audioOutputSampleRate.toDouble() + 0.5); mkvDelayFix = encoderDelay; mkvDelayFix -= int(2112 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } else if (fhg) { encoderDelay = int(794 * 2000 / audioOutputSampleRate.toDouble() + 0.5); } else { //faac/fdk/... encoderDelay = int(2048 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } } else { //AAC LC if (nero) { encoderDelay = int(2624 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } else if (qaac) { encoderDelay = int(2112 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } else if (fhg) { encoderDelay = int(1600 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } else { //faac/fdk/.. encoderDelay = int(2048 * 1000 / audioOutputSampleRate.toDouble() + 0.5); } } effectiveDelay = QString::number(inputDelay - encoderDelay);
Cu Selur -
I see, thanks for letting me know, I'm somewhat new to encoding and I had no idea that there would be any kind of delay.
-
The pertinent question here is not HOW do you do this but WHY do you even want to in the first place?
1) If you are under the impression that MP4 containers require AAC audio, please note that this hasn't actually been true for years now. AC3 is acceptable in an MP4 container.
2) If you are under the impression that using AAC will actually make your original AC3 audio "better", then you are very mistaken.
3) If you have some software/hardware player that requires this, then maybe you should consider getting something that doesn't require it.
Note that if you use AAC audio that sync problems are possible because (in my opinion) the format foolishly allows for things like VFR that probably should never be supported at all. I'm not saying that you will definitely have a sync problem, I'm just saying that if you don't understand what you are doing very well in converting that it might be possible for it to happen. Not likely, but theoretically possible.
Given all the crap listed above to do this correctly, is this really something that you must do? -
99% of the time it's not going to be a problem. Only superhuman hearing can discern anything <40ms
There was a problem discussed in another thread when somebody had issues with timing when uploading to youtube. Since it re-encodes the AAC to AAC, the delay compounded. But even a 70-80ms delay is hardly noticable to most people
VFR = variable frame rate. It's not a property of AAC, but rather a property of timestamps. For example , you could use AC3 with VFR in a MP4 container
If you really mean VBR (variable bit rate), then that's not an issue either for playback. Only a possible issue when editing (you also have the option of using CBR for AAC, IRRC some encoders like FAAC only allow CBR) -
Only superhuman hearing can discern anything <40ms
-
-
Yes, I have seen this in real life. (To be frank, another user in the german doom9/gleitz forum noticed this and during my testing which muxer is compensating this or not i did produce some files which even larger delays,...)
-
How are you measuring it ? I noticed some decoders might be a few +/- 10 or so ms different (there is a range of values in different programs, but they should be consistent in terms of larger or smaller delay with respect to the same testing samples)
I just ran a few tests on a few samples, it's definitely larger, in the area of ~70ms . I've never seen it >100ms -
Back then I used a specially modified file and compared the wave fronts in avisynth.
(did the whole thing at the beginning of last year, so not so sure any more,.. posted the detailed method I used to see the delay back then over in the german doom9 forum if I remember correctly; sadly the page is inactive atm.) -
So I'm using this command and getting this error:
Code:"D:\ffmpeg-20130724-git-436616f-win64-shared\bin\ffmpeg.exe" -i "D:t1.ac3" -acodec pcm_s16be -ac 6 -ar 48000 -f s16be - | "D:\qaac_2.19\x64\refalac64.exe" --rate keep --gapless-mode 2 --threading --fname-from-tag --raw --raw-channels 6 --raw-rate 48000 --raw-format S16B @pause
D:\>"D:\ffmpeg-20130
724-git-436616f-win64-shared\bin\ffmpeg.exe" -i "D:\t1.ac3" -acodec pcm_s16be -ac 6 -ar 48000 -f s16be - | "D:\qaac_2.19\x64\refalac64.exe" --rate keep --gapless-mode 2 --thread
ing --fname-from-tag --raw --raw-channels 6 --raw-rate 48000 --raw-format S16B
Input file name is required.
ffmpeg version N-54921-g436616f Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 24 2013 18:09:42 with gcc 4.7.3 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3
--disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --ena
ble-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --e
nable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --e
nable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.103 / 3. 81.103
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
[ac3 @ 000000000074d4e0] Estimating duration from bitrate, this may be inaccurat
e
Input #0, ac3, from 'D:\t1.ac3':
Duration: 02:12:56.00, start: 0.000000, bitrate: 448 kb/s
Stream #0:0: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Output #0, s16be, to 'pipe:':
Metadata:
encoder : Lavf55.12.102
Stream #0:0: Audio: pcm_s16be, 48000 Hz, 5.1, s16, 4608 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (ac3 -> pcm_s16be)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Invalid argument
Press any key to continue . . . -
not sure if this is the cause, but "D:\Users\Robert\Desktop\qaac_2.19\x64\refalac 64.e xe" has a space too much
-
strange, the formating of you post changed for me,..
looking at:
Code:"D:\ffmpeg-20130724-git-436616f-win64-shared\bin\ffmpeg.exe" -i "D:t1.ac3" -acodec pcm_s16be -ac 6 -ar 48000 -f s16be - | "D:\qaac_2.19\x64\refalac64.exe" --rate keep --gapless-mode 2 --threading --fname-from-tag --raw --raw-channels 6 --raw-rate 48000 --raw-format S16
btw. might be a problem with the ac3 file and running it through delaycut might help with that -
Last edited by ROBO731; 25th Jul 2013 at 12:09. Reason: Updated information.
-
Last edited by poisondeathray; 25th Jul 2013 at 12:16.
Similar Threads
-
Handbrake - AC3 5.0 Ch - Can't maintain 5.0 Ch to AAC or AC3(ffmpeg)
By kingaddi in forum DVD RippingReplies: 30Last Post: 26th Aug 2012, 20:27 -
Audio encoding AAC to AC3 for multiAVCHD authoring
By ejai in forum Authoring (Blu-ray)Replies: 6Last Post: 3rd Dec 2010, 12:00 -
MeGUI audio encoding dts/ac3 to aac-mp4, keep getting errors
By runLoganrun in forum AudioReplies: 5Last Post: 29th Jul 2010, 18:15 -
Error with Nero AAC encoder in XVID4PSP - "Could not open AAC encoder&
By TheViking in forum Video ConversionReplies: 2Last Post: 5th Nov 2009, 02:41 -
Youtube AAC encoder
By -Sandro- in forum Video Streaming DownloadingReplies: 3Last Post: 17th Apr 2009, 09:06