12

I want to watch a video with my family, but it has a few bits of adult content.

Is there any VLC setting or extension that can be used to skip predefined part of a video. Or may be some hack like hex editing the video file and filling that specific part with random bits. I don’t care if the movie goes black for those few seconds.

The one way could be cutting the video file and joining the parts, but that’s time consuming.

  • 1
    I don't think it's that expensive to just cut it. Depending on your video format you might be able to get away with VirtualDub which has a very lean interface that allows you to quickly cut. – sinni800 Nov 22 '13 at 17:49
3

If you chop random bytes out the movie is likely not playable. The player might crash or fail to resynchronize the stream – the video might just stop. Plus, you're gonna have a hard time figuring out where the "adult" bytes are, so to speak.

If you already know where the parts are that you want to cut out, I would edit the file in any of the numerous video editors. Even Windows Movie Maker or iMovie would do the job, and those are easily available on both major OSes.


This is a requested feature for VLC. Not really anything user-friendly out there. Still, VLC offers the possibility to create playlists in a certain format that would mute or skip parts of a file. This is called XSPF. You might be able to figure out the proper format for this.

Also, there's movie-content-editor:

A VLC based editor built in python that allows users to create and use custom filter files to make movies more family friendly. Allows users to have the player automatically mute specific words or skip certain scenes based on the content of those scenes.

And sensible-cinema:

Clean Editing Movie Player allows you watch edited movies by applying delete lists (EDL's) (i.e. "mute out" or "cut out" scenes) to DVD's/files, with preliminary support for also applying them to arbitrary web/internet based players like netflix instant, hulu/hulu plus etc

See also these threads on The VideoLAN Forums:

2

There is a way to do this in VLC, if not too elegant. Load the movie you want, open the playlist, make sure your movie is the only one in the playlist, and use Media -> Save Playlist to File to create an xspf file. Now you can achieve what you want by playing the with "extension" field. Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/"     xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>Playlist</title>
<trackList>
    <track>
        <location>file://YOUR MOVIE</location>
        <title>Some title</title>
        <duration>6884298</duration>
        <extension application="http://www.videolan.org/vlc/playlist/0">
            <vlc:id>0</vlc:id>
                    <vlc:option>start-time=0</vlc:option>
                    <vlc:option>stop-time=3142</vlc:option>
                    <vlc:option>some-option=100</vlc:option>            
        </extension>
    </track>
    <track>
        <location>file://YOUR MOVIE</location>
        <title>The Title</title>
        <duration>6884298</duration>
        <extension application="http://www.videolan.org/vlc/playlist/0">
            <vlc:id>1</vlc:id>
                    <vlc:option>start-time=3142</vlc:option>
                    <vlc:option>stop-time=3193</vlc:option>
                    <vlc:option>no-audio</vlc:option>
                    <vlc:option>no-video</vlc:option>
                    <vlc:option>some-option=100</vlc:option>            
        </extension>
    </track>
    <track>
        <location>file://YOUR MOVIE</location>
        <title>The Title</title>
        <duration>6884298</duration>
        <extension application="http://www.videolan.org/vlc/playlist/0">
            <vlc:id>3</vlc:id>
                    <vlc:option>start-time=3193</vlc:option>
                    <vlc:option>some-option=100</vlc:option>            
        </extension>
    </track>
</trackList>
<extension application="http://www.videolan.org/vlc/playlist/0">
        <vlc:item tid="0"/>
</extension>

Then save this again as an xspf file and open it with VLC (Media -> Open File). The example above becomes black between 52:23 and 53:14 (the times are in seconds in the file. 3142 and 3193 seconds). Basically you need to replicate the section and change the section to match the options and desired times.

2

Add your video 2 or more times to the VLC playlist and save it to a file. Open it with a text editor. It will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
    <title>Playlist</title>
    <trackList>


        <track>
            <location>file:///YOUR_FILE_PATH</location>
            <duration>5506048</duration>
            <extension application="http://www.videolan.org/vlc/playlist/0">
                <vlc:id>0</vlc:id>

            </extension>
        </track>

        <track>
            <location>file:///YOUR_FILE_PATH</location>
            <duration>5506048</duration>
            <extension application="http://www.videolan.org/vlc/playlist/0">
                <vlc:id>1</vlc:id>          

            </extension>
        </track>

    </trackList>
    <extension application="http://www.videolan.org/vlc/playlist/0">
        <vlc:item tid="0"/>
        <vlc:item tid="1"/>
    </extension>
</playlist>

below the line <vlc:id>0</vlc:id> add these lines

<vlc:option>start-time=0</vlc:option>               
<vlc:option>stop-time=150</vlc:option>

and below the line <vlc:id>1</vlc:id> add these lines

<vlc:option>start-time=160</vlc:option>             
<vlc:option>stop-time=5400</vlc:option>

doing this will skip 10 seconds from 150th second to 160th second and stop the video at the 5400-second mark. You can edit these times according to the part you want to skip. remove <vlc:option>stop-time=5400</vlc:option> to play video till end.

Additionally you can disable the title from displaying again and again by pressing Ctrl+P then selecting Subtitles / OSD then unchecking the Show media title on video start and clicking Save.

1

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.

-1

I assume by now you have a solution bit this may be of help to others.

There is an application called MCEbuddy that is designed to detect and remove commercials. This may not be of help but it comes with an application where you can load a video and move to a certain time index and set cut points(start and end). You can set as many as you want then hit process and it will spit and a new file minus the marked sections. It comes at a cost of $30 US but has a 15 day trial period.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.