Start-time, Stop-time WORKING examples cmd line & playlist

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
KBRB
New Cone
New Cone
Posts: 8
Joined: 04 Aug 2007 08:06

Start-time, Stop-time WORKING examples cmd line & playlist

Postby KBRB » 05 Aug 2007 23:23

Start-time and Stop-time WORKING examples

The following worked for me, using VLC 0.8.6a on Win98SE


I am trying to work out the corrrect syntax to do the following:

(windows VLC 0.8.6)

VLC starts

goes fullscreen

plays a playlist

In the playlist:

a video (avi, mpg etc) plays for 1 minute

then VLC switches to webcam feed for 1 minute

then the video keeps playing, or another video starts


Using this post as an example:
--------------------------------- clip -----------------------------
Post by dionoea on Tue Jul 24, 2007 12:35 pm
This should work:


vlc file.avi :start-time=<t1> :stop-time=<t2> file.avi :start-time=<t3> :stop-time=<t4> file.avi :start-time=<t5> :stop-time=<t6> vlc:quit

Antoine Cellerier
dionoea
--------------------------------- end ----------------------------------------------

I made the following batch file, stuffed 3 test avi's into the VLC directory
with it and executed it

vlc cat.avi :start-time=0 :stop-time=10 Flying.avi :start-time=0 :stop-time=12 khyber.avi :start-time=40 :stop-time=60 Flying.avi :start-time=20 :stop-time=80


THIS WORKED GREAT!

As a bonus, because I had set VLC prefs to REPEAT ALL, it continued to run in a loop.

When I turned off REPEAT ALL and turned on SINGLE INSTANCE in the settings,
I could preview all AVI's in a folder with a batch file containing this:

for %%r in (*.avi) do vlc %%r :stop-time=5

(use %r instead of %%r if from the command line, not in a batch file)

Depending on the avi's it either worked or stalled.

OK, that was neat...

But how about playlists?

After much effort, I got vlc looping then stopped it, saved the playlist,
renamed it to a text file and found something that could be adapted to

THIS: ( I call it works.m3u)

#EXTM3U
#EXTVLCOPT:start-time=15
#EXTVLCOPT:stop-time=25
FLYING.AVI
#EXTVLCOPT:start-time=15
#EXTVLCOPT:stop-time=25
KHYBER.AVI
#EXTVLCOPT:stop-time=10
FLYING.AVI
#EXTVLCOPT:stop-time=8
KHYBER.AVI
#EXTVLCOPT:start-time=65
FLYING.AVI
#EXTVLCOPT:start-time=75
KHYBER.AVI


Note that the playlist will obey VLC PREFERENCES, so play forever, stay on top, fullscreen, etc can be set beforehand.
Note also that this M3U file is IN the VLC directory and so are the AVIs.

I can start the whole process with a batch file from the VLC directory
that has this in it:

VLC works.m3u

If the pref are not set for FULLSCREEN, I can force it with a batch file that has this in it:

VLC -f works.m3u

(Note that I am running this from the VLC directory. Other usage may involve setting the PATH
environment variable so that VLC can be run from anywhere.)

Now what I really really want to do is stuff some webcam feed into the PLAYLIST
with a stop-time

But I dont have a direct show web-cam hooked up yet.

When I do, I will post the results

Or some nice person could perhaps????????


This is a re-occurrant VIDEO ART INSTALLATION problem..

Everyone and their brother-in-law wants to stuff a surveilance camera's live feed
into a video.

In the past i have made horrible kludge mechanical switch-boxes that used a motion detector and or audio line input through an isolation xformer to motion detector circuits to throw DPDT relays switching compossite feed from a DVD and a live cam...

BLEH!

If a DSHOW webcam or composite video in from a capture card, can work with stop-time, this would give a nice juicy VGA output for higher resolution stuff..

Mad scientist laugh time: MWAAAHHHHH HAAHHH HAAHHH !

Cheers..
KBRB

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby dionoea » 07 Aug 2007 15:42

You won't be able to use --start-time and --stop-time with a live video feed. You'll need to use the --run-time option which is only available in VLC 0.9.0 (the developement version).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

KBRB
New Cone
New Cone
Posts: 8
Joined: 04 Aug 2007 08:06

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby KBRB » 08 Aug 2007 00:50

Thanks for the tip!

I am SOOOOOO lucky that the run-time command is being finished, it is just in time for my project.

Which of the development versions or nightly builds would you recommend for maximum stabilty with
DSHOW + run-time plus stop-time start-time playing of mpegs..???

Or is the newest nightly build usually the best??

And any low-cost video (composite) cards (no TV needed) that work well with dSHOW and VLC
on a list somewhere, or that can be recommended??

Thanks..
KBRB

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby dionoea » 08 Aug 2007 14:59

As long as you don't want to use the interface, the latest nightly is the best.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

CloudStalker
Big Cone-huna
Big Cone-huna
Posts: 2581
Joined: 14 Jan 2007 19:00
VLC version: OVER 9000!!!
Operating System: It's...blue screen
Location: Heaven? No no. What's that other place that starts with an "H"? Oh yes: Home. ^_^

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby CloudStalker » 08 Aug 2007 18:07

Yeah, speaking of the latest nightly build what's up with the seek bar being at the top? It just doesn't feel right anymore. Is there a way for me to change it back to the way it was?

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: Start-time, Stop-time WORKING examples cmd line & playlist

Postby Jean-Baptiste Kempf » 08 Aug 2007 18:31

No. Wait until I rebreak everything...
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.

KBRB
New Cone
New Cone
Posts: 8
Joined: 04 Aug 2007 08:06

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby KBRB » 08 Aug 2007 20:45

I tried last night's build..
killed the pref file, uninstalled 0.8.6a
installed it...

Wow, is it ugly (ok, I know)
and there is this silly dos window in the background going that my machine is too slow,
and that I have messed up the playlist.
ANd I cant make it disappear.

and It wont do the stuff I did before with batch files.
and I cant get the run-time to work.
Servesme right for testing this on a 300MHZ laptop win win98SE on it..

So I went back to 0.8.6a
and killed may caches again, but noe things are a bit wonky, but mostly working..

Which I will figure out...

So.. Is there a "beta" that looks a bit more like the release version that has the run-time
working in it for N00Bs like me???

Otherwise I guess I keep trying the nightly builds..

KBRB.

CloudStalker
Big Cone-huna
Big Cone-huna
Posts: 2581
Joined: 14 Jan 2007 19:00
VLC version: OVER 9000!!!
Operating System: It's...blue screen
Location: Heaven? No no. What's that other place that starts with an "H"? Oh yes: Home. ^_^

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby CloudStalker » 08 Aug 2007 23:31

When deleting the preferences do this from the Application Data folder (C:\Documents and Settings\User (you)\Application Data ("Show all hidden files and folders")\vlc.) Delete the entire "Cache" folder.

I haven't noticed anything in the nightly builds to be "ugly" except for the most recent seek bar at the top thing (not a complaint j-b, just an observation).

Maybe with the right skin it'll look better. Here's how mine looks:

Compact mode:
Image

Full mode:
Image

I can't say it looks ugly, in fact it looks a lot better then the previous wxWidgets inteface. 8)

tuberoseinrain
New Cone
New Cone
Posts: 7
Joined: 30 Dec 2019 04:18

Re: Start-time, Stop-time WORKING examples cmd line & playlist

Postby tuberoseinrain » 30 Dec 2019 04:35

It is extremely easy to make skip(s) in the playback of a video (and possibly an audio) file in VLC. Follow these steps:

1. Open the video file in VLC.

2. Click on the “File” tab and the last option would be “Save Playlist”. Click on it. (This is how it looks on mac, and I assume it should be the same on Windows version of VLC as well. If not, you only need to find the “Save Playlist” option in one of the tabs.)

3. In the opened window, write an optional name and make sure the selected format is M3U (.m3u). Then save it exactly in the folder in which the video (or audio) file is located.

4. Then go to that folder and open the created m3u file with TextEdit on mac (or with Notepad on Windows).

5. If, for example, the name of your video file is “School.mkv”, then the text in the m3u file is something like the following text.
(For those who might not know, the “.mkv” in the mentioned name is not a part of the actual name and it is actually the format of the file in our example and it can be different for different types of files. So the name of the file in our example is “School”)



#EXTM3U
#EXTINF:617,School.mkv
School.mkv



6. In this step you need to add the following command to the above-mentioned text:

Let’s imagine the video file’s duration is 10:17 and you want VLC to skip from 2:47 to 4:51 during the playback. For this purpose, you first need to convert these times to seconds.

For converting times to seconds, you can use this free online tool:

https://www.tools4noobs.com/online_tools/hh_mm_ss_to_seconds/


So based on our example, you want VLC to play the video file from second 1 (0:01) until second 167 (2:47) and then from second 291 (4:51) until the end which is second 617 (10:17). So the code you should prepare will look like this:



#EXTVLCOPT:start-time=1
#EXTVLCOPT:stop-time=167
School.mkv
#EXTVLCOPT:start-time=291
#EXTVLCOPT:stop-time=617
School.mkv


7. Then you should add this command to the original text in the m3u file. The final result based on our example looks like the following code. Please note that you should delete the “School.mkv” which is mentioned in the third line of the original m3u file:


#EXTM3U
#EXTINF:617,School.mkv
#EXTVLCOPT:start-time=1
#EXTVLCOPT:stop-time=167
School.mkv
#EXTVLCOPT:start-time=291
#EXTVLCOPT:stop-time=617
School.mkv


8. Save the changes. Then instead of opening the video file, open the m3u file with VLC.

That’s It!!! VLC will play the portions of the video you have indicated in the m3u file.


A few points to mention:

1. If you want multiple skips in different parts of the video, you can simply add more same commands. For instance, in the following code there are two skips (from 2:47 until 4:51 and from 7:02 until 9:25):

#EXTM3U
#EXTINF:617,School.mkv
#EXTVLCOPT:start-time=1
#EXTVLCOPT:stop-time=167
School.mkv
#EXTVLCOPT:start-time=291
#EXTVLCOPT:stop-time=422
School.mkv
#EXTVLCOPT:start-time=565
#EXTVLCOPT:stop-time=617
School.mkv



2. Don’t change the number that is mentioned in the second line of the original m3u file. In my example it is 617, but it will be different in other examples. So you don’t need to change it. (It is actually the total duration of the video file in seconds).

3. These skips will not ruin the lip-sync or subtitle-sync and everything will work well.

4. Don’t forget to include the video file’s format next to the name of the file. As you see above, I have written (.mkv) wherever I have mentioned the name of the video file.


Good Luck


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 25 guests