X

How to Play Certain Sections and Part of Video and Audio in VLC

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:
    #EXTVLCOPT:start-time=28
    #EXTVLCOPT:stop-time=36
    video.mp4
    #EXTVLCOPT:start-time=500
    #EXTVLCOPT:stop-time=550
    video.mp4
    #EXTVLCOPT:start-time=900
    #EXTVLCOPT:stop-time=1100
    video2.mp4
  • Save the file as .m3u file. Give it a name like playlist.m3u.
  • Open the playlist using VLC.

Explaining the Playlist Instructions

#EXTVLCOPT:start-time=28

It tells the start time in seconds for the video.

#EXTVLCOPT:stop-time=36

It tells the end time in seconds for the same video.

video.mp4

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.

View Comments (89)

  • Found out why *I think* ?
    VLC is prefixing the file with the location of where the m3u file is?

    Your input can't be opened:
    VLC is unable to open the MRL 'file:///F:/Temp/TestFile.mp4'. Check the log for details.

    I even copied the file into the VLC folder????
    The m3u file is in F:\Temp\

  • Complete novice here...I have clips that a friend made up a DVD of for Halloween, which I'm trying to play around with the sequence. Though having really trouble even finding the chapters (clips) with the start time, stop time and video file location like this: #EXTVLCOPT:start-time=28 as suggested. Please could you very simply explain to me as a complete newbie, where these need to be found and what need to happen from there?

  • 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!

    • ->Save playlist to file
      ->open playlist (ctrl+o)
      ->custom bookmark>manage (ctrl+b)
      ->create bookmark>close
      ->save playlist to file (overwrite existing)

      Next time you open the playlist you can jump to the custom bookmark

    • #EXTM3U
      video01.mp4
      #EXTVLCOPT:start-time=40.017
      #EXTVLCOPT:stop-time=167.383
      video02.mp4
      #EXTVLCOPT:start-time=11.000
      #EXTVLCOPT:stop-time=179.000
      video03.mp4
      video04.mp4
      #EXTVLCOPT:start-time=42.000
      #EXTVLCOPT:stop-time=78.000
      #EXTVLCOPT:start-time=104.000
      #EXTVLCOPT:stop-time=155.000
      audio01.m4a
      ## 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.

  • It was working fine for me but Now its not working...
    Its just make loop arount first start and stop time.

    • Works great but once it reaches the end time it just jumps back to the start time rather than moving on to the next episode even with the loop switch toggled to off. I can manually skip to the next episode which is not the end of the world but if anyone knows how to stop the looping, assistance would be greatly appreciated 👍

  • 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?

      • 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