VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  2. 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 13:06.
    Quote Quote  
  3. 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
    Quote Quote  
  4. 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.
    Quote Quote  
  5. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    No need to separate fields, I already deinterlaced everything. So I guess its 24 instead of 12 frames now, my bad.
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by jagabo View Post
    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)
    Instead of SeparateFields(), you mean SelectEvery().
    This has confused Xpenguin17 into thinking you are talking about deinterlacing.
    Quote Quote  
  7. Originally Posted by Gavino View Post
    Originally Posted by jagabo View Post
    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)
    Instead of SeparateFields(), you mean SelectEvery().
    This has confused Xpenguin17 into thinking you are talking about deinterlacing.
    Yes, sorry. SelectEvery(), not SeparateFields().
    Quote Quote  
  8. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Sweet, jagabo's method was clever and robust. It worked smoothly.
    Quote Quote  



Similar Threads