Using VLC Media Player, if you want to play a certain portion of a video/audio and then skip some segments and then resume playing, then there is a special playlist trick that can be used. The bookmark feature in the player is useful for bookmarking and playing the currently active media file at different points or time. But once the player is shut off or closed, the bookmarks are lost forever. If you want to keep the bookmarks in VLC for the next time, then use this special trick. It’ll allow you to play only certain parts of a video.
This special trick allows you to specify a video file as well as the start and end time for it. There can be multiple start and end points for a single video. If needed, you can open multiple videos—one at a time—with specific start and end times.
If it sounds complicated, then think of it like this: You open a video, instead of playing it from the start you directly navigate to some point in the video and play it until it reaches another point. Then you can skip the portions or open up a totally different video and do the same thing. It is basically highlighting and playing only the portions of the video or audio that you want. It allows you to watch your favorite portions of a long media file or from multiple media files.
This trick is set up using a playlist that contains special instructions for the player. It might sound complicated to some but once you get the hold of it, you will be creating start and stop locations for video files like a pro.
Here are the steps to create a playlist to tell VLC to mark and play media files:
- Open up your notepad or any other plain text editor.
- Enter the start time, stop time and video file location like this:
- Save the file as .m3u file. Give it a name like playlist.m3u.
- Open the playlist using VLC.
Explaining the Playlist Instructions
It tells the start time in seconds for the video.
It tells the end time in seconds for the same video.
It is the name of the video file. We keep the playlist.m3u as well as the video.mp4 file in the same folder to keep it simple.
If there are more than one start and stop points for the same video then continue adding the start-time and stop-time along with the video file name. If there’s a different file, then change the file name as shown in the example: video.mp4 to video2.mp4.
After setting up the playlist, instead of directly opening up the media file with VLC; use it to open the playlist. It will automatically adapt to the time that you have set. Files will start to play from a certain second offset and then continue to play until it reaches the end time. Then if it needs to skip or if it needs to open another video, it will do it. Just be precise with the seconds that you enter. It might sound a bit complicated, but with correct calculations and some trial and error, you will be able to set it up easily.
80 thoughts to “How to Play Certain Sections and Part of Video and Audio in VLC”
Thanks for the article!
I have set two timeframes (A -> B and C->D)
Thing is, after the first bookmark/timeframe/A->B , it just stops the video, and does move on to the other part (C->D)
Do you happen to know a way around that? Thanks ahead!
Can we see your playlist code?
## Note that the start and stop times are marked in seconds. The filename is underneath the start/stop times. The filenames do not need full paths if they are in the same directory as the .m3u file. Files without time-markers will be played from beginning to end.
How VLC will read this playlist file:
1. Play video01.mp4 from beg-to-end.
2. Play video02.mp4 from 0.40 and stop at 2.47.
3. Play video03.mp4 from 0.11 and stop at 2.59.
4. Play video04.mp4 from beg-to-end.
5. Play audio01.m4a from 0.42 and stop at 1.18, skip to 1.44 and play, then stop at 2.35.
Is it possible to specify the playspeed also in the playlist? – ie., if I want the first song to be played at 1.25x and then the next song in normal speed & so on.
where do i find more instructions for playlist?
Is it possible to do this with a DVD?
If you can enter the path to the files on the dvd correctly, then it should work.
I wish I could find video
It was working fine for me but Now its not working…
Its just make loop arount first start and stop time.
So lemme ask this.. if I have a subtitle track imported with track 1, and I have the start and stop time for track 1 in my first track playlist, and then the second track is a different file with its own stop and start times and playlist and NO subtitles, and then the third track is the same file as the first track, in its own playlist but starting from a later part… will the subtitle track still work correctly and be synced up?
The subtitles should work with Track 1.
after a skip the subtitle .srt file doesnot keep running.. it means if in playlist there are multiple skips, and subtitle file is running from start from .srt file. Then as soon as first skip happens the subtitles stop running
Wasn’t it easier just to add “bookmark save feature” to VLC in an update, and save it in a note beside the audiofile?
Also It’d be nice if it makes a bookmark from the place you have your audio stopped.
I totally agree.
Plz bring an update ..
If not, is there any vlc plugin for the same
Thanks for the info, it is working.
But one catch is that if you rewind before a skipped portion it will not be skipped anymore,
start A, stop B
start C, stop D
If you play without any rewinding, section B-C will be skipped,
but if you reach after C and rewind back to before B, B-C will be played!
This is a limitation of the method being used.
You aren’t really skipping parts of the video, instead the way to think of it is that are setting up a list of tiles to play and for each file saying which time range to use. Even if you specify the same file for multiple entries in the playlist, only a single entry is “currently playing” and therefore only the time range specified for that entry is know about at that point in time.
If you want to skip back to a previous segment and want it to know the times for that segment you should select the relevant segment from the playlist window rather than seeking back to a time in that segment.
Hope that helps to explain how it works and how to think about it.
True. I experienced same problem. If once i manually skip a portion of video with keyboard arrows then playlist skipping will not work at all and i need to restart the playlist again.
Thank you so much!, works perfectly on vlc 3.0.8
I couldn’t get it to work with mkv =(
But it works with mp4. Just tried
this thing helped me a lot in past few months but not really working in latest update of VLC….!
Does VLC command #EXTVLCOPT:start-time accept any other time formats other than seconds. It would be great if we enter something like: #EXTVLCOPT:start-time=00.15.28. I tried that syntax, but it didn’t work. Any known workarounds would be appreciated
Converting to seconds is the only way that I know of as of now.
Don’t know how u found it but this thing is only useful thing on Internet about SKIPING CERTAIN SEGMENTS IN A VIDEO.
It plays the segments out of order on my computer (Win10, VLC 3.0.3), even though they are in the correct order in the m3u file. Has anyone else experienced this? Any suggestions?
This is an epic thread !
Million thanks, finally I found the way to let my children keep watching their lovely series without being worry of an adult scene, lol
Thank you so much !!!!!!!!!!!!!!!!!!! Helps me a lot with my language learning
Works great as shown, but was hoping to keep m3u files locally, referencing videos with URLs. This appears to partially work, as VLC begins to play at the first specified bookmark, then immediately plays the video from the beginning. Is the functionality I desire supported? I.e., can I use bookmarks for videos in the cloud?
Seems to work with local videos better.
Mapped the cloud storage as a virtual drive and all works as expected. Will need to go a different route if I push it to a webpage though.
Is it possible to make loops out of the defined parts which are then marked in the video?
So when I want to leave a loop I just need to play the next video (with the appropriate control button)
My problem is, I use a dance video to practice several figures. So I put down the start and end times of the desired parts, thus jumping to one of them and making a loop, slowing down the speed and such…
Then I go to the next part and so on.
The bookmarks feature can’t really be named bookmarks because the can’t be saved for the next session, which I really don’t understand.
With this feature explained here I’m quit blind, since I never know which part is now playing, the seventh or the eighth or whatever…
I use playlist with different videos, so I can see the name of the video in the upper left side.
But when I play only parts of one video I never know what exactly is playing now…
There’s a lot to be done here, I think…
There is no simple way in doing this. Maybe you can try the A to B loops feature in VLC?
It would be better to use a .cue file for what you’re describing but, unfortunately, the .cue format does not recognize many formats. For example, being able to create a tracklist for a single m4a file that contains a whole album. You can do with with mp3 in .cue files, but not m4a/aac. The standard should be updated and used instead of coming up with application-specific hacks.
Is it possible to get markings in the time like in the picture in the first description. I would like to have a way to add marks to timeline via external script-file like this playlist-file. These would mark the most important points in the video.
Hi, I understand that this is an old thread, but I’m having trouble with this. I followed the steps to the dot and when i open the .m3u file after opening the video it corresponds to it simply starts the video as it would without the .m3u file. Is there any trick to opening it, I have the files in the same folder.
I managed to fix it by including the full file location rather than just keeping them in the same folder
Hi ! Thank you a lot!!!
Ill like to ask you a question.
I need to create playlist of hundred of videos and use the script to play only first 30 seconds of any video. Or… a fragmente in the middle. A 30sec fragment for example.
It is possible to do it without writing the code for any single video?
I mean is possible to use the code to automaticly run on all the video inside a playlist?
Thankyou so much!! really!
I think repeating the process above for every video and compiling them into a single playlist should work.
Thanks for this, very helpful.
However, is there a way to write the script such that I don’t have to open VLC first, and then the playlist? In order to add this playlist to a bash script, for example, it would be great if we can make the playlist work when VLC is opened FROM the playlist file, instead of the other way around. Does this make sense?
Hi, I am able to play portion of audio. This article helps me a lot. But, when i am playing audio portions,Every time the cursor in vlc is moving from start instead of playing at current position as shown in picture. And how to display time portions in vlc as shown above in the picture. Is it possible to display audio portion times as shown above in the picture when i started playing file.
When I open a folder in VLC to play folder’s content, .m3u file is ignored in the folder.
how i can mute and unmute certain part of video ?
VLC won’t be able to do that much. You’d have to use a third-party editor.
i am asking if there is some command which i can write in .m3u file . This command #EXTVLCOPT:start-time=28 , starts video at 28 seconds , like wise if there exists some other command start-audio , stop-audio . Then we will be able to control whole audio/video of a movie via .m3u script.
Is it possible to skip several segments of one video file, while maintaining the correct timing of subtitles? It’s an .mkv file, so I suppose the subtiles are external, but archived in the container.
If you skip your video, the subtitles should skip as we..
>>Save the file as .m3u file.
Interesting. But why must we have another metafile for this? I already use .xsfp files for song lists which play files in sequence. And we can already add bookmarks within a song (‘tracks’). So all we need is a syntax for the length of the track, the start of the next track, and then just move sequentially on, as for songs. Right? Why another control file???
I will look into using .xsfp files.
Within the header of XSPF, can I use the option start- / stop-time options Twice? So that I only see 1 entry in my playlist for an episode, but it still skips the leader(s) of my fav TV series? I have been experimenting but VLC it only reads the second of this episode.. Why is that? How to accomplish this basic need. (1 track in playlist plays from a to b (skip c) and play again from d to e using the xspf format) I think many people want this done..
What if I want to do this but with a DVD?
Give the correct path to the location of the media files in your DVD drive and it should work.
Unfortunately that didn’t work. It played the movie but didn’t start at the specified time.
it doesn’t work for me. i use windows 10 and vlc 2.2.4
Getting the path right to the media file is the key here. Try with one media file and the .m3u file placed in the same folder.
Can you help me to fix one little annoying thing?
Lets say I have a playlist.m3u file. Inside this playlist there is:
Note, that this playlist uses the same “video.avi” file.
When I start this playlist, everything works fine – video starts at 10 seconds, ends at 20 seconds and then starts at 30 seconds and ends at 40 seconds. But there is one little annoying thing: when video ends at 20 seconds and must start at 30 seconds, there is like 0.5 second or 1 second gap, when video starts from the beginning (as I said, you can see about 0.5 or 1 second of video beginning) and then jumps to 30 seconds and starts playing from 30 seconds like it should be.
Is there any fix or something for that? I mean, I want to remove somehow that 0.5 or 1 second gap between jumps to another video part to get smooth playing.
P.S. I think that gap could be because of video loading or buffering (because as I imagine, VLC firstly starts video, and then jumps to specific time and while it does that, I can see that annoying gap), but again, I don’t know how to fix it.
OS: Linux Mint 18.1
Maybe, this tutorial might be useful in your case: https://184.108.40.206/stop-hd-video-from-freezing-vlc/ . Let us know.
I am sorry, but none of these methods works. I tried them all, but none of them seems to work. Besides, all my videos are not even HD, they are 640×480. I also tried with a different type of videos, like .mp4 and others but that happens in all of them. I guess it could be linux issue then.
Strange that you don’t find it annoying that you see the video twice in your playlist..
Imagine a 10 season TV-series with 24 episodes each, you’ll end up with 480 entries: bloody annoying! One good thing though: you don’t have to hear/see the 240 SAME leaders, wich is the most annoying thing of them all.
There sould be a simple solution using the XSPF format..But I dont yet know HOW. Anyone?
I had this issue too. I solved it by copying the files to a cache folder on an NVME m.2 drive before adding them to the playlist. Problem solved. No delay.
I am trying to play a portion of copied dvd files using this feature. The full length of DVD is 1:30:00
The index file in the DVD is “vts_01_0.ifo” and media files are “vts_01_1.vob” “vts_01_2.vob” “vts_01_3.vob” and so on. I tried as following
I also tried…
But it is not working. Even no error message is displayed. Please let me know what is the problem ??
I think you have to use the .vob files instead of the index (.ifo) files.
I know the post is a year old, but it was super useful to cut some annoying outro from some archived webseries =] one little tip: if you have to do alot of videos to *cut* use excel (or whatever die openoffice variant is called) and make a formel like *=(D1*60)+D2* in an box to quickly get that second number (d1 is minutes and d2 seconds)
Can I get the video to stop at end time and WAIT for me click something before it plays next piece?
I need this for presentation to make sure I narrate all the stuff before next segments starts?
I think that it is not easily possible. You can use the manual controls like pressing the space bar to pause if you do not finish narrating. You can also try adding the
vlc://pause:99999in the m3u playlist to pause it for 99999 seconds which I think will be enough for you to finish speaking.
how to pause itune？ is there a command like vlc:// pause:99999
Not sure about iTunes but VLC can be paused by the command that you mentioned. According to VLC wiki, vlc://pause:
– To pause the playlist for the number of seconds specified.
In VLC’s preferences you can go to the Playlist section and choose the “Play and pause” behavior, where for each playlist entry it will pause at the very end until you press the “next track” button.
Does this work for music? MP3, FLAC, and stuff?
if I want to add subtitles, how can I do that? thanks
See this post: https://220.127.116.11/load-external-subtitle/
Thank you very much!
Videos play as intended.
However my progress bar stays single, static, filled up to the start position, shows no progress and the moving button is missing.
And shows no time line as seen in the screenshot.
No matter how many start/stop instructions.
This is ubuntu 14.04 vlc 2.0.8
Many thanks in advance.
did u get solution for this.
However my progress bar stays single, static, filled up to the start position, shows no progress and the moving button is missing.
And shows no time line as seen in the screenshot.
I am also looking for the solution for above points.
I have been looking for a way to do this for ages.
Just a follow up on my question:
so I typed:
1-note of VRF
a window pops up with this error notification
File reading failed:
VLC could not open the file “C:\Users\mohjamal\Videos\PD SIR- DC CLASS\2. 29 April – VDC\1-note of VRF” (Bad file descriptor).
Your input can’t be opened:
VLC is unable to open the MRL ‘file:///C:/Users/mohjamal/Videos/PD%20SIR-%20DC%20CLASS/2.%2029%20April%20-%20VDC/1-note%20of%20VRF’. Check the log for details.
Now, I don’t have a problem with the bookmarked intervals, they are playing ok, but am afraid this pop-up window error message would cause any problem in the future.
Just add the # symbol in front of the line with the bookmark names.
#1-note of VRF
Can i name these bookmarked intervals, for instance:
(note on reconnecting fiber)
When the input is in seconds, can I read them from the time bar or do I have to calculate them ? (like 01:02:08,000 = 3728 seconds)