Video showing as way longer than it actually is & crashing editor

Hey everyone,

I’ve run into an incredibly odd issue. This isn’t just for shotcut, I’ll take any feedback you guys have, if you have another program that might work I’d happily try it. I’ve attached a screenshot so you guys can see what I mean as well.

Basically this, I upload gaming videos to youtube and have been doing a Valheim playthrough and I’d been recording it with OBS. I pulled up the next part I have to edit to watch it and take notes for editing. I noticed while I had it up in Windows Media Player that I couldn’t fast forward it at all, in fact I can’t change where I am in the video whatsoever. I checked the video properties and it was showing as nearly 20 gigs, I figured we must have just had a longer session (this was recorded a couple months back) and it may be several hours long.

I put it in shotcut to check it and shotcut immediately froze, I noticed that for some reason it’s showing as over nine thousand hours long. Now trying to put the video in Shotcut crashes it almost immediately for obvious reasons. If you guys have any programs or anyway of dealing with something like this please let me know, I really need that footage.

I have no clue how it happened and there’s absolutely no way it’s actually that long. I haven’t even been using OBS for that amount of time.

Any help at all is appreciated.


Some things I’ve already tried to bring the size down:

Tried it in another editor.

Tried uploading to youtube in hopes that I could redownload it after to see if maybe that would fix it. Unfortunately it’s too long.

Try to figure out the actual duration perhaps from a media player.
Open the video in Shotcut’s Source player first instead of dragging it to Playlist or Timeline. Then, before doing anything else, change the Duration in Properties to what you expect. The format is HH:MM:SS:FF where FF = frames. You can simply round up to the next second or few and enter “00” for the frames.

So I tried this. Gameplay stops at around 3 hours and 54 minutes, after that it’s just a recording of my desktop. My initial guess was that I must have forgot to close shotcut that night and left it running overnight since it continues to show my desk top.

The only issue is later into the video something incredibly odd happens. This starts to happen at exactly 17:26:40:00. Audio will start again, but only for a couple seconds. It sounds as though the game is running, and then just abrutply stops. If I let it run, there’s nothing, no more sound. But if I hit pause and play it will play the exact same audio clip, starting and ending the exact same.
This will happen if I hit pause or play, fast forward and play, rewind and play, or adjust my place in the time bar and hit play. If I just let it run after the audio stops, it will just be silence. It doesn’t even show Valheim running in my taskbar, if anything the screen appears to be completely frozen. It’s just the couple seconds of audio.

I initially discovered it when I pushed the video forward around 20 hours in. I figured if I had forgotten to turn it off, it would show me doing stuff on my computer the next day. I’m including a video clip to demonstrate everything I described above. It’s a little quiet so you may need to turn your sound up.

I’ve never seen this happen before.

Let me know if maybe you’ve seen anything like this before. My main concern is that there may have been more footage or gameplay in there somewhere hidden.

I have previously seen something like this.

In that case, the video was originally 3 or 4 minutes, but when imported to shotcut, it became 2 years of time, which made shotcut crash.

But the problem was found out, the person was using a webm file, which made this entire bug happen, is your file also a webm?

Try converting it to mp4 or something else and then opening in shotcut.

Webm files do this a lot. I created several webm files using the javascript Media Stream Recorder API and all of them gave crazy values for the length of the video.

1 Like

It’s actually an mkv video.

Can you run mediainfo on your file and post the output from the menu item View->Text?

Here you go:

WebM is a subset of MKV (Matroska). They’re essentially the same thing.

Your file is damaged.

This is what a healthy MKV file looks like.

The one advantage of MKV over MP4 is that even though the MKV file is truncated, you can still access the recorded file.

1 Like

“isTruncated: Yes” happens every time I use the javascript Media Stream Recorder API to create webm files, but this hasn’t happened to me when using mkv with OBS. (webm is a basic version of mkv). When I open these webm files in Shotcut I always have to reset their duration.

OBS recommends using MKV over MP4 for long recordings because a MKV file can be played even if OBS crashes part way through, or the recording does not finish cleanly, whereas MP4 needs the recording to complete properly, or the file cannot be played since the metadata has not been saved in the MP4 container.

1 Like

I haven’t had a truncated MKV file with OBS.

So how would I rectify this? Is there a media converter you all would recommend or anything of the sort?

The only way I’ve fixed this problem is to do as Dan said in post #3 above. Namely:

  • Open Shotcut;
  • Click on the “Open File” icon at the top;
  • Select your .mkv file;
  • Press the PAUSE button on the source player;
  • Click on the “Properties” icon at the top;
  • Change the “Duration” parameter to a sensible value (hopefully you know how long the video should be).

In addition to these instructions, do not add the file to playlist or timeline. Immediately after correcting the duration, Export it. What preset? Well, they are many options but to minimize quality loss but not create a huge file, try DNxHR preset under the intermediate category. It will still be very large for that duration, but not as big as a lossless preset. If that is too big and you need something smaller perhaps the YouTube preset plus increase the quality by 10%.

1 Like

I wonder if Avidemux could open the video? If so, you could use this tool to cut it to the right duration, but select Copy as the mode for audio and video - this will essentially give you the original video (no re-processing with attendant losses), just trimmed.

Alternately, you could use ffmpeg on the command line to trim it, again using copy for the codecs to avoid any loss. I would have to do a search to remember the particular command line parameters to include … but I will leave that as an exercise for the student. :slight_smile:

So here’s what I’ve tried. First off a bit of a workaround, I uploaded the video to Google Drive. File was still massive, but when it uploaded it showed the correct time which is 3:55:08.

I opened the old file in shotcut, and changed the duration the way you guys were saying above. I set it to 3:56:00 just to be safe and exported it as an MP4. This worked and reduced the file to a far more reasonable 8.18 GB. The issue is now I can’t get it in shotcut’s editor. I get a circle-backslash symbol when I try to drag it into the editor.

Check to see if you have Timeline selected, and not Keyframes.