Transcoding audio via command line

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
SciFry
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2013 19:18

Transcoding audio via command line

Postby SciFry » 10 Apr 2013 19:31

Hello,
I am looking into writing some scripts to convert audio files from one format to another (such as WAVE to MP3 and MP3 to WAVE)

I found this link online and tried to run the sample script on a sample song (within that directory), but it no longer seems like it's a valid syntax.

Code: Select all

PS C:\Users\bla\Documents> vlc -I dummy -vvv "06 Twisted Transistor.mp3" --sout=#transcode{acodec=fl32,channels=2,ab =128,samplerate=44100}:standard{access=file,mux=wav,dst="output.wav"} vlc://quit At line:1 char:77 + vlc -I dummy -vvv "06 Twisted Transistor.mp3" --sout=#transcode{acodec=fl32,cha ... + ~ Missing argument in parameter list. At line:1 char:134 + ... ard{access=file,mux=wav,dst="output.wav"} vlc://quit + ~ Missing argument in parameter list. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingArgument
I looked at the docs and found the transcoding documentation, but it didn't come with examples and I am not sure how to get it up and running. Could someone point me in the right direction and maybe give me some sample code on how the docs work for transcoding audio. Thank you!

The docs that I believe are relevant:

Code: Select all

Audio: --sout-transcode-aenc=<string> Audio encoder This is the audio encoder module that will be used (and its associated options). --sout-transcode-acodec=<string> Destination audio codec This is the audio codec that will be used. --sout-transcode-ab=<integer [-2147483648 .. 2147483647]> Audio bitrate Target bitrate of the transcoded audio stream. --sout-transcode-alang=<string> Audio Language This is the language of the audio stream. --sout-transcode-channels=<integer [-2147483648 .. 2147483647]> Audio channels Number of audio channels in the transcoded streams. --sout-transcode-samplerate=<integer [-2147483648 .. 2147483647]> Audio sample rate Sample rate of the transcoded audio stream (11250, 22500, 44100 or 48000). --sout-transcode-audio-sync, --no-sout-transcode-audio-sync Synchronise on audio track (default disabled) This option will drop/duplicate video frames to synchronise the video track on the audio track. (default disabled) --sout-transcode-afilter=<string> Audio filter Audio filters will be applied to the audio streams (after conversion filters are applied). You can enter a colon-separated list of filters.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Transcoding audio via command line

Postby Jean-Baptiste Kempf » 10 Apr 2013 19:51

Put the "" around your sout argument.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

SciFry
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2013 19:18

Re: Transcoding audio via command line

Postby SciFry » 11 Apr 2013 00:11

Put the "" around your sout argument.

Code: Select all

PS C:\Users\bla\Documents> vlc -I dummy -vvv "06 Twisted Transistor.mp3" "--sout=#transcode{acodec=s16l,channels=2,a b=128,samplerate=44100}:standard{access=file,mux=wav,dst="output.wav"}" vlc://quit
That made it run, but I did not get the output.wav file.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Transcoding audio via command line

Postby Jean-Baptiste Kempf » 11 Apr 2013 00:30

because it should be after the = and not aroudn the dst
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

SciFry
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2013 19:18

Re: Transcoding audio via command line

Postby SciFry » 11 Apr 2013 02:21

because it should be after the = and not aroudn the dst
Fixed, You sir are a beautiful human being, thank you for your patience and time! :D

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Transcoding audio via command line

Postby Jean-Baptiste Kempf » 11 Apr 2013 15:14

Cool ;D
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 52 guests