0

Watching movies with my friends, but friends request pausing movie and go out to get smoke. I want to pause movie in pre-selected point where break do not destroy movie atmosphere.

Thinking about some windows media player where could be predefined time when playback perform auto-pause. Than could be easily started by e.g. PAUSE keypress. Currently using MPC-HC on windows, but I am ready to preform reasonable change.

Anyone have idea how to do this?

0

1 Answer 1

2

The below solution works for me in VLC in Linux. VLC is also available for Windows. I believe there's nothing specific to Linux in the solution.

  1. Create a playlist file (.m3u or .m3u8) containing something like this:

    #EXTM3U           
    #EXTVLCOPT:play-and-pause
    #EXTVLCOPT:start-time=60
    #EXTVLCOPT:stop-time=3600
    movie.mp4
    #EXTVLCOPT:play-and-pause
    #EXTVLCOPT:start-time=3600
    #EXTVLCOPT:stop-time=6000
    movie.mp4
    #EXTVLCOPT:play-and-pause
    #EXTVLCOPT:start-time=6000
    #EXTVLCOPT:stop-time=7200
    movie.mp4
    #EXTVLCOPT:start-time=6000
    movie.mp4
    

    This defines 4 entries. Each one is a fragment of movie.mp4. The first one starts at 60 second mark (to skip logos and such) and ends at 3600 (1 hour). The next two are 3600–6000 and 6000–7200. The last fragment is from 7200 second mark (2 hours) to the end of the file.

  2. Run the playlist with vlc.

Notes:

  • play-and-pause should be explicitly specified for each entry that should auto-pause at its end.

  • movie.mp4 is a path relative to the location of the playlist file. The example requires movie.mp4 and the playlist to be in the same directory. You can use absolute paths, see M3U file format on Wikipedia.

  • You don't need to stick to just one video file; different entries can point to different videos. The entire Back to the Future Trilogy as one "seamless" clip? Sure.

  • It's still a playlist. You can move to the next entry with the "next media" button or hotkey. The same for "previous".

  • Precise navigation is not quite straightforward though:

    • If you jump forward beyond stop-time of the current entry, the player will pause. Then if you resume, it will play from the beginning of the next entry (which will become current).
    • If you jump backwards beyond start-time of the current entry then the player will not go back to one of the previous entries. Only stop-time of the current entry matters. Do not expect the player to pause at stop-time of some non-current entry.

    So if you need to navigate, use "next media"/"previous media" to get to the beginning of the right entry, then navigate more precisely within the entry.

  • My solution is partially based on Skipping parts of a video that contains adult content. Few answers there deal with playlists in XML format. I guess you can adapt the solution to the XML format if you wish.

2
  • Thanks, it look like what I need. Is there any documentation for EXTVLCOPT tags? Oct 13, 2020 at 22:08
  • @user2956477 I think I saw something (on VLC wiki?) few years ago. While answering your question I couldn't find it though, I just knew EXTVLCOPT is a thing and I studied examples from the Internet. It seems it's a way to specify an option; another way is via a command line. See vlc --help, it mentions --start-time, --stop-time, --play-and-pause and many other command line options. You probably can use many (most? all?) of them with EXTVLCOPT:, just drop the leading dashes. Oct 13, 2020 at 22:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .