How to enable the experimental AAC encoder for VLC and record AAC sound from the microphone?

DevtelSoftware picture DevtelSoftware · Nov 19, 2015 · Viewed 9.1k times · Source

I managed to record mp3 with VLC 2.1.5 on MacOSX 10.9.2 by using this command:

./VLC -vvv qtsound://AppleHDAEngineInput:1B,0,1,0:1 --sout "#transcode{acodec=mp3,ab=128}:standard{access=file,mux=mp3,dst=~/Desktop/Recording.mp3}"

However I need to record AAC audio and every time I use the AAC settings, the file is 203 bytes and broken, probably only the header gets written. Some mux/filetype combinations produce 0 bytes files or don't produce any file at all. I used this command:

./VLC -vvv qtsound://AppleHDAEngineInput:1B,0,1,0:1 --sout "#transcode{acodec=mp4a,ab=128}:standard{access=file,mux=ts,dst=~/Desktop/Recording.mp4}"

Any command that works and records AAC audio with VLC from the Terminal would be greatly appreciated. Thanks!

Update:

I managed to get it started with this command:

./VLC -vvv qtsound://Internal\ microphone --sout "#transcode{acodec=mp4a,ab=128}:standard{access=file,mux=mp4,dst=~/Desktop/Recording.mp4}"

But when it tries to encode it tells this:

[aac @ 0x10309e000] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. [0x100469c30] avcodec encoder error: cannot open encoder

So it looks like I should add this

-strict -2

parameter to the command to fix it. Unfortunately this parameter is for ffmpeg and VLC does not recognize it. Do you have any idea how to enable the experimental AAC encoder for VLC?

Answer

Michael Dalziel picture Michael Dalziel · Jan 8, 2016

Had something similar - Have no idea if this is doing anything, but it did make the error go away. Basically tried to pass params to ffmpeg

#transcode{aenc=ffmpeg{strict=-2},vcodec=mp4v,vb=1024,acodec=mp4a}

Hope this gives you some ideas