Avoiding
and Fixing Common Video Problems

'Jerky video'

I read this complaint a lot and most of the time it is not actually a
problem with the video source at all and in fact it's the way the
source is being decoded and played back which is the problem.

Take this complaint: "I ripped my footage and encoded it to HuffYUV but
the playback is all jerky". It implies that the ripping process is at
fault but the reality is that the computer playing back the huffyuv
clips is not fast enough to play them back real-time and hence frames
are skipped giving the effect of jerky video.

This is also true when using avisynth scripts or when using a codec for
your previews that is naturally slow. My advice is to ignore the fact
that your source doesn't decode in real-time and simply prerender the
source

on the timeline using a fast codec such as an
mjpeg codec like picvideo. My editing technique involves putting an
avisynth sourced clip on the timeline, selecting the work are and
pressing the enter key to do a quick render of it so when I play that
section I can see exactly how it looks without jerkiness.

Of course it *could* be the source but the only likely scenario for
that is if you have changed the frame rate or decimated the frames in
an IVTC process and it has come out looking bad. My only advice here is
to look through the way you sourced your video and see if you've done
anything silly or if there is another way which is better.

Memory Conflicts when using Avisynth
Scripts

This one is nasty, I must admit. Avisynth isn't without its little
flaws and one of the problems you will face when editing with avisynth
is the memory leaks when using multiple scripts. These memory leaks
become more likely the more scripts you use at any one time.

The results of a memory leak can be bad or even disastrous. If a memory
leak occurs during exporting, it is more than likely that you will just
get some parts of your video exported with a black and red memory error
message. However, if a memory leak occurs when an editing program is
refreshing the sources your 2 hour footage avs file now looks like a 10
second video file containing an error message. This is especially bad
if this change is reflected on the timeline as your edits may well
shrink to be one frame long or even none-existent. Premiere does this
in a particularly offensive way which means that unless you can load an
older saved version of the project then those edits are gone forever.
This should be avoided at all costs by doing regular saves with new
version names and archived auto-saves etc.

The only possible defence against these memory leaks is in tinkering
with the SetMemoryMax preset in Avisynth. This is a value in megabytes
that defines the amount of memory that will be allocated to a script
when it is loaded. By default this is quite a large value (such as half
your computer's free memory) but it can be made to be something
specific. In the amvapp there is a file in the avisynth filters folder
called setmemorymax.avsi and in it is one line which reads:

SetMemoryMax(64)

If you find you are getting a lot of memory issues then you can reduce
this number as you see fit. Too low, however, may stop some avisynth
filters from working so be careful. It's a fine art but it can solve
most memory issues.

If you are a Premiere user and have installed the Premiere AVS plugin
then you can update the setmemorymax number using the Premiere AVS Gui.

Garbage data in HuffYUV exports

Sometimes, some programs get confused by the fact that Huffyuv can deal
with both YUY2 and RGB data. When this happens, the program in question
starts to mix YUY2 encoding and RGB encoding in the same file. When
huffyuv then attempts to decode this, you are presented with a rainbow
of horizontal waves. This is obviously not what you were hoping from
your lossless codec.

The main way to get around this is to look for an option in your video
program to forcibly recompress the footage upon export. This usually
does the trick but sometimes....

Bad Premiere Exports

Sometimes Premiere just cannot export something the way you see it on
the timeline. This is especially true of new versions of Premiere Pro
which seems very selective in which codecs will encode the image
correctly. There are other forms of bad encodes which I'm sure exist
but almost all of them can be sorted using a very simple idea - get
another program to do the encoding.

Sounds great, but how is this achieved? Well, you need to use the DebugMode Frameserver.
This excellent tool allows you to serve the timeline to another
program, such as virtualdub, which you can use for encoding. This is
invaluable when your editing program doesn't like your favourite
lossless codec - simply make your frameserver avi file and then open
this virtual file in virtualdub and encode using your fave codec.

Pixellated footage where there
should not be

In version of Premiere before Premiere Pro there exists a default
setting that will make progressive footage look like total ass when it
is slowed down. You may be thinking "who would devise such a silly
thing?" and the answer is Adobe. In all fairness the reason for this
makes some sense if you are using interlaced footage because what is
actually happening is that Premiere is trying to deinterlace the
footage because if interlaced footage plays back too slow it defies the
point of interlacing. It just so happens that Premiere's deinterlacer
is the worst the world has ever seen and will make any and all footage
look like poop. This is often described as being fuzzy or pixellated.

Avoiding this is easy but remembering to do so is tricky. On your
timeline you have to go to your slowed-down clip, right-click, and go
to Video Options > Field Options. You then have to DESELECT
the option that says "Deinterlace When Speed is Below 100%".

Of course, doing this for every clip in your video is very time
consuming. You can, however, do this all in one go! Simply go to your
timeline, click ctrl+a to select everything and then go to the Clip
menu in the bar at the top (do not right click as this will only select
one file). In the Clip menu you will see Video Options > Field
Options just like before and can hence deselect this option universally.

Premiere Pro no longer has this deinterlacer. Instead it has a weird an
equally nasty frame blender so you may want to disable that in a
similar way if it's offending you.

Interlaced footage where there
should not be

This one is always a tease. You've spent ages making all your source
progressive and as far as you can tell there isn't a single interlaced
frame in any of your sources... but wait, when you export there is
interlacing everywhere?!?!! What gives?!!

The answer is simple but the reason is subtle. When exporting your
project there is likely to be an option that specifies the field order
of your video (in Premiere it is to be found in the Keyframe and
Rendering section of the export settings) . Your video, being
progressive, has no fields so you need to tell the program this. If a
field order is specified, what happens is that your editing program
will do fades, effects and so on in fields and then interlace them to
match that field order, which is why you get an interlaced export. Easy
thing to avoid but you have to also remember that project settings and
export settings sometimes have to be selected individually so make sure
you have this set correctly in both. See the export guide for your
program for more info on this.