VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 35
Thread
  1. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Hi.

    I have an interlaced video that I ripped from a DVD and I want to deinterlace it to 59.94 fps with Avisynth. However, I can't because it is a variable framerate and it can only be deinterlaced to 52.939 fps for some reason.

    Here's what Mediainfo says.
    Code:
    Video
    ID                                       : 1
    ID in the original source medium         : 224 (0xE0)
    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                     : M=3, N=15
    Codec ID                                 : V_MPEG2
    Codec ID/Info                            : MPEG 1 or 2 Video
    Duration                                 : 40 min 30 s
    Bit rate mode                            : Variable
    Bit rate                                 : 5 504 kb/s
    Maximum bit rate                         : 6 500 kb/s
    Width                                    : 720 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Variable
    Frame rate                               : 26.469 FPS
    Original frame rate                      : 29.970 (30000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.602
    Time code of first frame                 : 01:00:25:17
    Time code source                         : Group of pictures header
    GOP, Open/Closed                         : Closed
    Stream size                              : 1.56 GiB (93%)
    Language                                 : English
    Default                                  : No
    Forced                                   : No
    Original source medium                   : DVD-Video
    Is there any way to convert VFR to CFR while maintaining interlaced 29.97fps video? Been having this issue with a lot of files too and as the only workaround I have is deinterlacing it with Handbrake.
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    rip it again with some other tool. it can't have come off a dvd as vfr as it's not allowed in the dvd spec. it came off a dvd and was re-encoded.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. DVD is never truly VFR. Use DgIndex to build and index file (honor pulldown flags mode). Open the index file in AviSynth with Mpeg2Source. Then apply QTGMC. You will get a 59.94p result.

    When NTSC DVDs are encoded as progressive frames with pulldown flags the base frame rate can be anywhere from 19.98 fps to 29.97 fps. But after performing pulldown they are always 29.97 fps (59.94 fields per second).
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    DVDs are NOT variable framerate. They may have multiple sections each with different flags for "hold frame" depending on if it was sourced from 24p vs 29.97i/25i elements, but the running OUTPUT is always 29.97i or 25i. (Unless you honor the flags while ITVC'ing and break it down to its constituent elements again).

    See where it says, in "original framerate" = 29.97i ?

    MediaInfo is trying a bit too hard to accommodate other types of VFR files, so now it sees it where it actually isn't.

    Scott

    (edit)doh! jagabo beat me to it(/edit)
    Quote Quote  
  5. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by aedipuss View Post
    rip it again with some other tool. it can't have come off a dvd as vfr as it's not allowed in the dvd spec. it came off a dvd and was re-encoded.
    What should I rip it with? I've been using MakeMKV for a while now.

    Originally Posted by jagabo View Post
    DVD is never truly VFR. Use DgIndex to build and index file (honor pulldown flags mode). Open the index file in AviSynth with Mpeg2Source. Then apply QTGMC. You will get a 59.94p result.

    I tried to use it with MPEG2Source but it says there's no such function.
    Last edited by ENunn; 29th Mar 2019 at 16:27.
    Quote Quote  
  6. MakeMKV is ok but DgIndex doesn't work well with MKV files. You will need to remux the MKV to an MPG file with MkvExtractGUI. Then use DgIndex on the MPG file.

    The alternatives are to use DVD Decrypter or DVD Fab to decrypt the DVD to a VIDEO_TS folder. Then use DgIndex on the resulting VOB files.
    Quote Quote  
  7. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    MakeMKV is ok but DgIndex doesn't work well with MKV files. You will need to remux the MKV to an MPG file with MkvExtractGUI. Then use DgIndex on the MPG file.

    The alternatives are to use DVD Decrypter or DVD Fab to decrypt the DVD to a VIDEO_TS folder. Then use DgIndex on the resulting VOB files.
    True. Had to convert my mkv to ts with AviDemux. I put the dll in my plugins folder and now everything works now! Thanks man!
    Last edited by ENunn; 29th Mar 2019 at 16:39.
    Quote Quote  
  8. Originally Posted by ENunn View Post

    What should I rip it with? I've been using MakeMKV for a while now.
    If the aim is to work with a DVD, don't ever use MakeMKV on it. As you've learned now. Decrypt it to the hard drive with a proper decrypter followed by using MPEG2Source together with the DGDecode.dll. Read the docs included in the DGMPGDec package to learn more about how to work with DVDs properly.
    Quote Quote  
  9. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Apologies for the double post, but how do I get audio working?


    Tried using FFAudioSource but it gives me a lot of errors.

    Quote Quote  
  10. v = VideoSource()
    a = AudioSource()
    AudioDub(v,a)
    Quote Quote  
  11. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    v = VideoSource()
    a = AudioSource()
    AudioDub(v,a)
    Where should I put that?
    Quote Quote  
  12. That's pseudo code. VideoSource() stands for whatever source filter you use to load the video -- Mpeg2Source in your earlier script. AudioSource() stands for whatever source filter you use to load the audio, eg ffAudioSource().

    Keep in mind that whenever you don't name a stream in AviSynth the name "last" is assumed. In your script:

    Code:
    Mpeg2Source("g:\theend.d2v")
    ffAudioSource("g:\theend.ts")
    ConvertToYV12()
    you first create a video stream called last with Mpeg2Source. Then you throw away that stream and create a new stream callled last with ffAudioSource. Then you convert "last" to YV12 -- but last has no video, only audio, so it failes.
    Quote Quote  
  13. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    That's pseudo code. VideoSource() stands for whatever source filter you use to load the video -- Mpeg2Source in your earlier script. AudioSource() stands for whatever source filter you use to load the audio, eg ffAudioSource().

    Keep in mind that whenever you don't name a stream in AviSynth the name "last" is assumed. In your script:

    Code:
    Mpeg2Source("g:\theend.d2v")
    ffAudioSource("g:\theend.ts")
    ConvertToYV12()
    you first create a video stream called last with Mpeg2Source. Then you throw away that stream and create a new stream callled last with ffAudioSource. Then you convert "last" to YV12 -- but last has no video, only audio, so it failes.
    Alright, cool! Everything's working now! Thanks for the help!
    Quote Quote  
  14. Originally Posted by ENunn View Post
    Alright, cool! Everything's working now! Thanks for the help!
    Except because DVDs are in YV12 already, you don't need that line.

    Whenever you want to know the current colorspace (and a whole lot more) add Info to the bottom of the script:

    v = VideoSource()
    a = AudioSource()
    AudioDub(v,a))
    Info


    Open that script in VDub (with the proper source filters for the audio and video) and have a look.
    Quote Quote  
  15. For the record, the problem with the frame rate of your original encode happened because FFMS2 doesn't honour repeat field flags by default. It ignores them and only outputs the "real" fields/frames at the average frame rate. DGIndex honours pulldown flags by default. FFMS2 doesn't. I don't know why.

    To use FFVideoSource with DVD video you've ripped with MakeMKV, enable the honouring of pulldown flags and it should behave as DGIndex does. Follow that with Info() temporarily to make sure you have the correct frame rate (29.97fps) ie

    FFVideoSource("C:\SomeVideo.mkv", rffmode=1)
    Info()

    If you set rffmode=1 (the default is zero) and there's no repeat flags in the stream, FFMS2 will probably output an error, in which case removing the rffmode option or changing the value to zero is okay and it should give you 23.976fps.

    If you've already ripped to an MKV and FFMS2 still gives you problems (it shouldn't), you don't have to re-rip the disc. You can open the MKV with TSmuxer and remux the video and audio as a TS file. DGIndex can open that.
    Last edited by hello_hello; 29th Mar 2019 at 19:17.
    Quote Quote  
  16. Originally Posted by manono View Post
    Originally Posted by ENunn View Post
    Alright, cool! Everything's working now! Thanks for the help!
    Except because DVDs are in YV12 already, you don't need that line.
    And if you did (say, some other decoder was putting out YUY2), you would most likely need ConvertToYV12(interlaced=true).
    Quote Quote  
  17. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Hi. Posting here again to bring up another issue I'm having.

    I converted one of the VOB files to a d2v with dgmpdec. I put it into Avisynth and it's playing faster than its supposed to.

    This is what the output from Avisynth looks like:
    https://youtu.be/pjJ4aHrDzXs

    This is what the video is supposed to be like (deinterlaced with handbrake + yadif2x so there's no upscaling on this one):
    https://youtu.be/Z9oCv18weVM

    Here's my script.
    Image
    [Attachment 48791 - Click to enlarge]


    Any help? Thanks!
    Quote Quote  
  18. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by ENunn View Post
    Hi. Posting here again to bring up another issue I'm having.


    Any help? Thanks!
    Post your script
    Quote Quote  
  19. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by davexnet View Post
    Originally Posted by ENunn View Post
    Hi. Posting here again to bring up another issue I'm having.


    Any help? Thanks!
    Post your script
    It's in the screenshot but I'll just post again for sake of it.

    Code:
    MPEG2Source("G:\dvd-blu ray rips\VIDEO_TS\FAITH_HILL\VIDEO_TS\VTS_05_1.d2v")
    v = MPEG2Source("G:\dvd-blu ray rips\VIDEO_TS\FAITH_HILL\VIDEO_TS\VTS_05_1.d2v")
    a = FFAudioSource("G:\dvd-blu ray rips\FAITH_HILL\title_t08.mkv")
    AudioDub(v,a)
        AssumeTFF()
        QTGMC( Preset="Slow", EdiThreads=4 )
        Spline64Resize(1920,1440)
    Quote Quote  
  20. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by ENunn View Post
    Originally Posted by davexnet View Post
    Originally Posted by ENunn View Post
    Hi. Posting here again to bring up another issue I'm having.


    Any help? Thanks!
    Post your script
    It's in the screenshot but I'll just post again for sake of it.

    Code:
    MPEG2Source("G:\dvd-blu ray rips\VIDEO_TS\FAITH_HILL\VIDEO_TS\VTS_05_1.d2v")
    v = MPEG2Source("G:\dvd-blu ray rips\VIDEO_TS\FAITH_HILL\VIDEO_TS\VTS_05_1.d2v")
    a = FFAudioSource("G:\dvd-blu ray rips\FAITH_HILL\title_t08.mkv")
    AudioDub(v,a)
        AssumeTFF()
        QTGMC( Preset="Slow", EdiThreads=4 )
        Spline64Resize(1920,1440)
    Your video showing the problem is not available
    Quote Quote  
  21. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by davexnet View Post
    Your video showing the problem is not available
    Aaaa forgot to hit publish. Check now
    Quote Quote  
  22. I think you forgot to select Video -> Field Operation -> Honor Pulldown Flags in DgIndex. And I'm pretty sure that video should be inverse telecined, not deinterlaced.
    Quote Quote  
  23. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I see the dancing man stops at 8 seconds in one video and 10 seconds in the other.
    Why are you using QTGMC? Is the source interlaced?
    Seems as if the video speeded up

    What is the frame rate out of the mpeg2source and what is it after QTGMC?
    Quote Quote  
  24. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by davexnet View Post
    Why are you using QTGMC? Is the source interlaced?
    Yep.

    Originally Posted by davexnet View Post
    What is the frame rate out of the mpeg2source and what is it after QTGMC?
    Both 59.94.

    Originally Posted by jagabo View Post
    I think you forgot to select Video -> Field Operation -> Honor Pulldown Flags in DgIndex. And I'm pretty sure that video should be inverse telecined, not deinterlaced.
    That fixed it! Thanks!
    Quote Quote  
  25. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Yes, just looking at the downloaded source from youtube, you can see they're not (mostly) unique frames.
    Doesn't the way qtgmc is coded act as a bob?
    Quote Quote  
  26. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by davexnet View Post
    Yes, just looking at the downloaded source from youtube, you can see they're not (mostly) unique frames.
    Doesn't the way qtgmc is coded act as a bob?
    I believe so. It looks so much better than a traditional bob deinterlace though.
    Quote Quote  
  27. The fact that every 5th frame is a duplicate in the handbrake video indicates the video is telecined film, not interlaced video. It should be inverse telecined to 23.976 fps with TFM().TDecimate().
    Quote Quote  
  28. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by jagabo View Post
    The fact that every 5th frame is a duplicate in the handbrake video indicates the video is telecined film, not interlaced video. It should be inverse telecined to 23.976 fps with TFM().TDecimate().
    Mediainfo says its interlaced but then again it may be lying to me :P


    Might consider doing that next time I come across something like that. Luckily having the pulldown flags honored in DGIndex fixed the speedup issue.
    Quote Quote  
  29. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    The fact that every 5th frame is a duplicate in the handbrake video indicates the video is telecined film, not interlaced video. It should be inverse telecined to 23.976 fps with TFM().TDecimate().
    thanks jagabo, I've only just looked at this one and I see what you mean.
    I'd be interested in seeing the OP's final script. Did he keep the frame rate as 23.976?
    Quote Quote  
  30. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    MediaInfo isn't "lying" to you, it's just just still too dumb to understand those nuances.

    E.g. every DVD is coded and stored in an interlaced form. Sometimes it is truly interlaced, sometimes it has been telecined from progressive frame film. Ripping properly and running through DGIndex will expose that more clearly.

    Scott
    Quote Quote  



Similar Threads

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