Results 1 to 25 of 25

Thread: Decomb with Avisynth

  1. #1
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default Decomb with Avisynth

    I know I'm gonna get a lot of flack from the so called 24p experts, but here I go anyway...................

    First of all, I don't have any interest in shooting and working with 24p other than the technical challenge. I recently shot and tested 24p editing as an experiment. This is what I've found:

    You don't need to use Pulldown.exe. You can use the latest version of Decomb with Avisynth. It's smart enough to remove all interlaces frames. It will even do the entire tape at once. No need for scene detection captures. You don't even have to save it to a intermediate codec. You can import the script into Premiere Timeline via AVSPlugin. You can import the script into Vegas Timeline via VFAPIConvereter, or any NLE for that matter. Here is the simple script I used with 100% success and perfect audio sync:

    Code:
    LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\Decomb.dll")
    video=MPEG2Source("PF24.d2v")
    audio=MPASource("PF24 MPA PID 814 DELAY -220ms.mpa")
    AudioDub(video,audio)
    AssumeTFF()
    Telecide()
    Decimate()
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  2. #2
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    Great find. I'll give this a try in the morning, but it sounds promising. I'm sure one of the experts around here will come on and leave comment.

  3. #3
    Moderator Eugenia Loli-Queru's Avatar
    Join Date
    Jun 2007
    Location
    Bay Area, CA, USA
    Posts
    5,270

    Default

    Nice! Could you verify that it de-interlaces the interlaced frames properly and not just removing them though? Also, how exactly do you make this work? Step by step please with how you load it on the NLE with the right plugin? I mean, I see a PF24.d2v there, but where do you find that file when you have .m2t files instead?

  4. #4
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    As best I can tell, it does it correctly. I don't normally shoot 24p. I can say that I shot multiple scenes outside on a bright sunny day in PF24 mode with a shutter speed of 1/500. I did lots of panning and shot the street static while cars passes by approximately 30 mph. I then processed the footage with the script i made opening in Virtualdub to see how it looked. It reported a true 23.976 fps and looked great. No interlacing could be found and was perfectly smooth while stepping through frame by frame. No dropped frames were detected. I could upload a short sample if you'd like.

    I don't feel like writing a detailed tutorial, but I'll give you a quick rundown on the process. It's not for the technically challenged anyway:

    1) Open the m2t in DGMPGDec and save project .d2v and .mpa
    2) Download the latest Decomb Plugin for Avisynth and creat a script like mine.
    3) Download VFAPI reader and use it to make a dummy avi file from the script.You can then load that dummy.avi file in any NLE tha accepts VFW avi's. That means Premiere, Vegas, even Windows Movie Maker should open it. It will likely report the clip as Square Pixels 4:3 AR, just change the properties to reflect 16:9 HDV 1.33 anamorphic.
    4) If your PC is fast enough, you can edit it just like any HDV clip. Otherwise you can render to an intermediate codec like Cineform, Lagaryth or whatever.
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  5. #5
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    Here is a sample frame grab. The truck is going about 30 mph. All the frames in the sequence were just as clean:


    Attached Images Attached Images
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  6. #6
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    I've just given this method a whirl, and in my opinion it doesn't work as well as the tdecimate process that hv20pulldown utilises. I ran the same m2t file through both methods and compared frame by frame. There are more artifacts using the decomb filter than the tdecimate filter. In my opinion, I would stick to the hv20pulldown and tdecimate route as the output looks better.

  7. #7
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    That's interesting........anyway you can post samples of the artifacts. Maybe a split screen frame grab showing the difference between both methods on the same frame. I didn't notice any artifacts in my tests, maybe I didn't look so closely.
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  8. #8
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    Sure thing. I'll grab some screenshots once I get a chance later today. I think the efficacy of any algorithm for the pulldown removal will be somewhat based on the input footage. Some footage is inherently simpler to process I think. But I'll try running several clips through, then doing screengrabs of both at specific frames, in the hope of showing you some results!

  9. #9
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    That would be great, thanks. As I mentioned before, my interest is purely technical. It's intriguing to me that so much has to be done to remove pulldown on the PF24 footage from the HV20/30. I thought I stumbled onto an easier way, maybe not. I'd like to know for sure though.........

    As for me, I do not, nor ever will shoot 24p footage. It's useless for someone like me other than for nice clean frame grabs of nature scenery ect.
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  10. #10
    Valued Member jnuts's Avatar
    Join Date
    Jan 2008
    Posts
    48

    Default

    Good thread! I'm interested in seeing Pascal's samples.

    Racer, nice job. I love the work you share on avisynth.

  11. #11
    Junior Member Braceface's Avatar
    Join Date
    Mar 2009
    Location
    Fort Lauderdale
    Posts
    727

    Default

    But removing pulldown isn't that hard to do. Why not just do that?

  12. #12
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    Sorry for the delay. The weather has been hot and I've been busy with other jobs/climbing.

    Firstly, let me explain something of my method, because rigorous testing is important. I captured the clip today with HDVsplit. I then took that clip and processed it via 3 different methods;
    1. Tmpgenc
    2. tdecimate (the normal hv20pulldown method)
    3. decomb (racerx's new pulldown method)

    I encoded all three with the same lagarith codec at the same settings. Then I loaded the three of them into Vegas 8 pro. I loaded the 3 clips in three different video tracks, one on top of the other. Then I started going through them frame by frame. What I would do is find a problem frame in tmpgenc, say, then compare that frame with the exact same frame in the other 2. The results are interesting.

    Before showing you pics there is one more things to say. I have been having issues with my hv20 and it's pulldown. There is a long thread called "Is my hv20 broken..." and lots of people have chimed in, but the bottom line is that I haven't found a solution yet. That is why I was really interested to see if this new method would yield different results. Not everyone of the clips I capture from my camera has a problem, but the one I processed, and present here, is one that DID have problems. Perhaps that is a biased test, but it's fair in it's setup and execution. So, these are the results. Each frame grab is ordered as I wrote above, tmpgenc first, then tdecimate, then decomb. Look closely at the pics and see for your yourselves...

    The frame grabs were taken when I was zoomed in on each clip, the size of the image is 636*477 as shown in the vegas pan/crop window. I guess this is approx 300%.


















    The most interesting thing about this is that the two the avisynth method produce slightly different results. That means they are analysing the same input differently. I don't know what to conclude, but I do retract my earlier comment that decomb doesn't work as well. In my opinion, it works as well as tdecimate, and is a viable alternative. I forgot to test encoding time, to see if one is significantly faster than the other, but I will get round to this when testing another clip.

    Hope that helps!

  13. #13
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    I wasn't allowed to include more than 12 images, so here are the last 3.




  14. #14
    Moderator Eugenia Loli-Queru's Avatar
    Join Date
    Jun 2007
    Location
    Bay Area, CA, USA
    Posts
    5,270

    Default

    According to these pictures, it's not the Decomb method that creates the worst picture but Tmpgenc. It has interlacing artifacts! Decomb also has some (check the last picture in the t-shirt). The Pulldown.exe method creates the most correct output.

  15. #15
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    Well, there are actually some frames where the decomb method results in no jaggies, but both of the other methods produce jaggies.

  16. #16
    Moderator Eugenia Loli-Queru's Avatar
    Join Date
    Jun 2007
    Location
    Bay Area, CA, USA
    Posts
    5,270

    Default

    Not the pulldown.exe method. I see no jaggies there from the pulldown.exe method. The other two do though.

  17. #17
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    please look more closely at the first set of pictures. In the tdecimate one (the middle of the three) you will see jaggies on the grey trousers and the right foot. They are not there on the decomb method.

    I'm not surprised you missed it, you do have to know exactly what you're looking for. I've watched this clip so carefully, so many times, I'm starting to be able to predict where errors will occur!

  18. #18
    Moderator Eugenia Loli-Queru's Avatar
    Join Date
    Jun 2007
    Location
    Bay Area, CA, USA
    Posts
    5,270

    Default

    Ok then... I guess this just tells us that we either buy Cineform, or we throw our cameras to the bin and we wait for the day that Canon offers true fully-progressive 24p recording. Honestly, when I see things like that (assuming you got these screenshots correctly), that no matter what you do you never get a really good progressive image, I can throw the camera to the bin without a second thought.

  19. #19
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    I urge you to test these methods with your own footage. I have some peculiar problems, which may well be due to my particular hv20. As I said, you can see the full story in another thread; "Is my HV20 broken..."

  20. #20
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    Thanks for the detailed testing pascalbrown. That was very thorough and well presented. I feel that the Decomb method is a viable alternative and yes, people should test it out for themselves on their own footage.

    I'll check out your problem thread when I have some free time. I don't use PF24 mode much, so I don't know how much I can help.
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

  21. #21
    Legend
    Join Date
    Aug 2007
    Location
    Bedfordshire, UK
    Posts
    1,370

    Default

    The important thing here is the VFAPI reader which makes the dummy AVI.

    With that, you can use any AVIsynth method you like (including the one used by pulldown.exe) and feed it straight into an editor without creating intermediate files. It can be faster, because there is no need to read/write huge files to/from the HDD.

    FWIW, and IMO, Decomb (telecide/decimate) works perfectly as long as there is motion. You can use parameters to force it to assume a perfect 3-2 input (which is what the HV20 gives it); without parameters it actually has some built in flexibility/intelligence which you don't need.

    Cheers,
    David.

  22. #22
    Senior Member pascalbrown's Avatar
    Join Date
    May 2007
    Location
    Derby, UK
    Posts
    462

    Default

    2Bdecided; Very interesting info. Can you explain how I can force it to assume perfect 3:2 input. Perhaps that will fix some of my problems... Thanks a lot!

  23. #23
    Legend
    Join Date
    Aug 2007
    Location
    Bedfordshire, UK
    Posts
    1,370

    Default

    From here...

    http://www.neuron2.net/decomb/DecombTutorial.html

    telecide(guide=2)
    ...tells it the input is 3-2 pulldown.

    telecide(guide=2,post=0)
    ...tells it the input is 3-2 pulldown, and that all frames can be put together into complete, artefact-free, progressive frames.

    You can use the second one; it will never try to "fix" artefacts in the video due to bad field matching - which is fine, because this shouldn't happen with the HV20.

    However, if you run this across edit points (i.e. stop/start recording, different clips), then you might get single fields at the edit point which cannot be matched. post=2 (Default) would try to hide this; post=0 (above) will let them through as-is.

    The reference manual (included in the decomb zip) is well worth reading.

    Cheers,
    David.

  24. #24
    Junior Member
    Join Date
    Jan 2008
    Posts
    11

    Default

    Racer,

    Were you in shutter priority mode when you shot this? What were your camera settings, if you can remember... Just curious.


  25. #25
    Legend racer-x's Avatar
    Join Date
    Feb 2008
    Location
    3rd rock from the Sun
    Posts
    1,165

    Default

    Yes I shot my PF24 footage in "TV" (shutter priority) with a shutter speed of 1/500 sec. I believe the aperture was around 5.7 F-stop, if I remember correctly. I wanted the frames to be as sharp as possible for the test. I didn't want excessive blur. I was able to get very nice frame grabs from the processed footage. I actually saved some for future use as background images.

    I think if I ever want to get some decent nature scene images, I would shoot like this in 1/250 - 1/500 shutter speed. Unfortunately I shoot sports 90% of the time, so PF24 is useless for me.
    There is no such thing as "Idiot-Proof".........a good Idiot will get around that every time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •