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

3

6

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?

Neomineomycin answered 19/11, 2015 at 22:28 Comment(0)
B
6

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

Burweed answered 8/1, 2016 at 20:25 Comment(1)
I think because that's inline, I checked the same. while I use in the GUI version I was must changed the UI setting, add the command line "--sout-ffmpeg-strict=-2" wasn't help, but when I added it to the transcode it worked like a charme. :-)Sherard
M
3

Another way this seems to work is with the --sout-avcodec-strict switch to the vlc command itself. To modify the original example:

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

FYI, on Windows systems, one needs to use an equals sign for option values (not a space), so it would be --sout-avcodec-strict=-2 instead there.

I don't know what the difference is between these two forms, or indeed, if there is one. I suspect the sout-avcodec-strict form might be more robust in the face of future changes to the codec library interface, but given that it's a library-specific option in the first place, I'm not sure that matters.

My info was from: https://forum.videolan.org/viewtopic.php?t=111801

Hope this helps.

Mediative answered 26/9, 2016 at 22:18 Comment(0)
D
1

Yes, huge thanks all the tech dudes here! Would just add that getting VLCs mp4 transcode working is also a great solution when Windows Movie Maker rejects (="is not indexed and cannot be imported") all your perfectly functional .asf / .wmv / .avi files. Install the K-Lite free codec pack to fundamentally broaden Movie Maker's import abilities; access these by switching to "All files" in the import dialogue; then stare in amazement as an (mp4) video actually loads!

For the graphically oriented, I've compiled screenshots of the various boxes, including that all-important strictness = -2. To use, Control R (=Convert...); browse to input file; [build, save &] load profile; browse to output location & supply name; finally hit Start (green ringed).

My setup is Windows 8.1, Movie Maker 6, K-Lite Codec Pack 12.0.5 (Full), VLC 2.2.1

Peace+love, AK

VLC makes mp4, now with sound!

Dairyman answered 1/1, 2017 at 1:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.