I'd agree with Dr Mayhem's comment that it's risky to have a file with content you don't want public sitting there on your laptop hooked up to a projector. mkvmerge
, or another remuxing tool, will be able to chop up your video. I think avidemux might do well for this, since you can use the GUI to find edit points, and it supports remuxing instead of transcoding. (IDK if any full-fledged video editors can just remux if you're only making timeline changes, and cutting on keyframes.)
I just tried avidemux. It still doesn't have proper support for B frames, so tt's stuck in the dark ages. It did seem to work for cutting some segments out of an MP4(h.264/aac) and saving to an mkv. It did warn about using it's workaround mode for B frames, on loading the file, though. I wouldn't use it for encoding (its x264 config dialog is terrible), but it does appear to work for remuxing.
But anyway, if you're confident that un-authorized users won't be poking at your laptop and playing files you want to keep private, I do have a proper answer for your question.
mpv supports "edit decision lists" in a similar format to what mplayer uses. (It's a fork of mplayer that drops some old drivers, and focuses on new features, like better colorspace defaults. mplayer is mostly focused on being stable / backwards compatible, which prevents some kinds of changes.) It runs on all 3 major desktop OSes.
The EDL format is similar to mplayer's, but mplayer takes an EDL as an option while playing a different file. Mpv instead has an EDL demuxer, so an EDL is an input file that references other files. (mpv can thus play multiple files as if they were one long seamless file, for the purposes of seeking.)
Anyway, mpv's EDL format uses filename,start,length
tuples. (note: length not end point):
# mpv EDL v0
input.mkv,5,13
input.mkv,42,10
input.mkv,60,10
input.mkv,112.2,3.2
Then you run mpv on that file (mpv my-segments.edl
, or double click or whatever).
The edl://
syntax is for putting the contents of the edl on the command line, without using a separate file.
This appears to be fairly robust. Even with the seek controls, I can't play parts of the file outside the virtual stream created by the EDL. Chapter seeks go to EDL segment boundaries. (I haven't tried it on an mkv with chapters, or a DVD.)
Actually, you CAN escape the EDL virtual stream, but only by 2 seconds into the part of the file before the first segment. So there's no issue if your first segment starts at the beginning of a file. (Accurate-seek by 1 sec backwards, and frame-step-backwards, are the commands that can take you to negative 2 seconds into the stream.) If that's an issue, unbind those keys in an mpv.conf
file.
If your file has chapters, you can use those instead of seconds. (see the end of the edl-mpv.rst doc I linked).
If your edit points are far from a previous keyframe, mpv will pause briefly while it decodes from the seekable I frame up to the exact frame you told it to start on. This could be noticeable with a slow CPU and HD content, if it has to decode hundreds of frames.
I was surprised how well mpv does at being seamless with this, with seeks back and forth across an edit point being really fast. And even frame-step backwards obeys the edit list (except when you go off the beginning by up to 2 secs.)