Page 1 of 1

Windows Command Line Batch File (Conversion Profile)

Posted: 19 Dec 2014 05:38
by steve333
Can you please let me know what is the current syntax I should use for VLC in a Windows batch file?

The various references I can find are old and much has changed in VLC since they were written.
I made a couple of attempts, but just got unhelpful error messages.

What I would like to do is convert various Video files (MPEG2 mostly) into MP4.
I would like to use a pre-set profile eg. standard "Video - H.264 + MP3 (MP4)", or one I create specifically for the job.

But I can find no reference to how to select a conversion profile with VLC at the command line.
Nor can I find a way to grab the actual settings which are used internally by the profile in the graphical environment, in a format in which they can be used as command line options.

Can someone please help?

Re: Windows Command Line Batch File (Conversion Profile)

Posted: 19 Dec 2014 15:28
by mederi
https://wiki.videolan.org/Transcode/
https://wiki.videolan.org/Documentation ... ng_the_GUI
https://wiki.videolan.org/Documentation ... _Examples/
Use the streaming wizard GUI (Media > Stream...) and check the selected values in the final "Generated stream output string" you could use in your batch script.

Code: Select all

set vlc="C:\Program Files\Videolan\VLC\vlc.exe" set options=--sout=#transcode{...}:standard{access=file,mux=mp4,dst="%%f.mp4"} vlc://quit for %%f in (*.mpg) do %vlc% "%%f" %options%

Re: Windows Command Line Batch File (Conversion Profile)

Posted: 20 Dec 2014 01:21
by steve333
Thanks for the quick reply.

I had not seen the new VLC "stream" menus ....
I can see that they now refer to the same named profiles as the "convert" menus. This is a significant improvement.

I knew that the "stream" menu provided the parameter string (for editing), but haven't had any reason to look at it for a long time, and it didn't previously have any reference to the "profiles" (or easy access to transcoding options).

I have previously read the other (old) documentation and found various problems, but I'll try again.

From memory the main showstopper was that I couldn't get "-I dummy" or "vlc://quit" to work.
So I got a new VLC graphical window opened for every file converted, which is untenable when trying to batch process a number of files. (I'm using WIndows 7 64bit)

Suggestions:
It would be much nicer if it was possible to specify something like:
--profile "My Saved Profile"
It would be useful if the "Preferences" could be saved to a named file and referenced with a command line option like:
--preferences "My Saved Preferences"
This would nicely work around the complex issues of the many confusing overlaps between the global preferences and the profile settings.