VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I have never used AVISynth or done any scripting, and I'm looking to write a script that may be somewhat ambitious. Where's the best place to get started with learning this?

    More Info
    My project is to convert the original DVDs of Star Trek: Deep Space Nine so that I can do the best possible restoration/upscaling work on it. Up until now I have been using iTunes downloads as my source, but the DVDs contain a bit more image information that I'd like to take advantage of. Here's the mediainfo report of the video.

    Video
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings : CustomMatrix / BVOP
    Format settings, BVOP : Yes
    Format settings, Matrix : Custom
    Format settings, GOP : Variable
    Duration : 45 min 28 s
    Bit rate mode : Variable
    Bit rate : 5 341 kb/s
    Maximum bit rate : 9 800 kb/s
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 4:3
    Frame rate : 29.970 (30000/1001) FPS
    Standard : Component
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.516
    Time code of first frame : 00:59:59;00
    Stream size : 1.70 GiB (100%)
    Color primaries : BT.601 NTSC
    Transfer characteristics : BT.601
    Matrix coefficients : BT.601

    The problem I'm having is this. This is a show that was shot on film (24fps). The film originals were telecined, and then the show was edited completely on tape. This results in an inconsistent pulldown cadence from shot to shot. The DVD uses pulldown flags, and every attempt I've made to import or convert the VOBs performs an automatic IVTC that I can't seem to prevent, resulting in a 23.976 progressive video. Because the cadence is inconsistent, I end up with frames being thrown away, and other frames being combined, producing interlacing artifacts, as well as frames being combined at cuts that look particularly nasty. I have tried importing the VOBs directly in Premiere and After Effects, as well as converting them with VLC, Handbrake, dgmpgdec, and some of the other tools on here.

    If I play the DVD straight in VLC, I can step through frame by frame (actually probably field by field, but looks like frames since deinterlacing is turned on) and I can see every frame as it should be, no interlacing artifacts, and no combined frames at scene cuts. But so far no conversion method I've tried preserves this. I posted in the DVD ripping forum and they said I would have to use AVISynth to accomplish this. So I guess it's time to learn!

    My goal is ultimately to restore the original 24fps rate as closely as possible. So ideally the script would be able to scan the 59.94Hz video, detect scene changes, detect the cadence of each scene, and then perform deinterlacing and IVTC by blending fields/frames on each scene individually. I am aware that things like added camera shake, crossfades, titles and some vfx were created in 30i in the editing process, I'm okay with those being frame blended.

    At the VERY least, I'd like to able to get a 29.97 non-IVTC conversion from the DVD into After Effects. I have a workflow there I can use to manually IVTC each scene, though it's time consuming.

    Anyways, I appreciate any advice!

    Image
    [Attachment 54505 - Click to enlarge]
    Quote Quote  
  2. If I play the DVD straight in VLC, I can step through frame by frame (actually probably field by field, but looks like frames since deinterlacing is turned on) and I can see every frame as it should be, no interlacing artifacts, and no combined frames at scene cuts. But so far no conversion method I've tried preserves this.
    What deinterlacing mode is VLC using ? If it's set to "Automatic", do you obtain the same result by specifying one of the available modes ?

    As for the screenshots, what do they show ? Is the DVD version on the right or the left ? There seems to be a color discrepancy between the two.
    Quote Quote  
  3. Originally Posted by colonel0812 View Post
    The DVD uses pulldown flags...
    No, it doesn't. No flags at all. It's hard telecined, meaning the repeated fields are encoded into the video.

    I have a workflow there I can use to manually IVTC each scene, though it's time consuming.
    You'll be much better off using the AviSynth IVTC, TIVTC. If there are any anomalies, you can set up override files to fix them.
    Image Attached Thumbnails Click image for larger version

Name:	FrameRepeats.jpg
Views:	12
Size:	41.0 KB
ID:	54507  

    Quote Quote  
  4. Originally Posted by abolibibelot View Post
    What deinterlacing mode is VLC using ? If it's set to "Automatic", do you obtain the same result by specifying one of the available modes ?
    Yeah it's set to automatic. Just went through all the modes and I can't tell a difference between any of them.

    Originally Posted by abolibibelot View Post
    As for the screenshots, what do they show ? Is the DVD version on the right or the left ? There seems to be a color discrepancy between the two.
    The left is from iTunes and the right is my (current) final upscale product. Topaz seems to do some kind of color shifting or correction as well in it's processing. I personally like it better, looks a little more lifelike, less yellow/green.
    Quote Quote  
  5. Originally Posted by manono View Post
    No, it doesn't. No flags at all. It's hard telecined, meaning the repeated fields are encoded into the video.
    Ok, I probably don't understand what exactly what pulldown flags are? If not that, what would be the reason everything is automatically changing it to 23.976?

    Originally Posted by manono View Post
    You'll be much better off using the AviSynth IVTC, TIVTC. If there are any anomalies, you can set up override files to fix them.
    Gotcha, I'll look into that.
    Quote Quote  
  6. Originally Posted by colonel0812 View Post

    Ok, I probably don't understand what exactly what pulldown flags are? If not that, what would be the reason everything is automatically changing it to 23.976?
    I'll enclose a DGIndex pic from a film with real pulldown flags. I don't know the reason because I don't know what you're using to make it 23.976fps, but you're probably using it wrong.
    Image Attached Images  
    Quote Quote  
  7. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Some general advices:

    One of the best places to start learning the basics of AviSynth scripting syntax and "vocabulary" is the documentation shipped with the installer of legacy AviSynth 2.6, or online in the AviSynth Wiki; but these are just the basics.

    Learning strategies to apply filters is a wide spread field which requires both experience and knowledge in the history of video technology; furthermore, you will probably move on to AviSynth+ sooner or later, for performance reasons (64-bit code, multi-threading, large RAM), which has a few differences in details. They are mentioned in the Wiki too.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!