VLC command line usage and playlist file question

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
sparker366
New Cone
New Cone
Posts: 2
Joined: 15 Nov 2010 15:55

VLC command line usage and playlist file question

Postby sparker366 » 14 Jan 2013 17:33

I posted this in this forum as its not really a windows specific question though I do use VLC for windows.

I am writing a script in Autoit and its purpose is so that I can organize my videos. I am not a fan of video library apps as they are more complicated then I need them to be.

What this script does is it reads a video directory and populates it with all the folders in it. I then can select the files I want using checkboxes and then a destination directory and move it. I haven't got all the code done yet but its about 50% there.

What I would like to do is after I select the files I want to deal with is to build a playlist for vlc to use and pass that to it via the scripts run command which basically like running it from a command prompt. I will have vlc's path hard coded into the script with a space on the end of it then add any command line switches I need to load the playlist

Now I have the full path and file name of the video file I want to work with. Can I just output that to a standard text file and use that as a playlist? If not then I guess I am up a creek without a paddle as I don't know squat about xml. I did look at a saved playlist and its an xml file and I know nothing about it.

VLC will be run from the script I am creating. I will be able to create a text file from that script for the playlist then pass vlc the full path to that play list file. It would be a lot faster to use a playlist then to play each video one at a time. This way I can see if I want to keep the video it I do keep it checked if not then uncheck it and continue do the move then when all files are moved then select the remaining files and delete them

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: VLC command line usage and playlist file question

Postby mederi » 14 Jan 2013 23:25

You can simply append videos to VLC executable in one command line:

Code: Select all

"c:\Program Files\VideoLAN\vlc\vlc.exe" "d:\my videos\video1.avi" "d:\my videos\video2.avi" ...
If you still need to generate a playlist file first and XSPF format is too complicated for you, then try to save playlist as M3U and check its structure. The simplest M3U playlist contains only list of paths to your videos, for example "Playlist.m3u":

Code: Select all

d:\my videos\video1.avi d:\my videos\video2.avi ...

sparker366
New Cone
New Cone
Posts: 2
Joined: 15 Nov 2010 15:55

Re: VLC command line usage and playlist file question

Postby sparker366 » 14 Jan 2013 23:36

Thanks for the reply

So if I create a text file like that and save it with an .m3u extension then vlc will add those to the play list? That is really all I need. I just want to quickly cycle through the list of videos selected and determine if I want to keep them. So I can call videolan like this "c:\Program Files\VideoLAN\vlc\vlc.exe" "c:\my videos\playlist.m3u"

Ok I did the above and it works perfectly. How ever there are several off topic issues. I added a file to that play list and it couldn't be played. Said there was some type of error, No logging wasn't enabled. I went back in and enabled it and then ran the playlist again and it errored out on me. Nothing was written to the log file. How can I get that to work. I did find out what the issue was due to double clicking the playlist and it opening up in windows media play and it was a bad extension. I missed copied a filename

Second thing is I have videolan set to use a predefined window size when it opens up a video. Well the first video in the playlist opened up just fine. The second video forced videolan to a bigger window then what I defined. Now when I play that same file by itself not from a play list it plays at the correct window size. I really don't like videolan autoresizing itself to display the video. That is why I set a preset video window size in preferences > All > Video > I did fix this by resetting preferences then redoing my window size in there.

It still won't play that video from a play list getting this message displayed "VLC is unable to open the MRL". Now the path is correct and the file name is correct. It seems that it can't play more then one video in the play list from what I am seeing. The 3 files play just fine by themselves but when 2 of them are added to the playlist file in my text editor they error out and won't play. Now I deleted all the entries in the list and put 3 more files from another directory and those worked just fine.

Any way to fix the logging issue. I would really like to to see why its having issues with playing files from the playlist I created. I know the path and filenames are correct.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 74 guests