Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I find the command line documentation a little overwhelming, given that I know almost nothing about codecs and the like...

So the following is exactly what I'm doing in VLC (1.1.11) and it would be great to know what the exact command line equivalent of this would be:

  • in Media -> Convert/Save
    • add a file and click on Convert/Save
    • add the name of the destination file
  • in Settings -> Profile
    • select "Audio - MP3"
  • click Start
share|improve this question

1 Answer 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...

share|improve this answer
    
Great Answer thanks a lot. Is it possible that some parts of the command (mpga,bitrate) from the short answer are dependent on the input-file (other than the name of course)? Since I do get a different result than when doing it within the Gui: your command -> ~60MB, GUI -> ~40MB. Actually I do it just to reindex an mp3-file so it's an mp3-to-mp3-"conversion", so your solution would work for me, but it could be interesting for people searching for this. I'm on windows tried to get the long answer to work in the command line and in cygwin but didn't get any output in the console. –  Jennifer Owens Feb 17 '12 at 2:12
    
acodec and ab does not care about the input file. However, the input file must have an audio track for these to be effective. By default, the GUI transcodes to MP3 with 128 kb/s bitrate. With my command, you had 192 kb/s as bitrate. 60 / 40 = 192 / 128. –  joctee Feb 17 '12 at 9:21
    
What did you mean with reindexing an mp3-file? –  joctee Feb 17 '12 at 9:31
    
Awesome thanks for the explanation. What I mean with reindexing based on a users point of view is trying to solve the following: Arbitrary access of specific time points doesn't work with the original, e.g. I'm playing it in my MP3-Player try to repeat the last few seconds and it might actually go forward. You hear sth. at 45 minutes 30 seconds but when you manually fast-forward so that 45 min. 30sec is displayed it is at a completely different point. I don't have this with other mp3s only from a certain source and doing this conversion solves it. –  Jennifer Owens Feb 18 '12 at 0:23
    
Jennifer: Feel free to accept my answer if you are satisfied with it. :) –  joctee Jan 7 '13 at 17:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.