-
De-converting NTSC to PAL
I’m trying to “de-convert” NTSC back to PAL — my footage is 29.97fps, but every 6th frame is duplicated. Speeding up doesn’t work, because it skips the wrong frames.
A while back Dan posted the expression below; but it’s not working for me as expected.
I need to “remove” every 6th frame; I’m trying to get just these frames:
01, 02, 03, 04, 05, 07, 08, 09, 10, 11, 13, …
(i.e., remove frames 00, 06, 12… could also remove 01, 07, 13; they’re duplicates)But this expression, with n=6 and frameToSkip=0 gives me:
01, 11, 21, 31, 41, …In other words, it skipping TEN frames.
Am I missing something?
Thanks!
n = 5; // skip every nth frame
frameToSkip = 4; // 0,1,2 ...n-1
currFrame = timeToFrames(time);
currFrame += Math.floor((currFrame - frameToSkip)/(n-1)) + 1;
framesToTime(currFrame)