VSE: video output messed up

So I tried out the sequence editor, loaded my videoclips, cutted, arranged them, added effects, pressed play to test it and everything seemed to be fine.
After I rendered it, all was messed up and out of sync, sometimes a sequence played a lot faster, maybe 3 times faster than normal, leaving the rest of the sequence black and when a new sequence started this happened all over again. But all is very randomly, sometimes a sequence plays normal, sometimes faster, sometimes leaving the rest black and sometimes filling the rest with some material that was cutted out and sometimes not noticing the cuts I made.

Already tried “the refresh sequencer” button, it helps for the moment, but some moments later it’s all messed up again.
Input and output format is 30fps, already tried different codecs, but no changes so far.

Someone else here has a similar thread. Perhaps it is a new bug. Head over to the bug tracker and submit it.

Someone told me that it is because of the codecs and indeed, the input files were “.mpg” , but the files only get corrupted after a certain length.
I tested an mpg with 10 and one with 30 seconds and they worked, but one with 3 minutes was always corrupted on some place and one with around 1 minute, sometimes got messed up. Had not tested much formats, but “.mpg” input files are very likely to cause this.

This is interesting! Has anyone else experienced it with mpg files?

Does this happen if you generate proxy timecode for the longer mpg file first?

Timecodes seem to work, forgot to press rebuild timecodes first. It was not the length of the clip, tested again with very short ones and the 5th clip I added got messed up and after that it spreaded to the 4th clip, all very random and confusing, but I better no longer use this evil MJPG format.

Generating proxies with the setting “record run no gaps” will shorten the clip to the length that it is with playing too fast. So if your clip plays 3 times faster, after generating proxies with “record run no gaps” it will be one third the length also in the editor.
I believe it is because the recording software does not exactly records 30fps, sometimes you have lags turning out to be 20 or 10 fps, then blender maybe thinks to speed up the frames until you have 30 again, because it is a 30fps video, making the whole video play faster.

In addition to checking proxy timecode creation, how about converting the sources to stills and importing these for further processing?
I wonder if the same problem can be replicated with stills. I also think that the possibility of of a corrupt blend file should not be ruled out.

If you convert the source files, you do not get this error, at least I did not encountered it. And no the blend file is not corrupt, tested it three times with new blend files. I believe it is just the straight output of screen recording in MJPG format and because screen recording uses a lot of resources you get lags and the more lags the more likely it is going to go out of sync in blender.


I encountered the exact same problem back when I was video editing this video. It was recorded with GNOME 3.6’s build-in screen recorder, saving in *.webm format:

The way I managed to fix it was by using Transmageddon to rebuild the container which fixed problems with the timecode for me. If this doesn’t work for you, then try converting the video to H.264 / MKV with Handbrake afterwards - I can’t remember if I did both or did the first step. There may be a loss of quality associated with doing so unless you convert it to lossless H.264, tho.

Already did my video, converted them before editing: https://www.youtube.com/watch?v=iM0Z0ha6Gvg On scene 5 at 1:30 he started to play about 3 times too fast after that, normal again, sometimes it spreaded to scene 4,3 and 2, but almost never the first scene or the last two, was very random and confusing. First I was so happy that blender was so easy at video editing, better than every program I tried, but then this crap happened. :confused:

But finally found a solution and generating timecodes also work, so you can chose between these two methods. I prefer converting them, because with a good converter you can convert them all with one click, in blender you would have to click every video by hand and select the right settings. OK you could also record uncompressed but this will eat up all your Gigabytes.

When I had my issues, I reported a bug to the Blender bugtracker:

Sergey Sharybin said:

Seems input video is buggy a bit and requires timecode built to work predictable. I would recommend using timecodes anyway when you’re working with videos not rendered with blender. There’re quick notes here: http://wiki.blender.org/index.php/User:Nazg-gul/ProxyAndTimecode

The thing is 2.64 and 2.65 are using different ffmpeg version, which could handle videos slightly different in cases there’re issues with keyframes inserted in them. Timecodes will solve the issue. Use Record One for you video.

Thanks for the report, but it’s not so much trivial to solve from blender, almost all the code is inside ffmpeg library. The only thing i was planning to do is to generate Record Run timecode on-fly so you’ll have much better default behavior. But that’s more like a todo than a bug.

Wow. Yes absolutely auto generated tc proxy would solve so many complaints.

Yes, but you have to chose in the right panel Timecode: “Record Run” and under strip you have to click on “Rebuild Proxy and Timecode Indieces” otherwise it does not work, there is a lot of possible place for confusion.

Auto generated tc proxy would be awesome. For now though, I am using this script to apply proxies for all selected video strips in the scene which works pretty nicely too.

import bpy

for seq in bpy.context.selected_sequences:
seq.use_proxy = True
seq.use_proxy_custom_directory = True
seq.proxy.directory = “/home/username/.blender/proxies/mymovie”+seq.name
seq.proxy.build_25 = True
seq.proxy.timecode = ‘RECORD_RUN’

There are two things you need to change under “seq.proxy.directory”, marked with bold. If you are on windows you will have to change the whole path, but I haven’t tested it as I’m on linux (shouldn’t matter where you set it to tho). Just thought I wanted to share. Remember to rebuild proxies for the actual proxies to be built, this thing just sets everything up.

PS: Script is not initially my work, I just modified it to fit my own needs. :slight_smile:
EDIT: You need to push all “seq…” lines with tab 1 time for it to work. like this.

Check out the vse extras addon it has an extensive copy attributes function too. Good work on your code.

Thanks. I can’t get the vse extras addon to work on Blender 2.66a though :confused: