Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 726
Olivier Gerault Avatar asked Jun 21 '15 21:06

Olivier Gerault


People also ask

Can you batch convert in VLC?

Batch conversion in VLC works the same regardless of whether you're converting audio or video. The process is exactly the same and contains only a few steps. The actual conversion process may take time though – video files especially are very large and even powerful computers need time to work on them.

How do I close a command line in VLC?

On the command line just add vlc://quit on the end of your command.

How to batch convert media files in VLC?

So be patient! Here’s how to batch convert media files in VLC. Open VLC. Select Media and ‘Open multiple files’. Click Add and select all of the files you want to convert. Click the small down arrow next to Play in the bottom right. Select Convert.

How do I convert audio to video on VLC?

It’s packed with useful features, including a quick and easy audio and video converter that’s just a few clicks away. To start converting, open VLC and click Media > Convert/Save. Click “Add” to the right of the File Selection list on the File tab. Browse to the video or audio file you want to convert and open it.

How to convert a video file to a batch file?

It’s easy to use VLC as a free batch video converter. Open the VLC and press “Ctrl + R”, then you can see the Convert / Savewindow. And from there, add as many files as you want to the file selection box and click on the “Convert / Save” button. Next, choose an output profile and start the batch conversion.

How do I add files to my VLC media player?

From VLC menu bar click on Media > Convert/ Save[Shortcut: CTRL + R] Open Media dialog boxis opened. Click on the Addbutton to browse for the files that you want to add. Then click Open.


2 Answers

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.

like image 109
Chris Whyley Avatar answered Sep 17 '22 20:09

Chris Whyley


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
like image 27
Plici Stéphane Avatar answered Sep 19 '22 20:09

Plici Stéphane