When trying to convert AC3 to AAC, I'm trying to run the following command
However, nero fails with error "could not parse WAV file". I've also tried with qaac but it also fails in a similar way, as if the pipe wasn't working correctly. I'm running Windows 10 btw. What could be wrong?ffmpeg -i '.\VTS_01_1 T80 2_0ch 48KHz 192Kbps.ac3' -c:a pcm_s32le -ac 2 -ar 48000 -f wav - | neroAacEnc.exe -q 0.5 -ignorelength -if - -of VTS_01_1.aac
Also. Until now I was doing it with two commands, and I noticed that while the WAV file had the exact same duration as the AC3 track, the AAC track had not (whether encoded by nero or qaac). What I find funny is that the only warning comes from ffmpeg when converting to WAV (Estimating duration from bitrate, this may be inaccurate) so I would assume the situation to be reversed. Is there any way to avoid that?
+ Reply to Thread
Results 1 to 4 of 4
1. problem is probably pcm_s32le, qaac only supports 16bit so pcm_s16le should be used (probably the same is true for NeroAacEnc); also since your source isn't 32bit up converting might not be needed.
2. also make sure that ffmpeg doesn't output anything to stdout otherwise this output will end up being piped to NeroAacEnc/qaac.
3. in case you plan to multiplex this audio to a video stream remember that you need to compensate the delay caused by converting to aac and it's combination with the container (different sample rates & co, different aac encoders and different containers need to be compensated differently)
Cu Selurusers currently on my ignore list: deadrats, Stears555
Should ".\" be part of the ffmpeg input path?
These are the command lines I use with foobar2000, on Windows XP.
fb2k replaces "%d" with the output file name.
--no-delay for QAAC tells it to remove any initial encoder padding. That's generally a good thing for soundtrack audio, although it shouldn't be necessary when encoding music tracks.
" /d /c " at the beginning shouldn't be needed in your case.
fb2k uses stdin for the input to ffmpeg, hence "-ignore_length true" for ffmpeg.
/d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\neroAacEnc.exe -q 0.5 -ignorelength -if - -of %d
The full command line ends up being this:
"C:\WINDOWS\system32\cmd.exe" /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\neroAacEnc.exe -q 0.5 -ignorelength -if - -of "Output.m4a"
/d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe --ignorelength -s --no-delay -V 91 -o %d -
Maybe the problem is that for QAAC and Nero and a 32 bit input, it needs to be floating point (-c:a pcm_f32le). I haven't checked.
(Edit: I checked and -c:a pcm_s32le was fine)
Do you need "-ac 2 -ar 48000" for ffmpeg? Unless you're actually wanting to resample the audio etc, -f wav creates a "fake" wave header which should work fine, so you shouldn't need to specify channels or sample rate as such. That's why most encoders have an "ignorelength" option, so they ignore the (probably) incorrect duration information in the "fake" wave header and just encode until the audio stops coming.
The duration mightn't be reported as exactly the same when the output is AAC as any lossy encoder padding information is usually saved to tags at the container level, so you'd be better off outputting an m4a file rather than raw AAC. If the gapless playback info exists MKVMergeGUI will remove the padding from the beginning when muxing (which it doesn't need to do for QAAC if you use --no-delay). See --gapless-mode here.
Last edited by hello_hello; 13th Sep 2019 at 08:32.
It seems my problem lies elsewhere, I simply cannot pipe anything no matter what programs are invoked, I'll have to dig deeper.