My old piece of shit digital camera films MPEG-2 format with keyframes every 24 frames at a low bitrate, and there's a noticeable flicker as the keyframes are lower quality than the P/B-frames. I have to denoise anyway because some scenes were filmed indoors but the flicker every 12 frames won't really be purged, so I thought of decimating the video where every second (rather than every 12th) frame will be those ugly frames, run the denoising on that stream and somehow put the video back together, but this is the part that escapes me.
I know Avisynth has an Interleave() feature which would come useful in the last steps, but I need a Deinterleave() to begin with, or could my solution to the problem be best classified as linear retard-thinking because there's a simpler solution out there?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
-
I don't think exactly what you're proposing will work -- you want two temporally adjacent frames for the best filtering. Then apply a heavy 3 frame temporal filter. If the keyframes are always at exact 12 frame intervals you can use SelectEvery() to extract the keyframes with the two frames surrounding it. Assuming the sequence starts with a keyframe:
SelectEvery(12, 0, 1, 11)
Of course, the very first frame will only have one neighboring frame.
Then you have to figure out how to get those filtered keyframes back into the original video. I'll have to think about that. The first thing that comes to mind is to use 12 SeparateFields() with one frame each and an Interleave() with all 12 of the individual frames.
f0=SeparateFields(12,0)
f1=SeparateFields(12,1)
f2=SeparateFields(12,2)
...
Interleave(f0, f1, f12... f11)Last edited by jagabo; 12th Jan 2011 at 12:06.
-
Are you sure it's like that, and not the other way around ? In most compression schemes, the I frame will be much larger and better quality, so every keyframe it "pops" back into better quality , then deteriorates until the next keyframe "pops" back in
-
Yeah, it's backwards from the usual. But I've seen cameras that do it. Apparently, they allocate the same number of bits to I frames as P frames. Since the I frame has to encode the entire picture it comes out lower quality, especially with still shots.
-
No need to separate fields, I already deinterlaced everything. So I guess its 24 instead of 12 frames now, my bad.
-
-
Sweet, jagabo's method was clever and robust. It worked smoothly.
Similar Threads
-
Syncing sound when interleaving won't help
By higgins327 in forum AudioReplies: 2Last Post: 1st May 2011, 09:58 -
AVI file cannot be opened after the re-interleaving
By ariola in forum Video ConversionReplies: 3Last Post: 16th Feb 2009, 10:19 -
Virtualdubmod Interleaving settings
By dvdfreak1971 in forum AudioReplies: 1Last Post: 29th Apr 2008, 09:55 -
Audio interleaving? What is it?
By GangstaRap in forum Newbie / General discussionsReplies: 10Last Post: 25th Jan 2008, 01:43 -
how to use audio interleaving in virtualdub?
By sharmine in forum Newbie / General discussionsReplies: 2Last Post: 25th Dec 2007, 02:00