How can I make the following conversion in VLC from the commandline?

Solution 1:

Short answer

vlc -I dummy input.wav ":sout=#transcode{acodec=mpga,ab=192}:std{dst=output.mp3,access=file}" vlc://quit

This will transcode input.wav and save the result in output.mp3. ab=192 is the audio bitrate of the output file.

Long answer

If you want to find out the corresponding command line of a VLC conversion initiated from the GUI, you can do this:

  1. From a terminal/console, start vlc like this vlc -vv
  2. Start a conversion in the VLC GUI as normal.
  3. Scroll back in the console history and find the line starts with qt4 interface debug: Transcode MRL:
  4. The rest of that line contains the corresponding vlc command line parameter.

Note: My version of VLC is 2.1.0-git Rincewind and I'm on Linux...

Solution 2:

I tried following the other answer in windows, but I couldn't get the logging to work correctly on the command line, so here is what I did:

METHOD 1

I was able to use VLC's internal logging window to see it:

Open VLC, go to Tools -> Messages

Set Verbosity to 2 (Debug)

Then do your conversion, and everything will be logged in the messages window. Do a search for "sout=#transcode" or "qt4 debug" to find the line with the conversion settings.

Source

METHOD 2

Instead of looking at the log, you can view the profile directly. If you want to use custom settings, just create a new profile of the settings you want.

The profiles (custom and built in) are stored in an ini file, located at

%AppData%\vlc\vlc-qt-interface.ini

for me this is

C:\Users\chiliNUT\AppData\Roaming\vlc\vlc-qt-interface.ini

The profiles are located under the section called

[codecs-profiles]

Source

A sample from my file is:

[codecs-profiles]
1\Profile-Name=Video - VP80 + Vorbis (Webm)
1\Profile-Value="video_enable=yes;video_codec=VP80;vcodec_bitrate=2000;vcodec_framerate=0;vcodec_width=0;vcodec_height=0;audio_enable=yes;audio_codec=vorb;acodec_bitrate=128;acodec_channels=2;acodec_samplerate=44100;muxer_mux=webm"
2\Profile-Name=Video - H.264 + MP3 (TS)
2\Profile-Value="audio_enable=yes;audio_codec=mpga;acodec_bitrate=128;acodec_channels=2;acodec_samplerate=44100;video_enable=yes;video_codec=h264;vcodec_bitrate=800;vcodec_qp=0;vcodec_framerate=0;vcodec_width=0;vcodec_height=0;muxer_mux=ts"

...and there are 22 more. My custom profiles are at the bottom.

Using Windows 7 Ultimate SP1, VLC 2.1.3 Rincewind