How to Convert Videos on VLC batch/CLI? [closed]
Asked Answered
R

2

23

I need to do a mass-conversion of videos from a video recorder in the .mod format, to other file formats, e. g. .mp4.

How and where can I find detailed specifications and information about VLC's various CLI options and commands, required for converting between specific video and audio codecs, or formats, by means of an appropriate, tailored CLI command or a batch script?

Refrangible answered 21/6, 2015 at 21:3 Comment(0)
S
23

To use VLC to convert from MOD to MP4 you can use the following command:

vlc -I dummy -vvv "MyVid.mod"
--sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=MyVid.mp4}

... where:

-I dummy - Does not show the VLC GUI
-vvv - Gives you verbose output
--sout - Specifies the options to use when encoding to MP4

You can see a full list of VLC command line options by running vlc -H from the command line. There is also a comprehensive list online at https://wiki.videolan.org/VLC_command-line_help

If you don't have VLC installed locally or you want to outsource bulk video conversions you could always consider using a file conversion API such as https://developers.zamzar.com. This service provides a REST'ful API for file conversion, and mod to mp4 is a supported conversion.

Full disclosure: I'm the lead developer for the Zamzar API.

Sensuality answered 22/6, 2015 at 12:45 Comment(3)
Thanks. It works fine. Nevertheless, my need is more to know "how-to find the parameters" Today, your answer gives me the solution (thanks again) but, if tomorow, I want to convert to mpg or something else, what is the method to find the correct parameters?Refrangible
The best place to look for specific encode / decode options is the VLC documentation. They have comprehensive docs at wiki.videolan.org including detailed information on audio and video codec support (at wiki.videolan.org/Codec) and what codecs VLC can process (at wiki.videolan.org/VLC_Features_Formats)Sensuality
I just wanted to do the same thing and found that my version of VLC allows to load multiple files for conversion in the GUI under "Media -> convert/save (CTRL-R)".Taking
D
7

Thanks, your post help me. And after i find the best response for me. On Windows, if you want to convert multiples files :

for %%a in (*.mov) do "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -I dummy -vvv %%a --sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=%%a.mp4} vlc://quit
Dani answered 10/4, 2017 at 15:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.