I'm trying to take a video with two audio streams and compress the first one in stereo at 48 kbps with AAC HEv2 encoding, with the second in mono at 40 kbps using HEv1. My code is essentially as follows:
set STREAM_01=-map 0:a:0 -b:a:0 48000 -ac 2 -c:a:0 libfdk_aac -profile:a aac_he_v2 set STREAM_02=-map 0:a:1 -b:a:1 40000 -ac 1 -c:a:1 libfdk_aac -profile:a aac_he set SPECS=-ar 48000 -sample_fmt s16 -cutoff 20000 ffmpeg.exe -i input.mkv -map 0:v:0 -c:v copy %SPECS% %STREAM_01% %STREAM_02% output.mkv
But the program only seems to execute whichever of the two profiles was specfied last -- both streams either come out HEv1 or they both come out HEv2. This is doubtless because the profile instruction omits a stream specifier, but when I try to write the profile options in the form
"-profile:a:1 aac_he_v2" or
"-profile:a:2 aac_he" I get an error message, "Error while opening encoder for output stream #0:1." What am I missing here?