• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

After Effects returns different frames (different pixel data) for the same current_time when checking out a layer frame

New Here ,
Aug 19, 2014 Aug 19, 2014

Copy link to clipboard

Copied

I noticed a strange behavior on part of After Effects: If a plug-in checks out the frame from a layer for a specific current_time, time_scale and time_step using checkout_layer_pixels(), After Effects does not always provide the same frame after you clear the image cache. For some values of current_time, After Effects will then return pixels with an offset of one or more frames. I can only reproduce this by using AVI and WMV files as video footage. My guess is, that After Effects' underlying frame decoder is not properly seeking through the video stream.

Does anyone experience this behavior as well? Is there any workaround? Could it be related to video codecs installed on my system? I am working on a plug-in that is required to iterate through video footage frame by frame and this iteration needs to be deterministic.

If you want to reproduce this, you need to a small effect plug-in that calculates a check sum (for eample CRC-32) of the checked out pixel data for each PF_Cmd_SMART_RENDER request and stores them together with the according current_time as key-value list. Then perform the following tests:

  1. Create a composition with a single layer using an .avi file or .wmv file as video footage. For example, the Wildlife.wmv sample video that comes shipped with Windows 7 shows htis behavior.
  2. Seek through all frames of the layer to calculate and store the check sum values for each frame.
  3. Clear the image cache.
  4. Again, seek through all frames of the layer to calculate check sum values. In this iteration, After Effects will return check sums that are different from the check sums calculated in step 2 for the same current_time value. By reverse looking-up the current_time for the given check sum you can calculate the frame offset between checked out frame and expected frame. In my tests this is usually 1, which means that when you try to check out frame 5, you get something like frame 6. This frame content mismatch does not occur for all frames, usually just for a small range of consecutive frames. Also if you repeat steps 3 and 4, the sub-range of frame content mismatches will change.

Results:

After Effects returns different frame content (different pixel data) when checking out a layer frame before and after clearing the image cache for the same current_time.

Expected results:

After Effects always returns the same frame content (equal pixel data) for the same current_time when checking out a layer frame.

Edited post to improve wording.

TOPICS
SDK

Views

748

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

What exact version number of AE are you using?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2014 Oct 16, 2014

Copy link to clipboard

Copied

Sorry for my slow  reply. I am using After Effects CC (12.2.1.5) and After Effects CC 2014 (13.0.2.3) of which both show the buggy behavior mentioned above.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 21, 2014 Oct 21, 2014

Copy link to clipboard

Copied

I've been out of the country and away from the internet for a while on

holiday. So, sorry for my late response as well...

Try updating to 13.1.1 and see if the issue remains.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2014 Oct 24, 2014

Copy link to clipboard

Copied

LATEST

I updated AE to 13.1.1, but I still get the same issues.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines