VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date
    Oct 2020
    Location
    Australia
    Search PM
    Okay so,

    I own a LOT of physical DVDs and I also run a small Plex server that my family has access too throughout the household. I decided that I wanted to start digitising some of my physical media, especially some of my more rare and obscure titles that I've picked up over the years. --

    My overall goal is to rip these DVDs to their highest possible quality and then compress with H265 to a more Plex friendly format and size. I've chosen H265 because I believe its the future in video codec and I love the small size to quality ratio that it produces..

    I'm quite new to video encoding, but I've done quite a bit of research over the past few days. I guess the point of this post is to document the process I went through and receive some kind of validation that I done it "correctly".

    The DVD I am using as an example in this post, is a cartoon TV series. The DVD contains about 9 episodes and each episode is about 20 minutes long. The goal is to rip the episodes into individual files, compress them to H265 and scan them into my Plex library.

    MakeMKV

    The first thing I done was insert the DVD into my drive and load up MakeMKV. The software scanned the contents of the disc and I quickly found out that the episodes were annoyingly not individually broken up into their own titles or chapter. But rather just stitched as one giant 3 hour title. - So I dumped (or remuxed???) the disc to my hard drive which resulted in me having this 7gb, 3 hour, mkv file.

    VirtualDub2

    Because I wanted the episodes individually broken up into their own seperate files, I wanted to try and find a way to manually break them up, without having to edit, compress and compress again. Doing this would have degraded the quality. So I opted to go with Virtualdub2, because at least then I could split the episodes up and save them with a lossless codec.

    So I opened the giant mkv file in Virtualdub2 and noticed that the video was interlaced. I applied a YADIF de-interlace filter and separated the fields into their own frames. This straight away turned my mkv file from 25fps to 50fps. I then proceeded to manually break the episodes up into their own individual files and save each one as an avi using utvideo lossless codec.

    HandBrake

    So I now have 9 episodes broken up into individual files in the avi format. Keep in mind these episodes are GIANT in file size because of the lossless codec. The last part of this "project" is to compress them down into H265. So I load all 9 episodes up into Handbrake. These are the settings I opt for:
    • MKV
    • Dimensions: 720x576
    • Video Codec: H265
    • 50fps @ Constant Rate
    • Encoder Preset: Medium
    • Tune: Animation
    • Constant Quality: 20
    • Audio: 128k Stereo

    Everything else I either left default or auto.

    Each episode encoded and averaged a file size of about 100-150mb. -- I scanned them into my Plex library and streamed them on my TV and they looked absolutely great! (for DVD quality).

    Question 1: So was this the correct way to rip my DVD, split the episodes manually and compress?

    Question 2: When compressing in Handbrake, should I have restored the episodes back to 25fps (how they originally were before de-interlacing)? Or was it fine to leave them at 50fps?

    Question 3: When using a constant quality to encode video, why do file sizes vary so much? In my case, each episode was about 20 minutes long and they were all encoded using a constant quality of "20", so why is one episode 190mb and another episode 100mb? Why is there such a jump in file size?
    Quote Quote  
  2. Originally Posted by ThaKarra View Post
    My overall goal is to rip these DVDs to their highest possible quality...
    Since ripping - by definition - means to put them on the hard drive minus any encryption and region coding, then they'll automatically be in the 'highest possible quality'.

    But rather just stitched as one giant 3 hour title.
    I don't use MakeMKV so maybe others can help with that problem. Other decrypters can decrypt by PGC (titles or episodes).
    I applied a YADIF de-interlace filter and separated the fields into their own frames. This straight away turned my mkv file from 25fps to 50fps. I then proceeded to manually break the episodes up into their own individual files and save each one as an avi using utvideo lossless codec.
    You probably ruined them by applying Yadif to deinterlace and bob (double the framerate). Once degraded like that, the rest of your workflow is useless.

    You had best provide a sample direct from the DVD. With it already decrypted to the hard drive you can cut a 10 second portion from a VOB - one with steady movement - using DGIndex. Use the [ and ] buttons to mark a section and then File->Save Project file and demux video. Upload the resulting M2V here.
    Quote Quote  
  3. Member
    Join Date
    Oct 2020
    Location
    Australia
    Search PM
    You probably ruined them by applying Yadif to deinterlace and bob (double the framerate). Once degraded like that, the rest of your workflow is useless.
    Ruined? How so? After I applied the filter in VirtualDub2, it not only fixed the de-interlace issue but it also made the video MUCH smoother.

    Originally Posted by manono View Post
    You had best provide a sample direct from the DVD. With it already decrypted to the hard drive you can cut a 10 second portion from a VOB - one with steady movement - using DGIndex. Use the [ and ] buttons to mark a section and then File->Save Project file and demux video. Upload the resulting M2V here.
    Here you go: https://www.dropbox.com/s/au9qjgey0ddveyp/Sample.demuxed.m2v?dl=0
    Last edited by ThaKarra; 30th Oct 2020 at 17:20.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I'll try to clarify a few things...

    manono is correct in that "RIPPING" is basically a straight copy (minus encryption stuff) to harddrive. In this state, it is either ISO (the whole disc as an imagefile), or *.VOB (and possibly also *.IFO and *.BUP) files within a VIDEO_TS folder. Those VOB files include the MPEG2 video and associated audio, etc. Straight stream copy = no further quality loss = same quality as was on the disc.
    ANYTHING ELSE is "RIPPING + Converting"...

    manono is likely also correct in that:
    1. Film-based videos should normally NOT ever be "deinterlaced", but rather InverseTelecine'd (aka IVTC). This properly restores the progressive image without removing any fields and without introducting any blended/interpolated fields. This is less important to need to do in PAL lands (like Australia) than it is NTSC lands, but is still important.
    2. De-interlacing can be done many ways, but unless you are careful, you can very likely be introducing interpolated fields. When you combine that with further resolution or motion processing (scaling, framerate conversion) you are just compounding the error.

    If you had a film-based source, and set up Yadif such that it was only recombining odd & even fields, this would be the equivalent of PAL-based IVTC, and that would be OK. But any OTHER setup is very likely to become problematic down the line.


    Also, while you are partially correct about h265 being more efficient (it depends on the source, the settings, and the resolution) and that it'll be around in the future (though many other codecs will too), it MIGHT NOT be the best option for you if you are sharing the files via DLNA/NAS to your family. Depends greatly on what the lowest common denominator base of hardware you all have. Unless it is all quite modern (~2016->) there will likely be devices that will either have a hard time playing such clips, or won't play them at all.
    That is why h264 is still the most common codec: any modern equipment (~2004->) should be able to play it easily. And I would guess that the difference between the 2 codecs isn't is wide as you think (certainly not 2:1). h265 shines with UHD material, but at lower resolutions the 2 tend to converge in quality/filesize.
    And since as you say you're starting from DVDs (aka standard def, not HD nor UHD), this would more likely favor h264 for universality.


    Scott
    Quote Quote  
  5. Member
    Join Date
    Oct 2020
    Location
    Australia
    Search PM
    Hey Scott thanks for the reply.

    Before I reply to your post, I just want to start by posting 2 things.

    I just wanted to post them, that way people can analyze and directly see the result of what I'm talking about in the original post above.

    I should also mention I live in Australia, so our standard here is PAL. The DVD in my example is PAL however I do have NTSC DVDs in my collection that I will also want to end up digitising.

    Originally Posted by Cornucopia View Post
    manono is likely also correct in that:
    1. Film-based videos should normally NOT ever be "deinterlaced", but rather InverseTelecine'd (aka IVTC). This properly restores the progressive image without removing any fields and without introducting any blended/interpolated fields. This is less important to need to do in PAL lands (like Australia) than it is NTSC lands, but is still important.
    2. De-interlacing can be done many ways, but unless you are careful, you can very likely be introducing interpolated fields. When you combine that with further resolution or motion processing (scaling, framerate conversion) you are just compounding the error.

    If you had a film-based source, and set up Yadif such that it was only recombining odd & even fields, this would be the equivalent of PAL-based IVTC, and that would be OK. But any OTHER setup is very likely to become problematic down the line.
    This is very interesting. When I imported the .mkv that MakeMKV spat out into VirtualDub2, this is the exact de-interlace setting I used. - I used no deinterlace settings within Handbrake at all when compressing to H265.

    Image
    [Attachment 55683 - Click to enlarge]


    I'm going to assume based on what you said, this was the wrong move.

    Also, while you are partially correct about h265 being more efficient (it depends on the source, the settings, and the resolution) and that it'll be around in the future (though many other codecs will too), it MIGHT NOT be the best option for you if you are sharing the files via DLNA/NAS to your family. Depends greatly on what the lowest common denominator base of hardware you all have. Unless it is all quite modern (~2016->) there will likely be devices that will either have a hard time playing such clips, or won't play them at all.
    That is why h264 is still the most common codec: any modern equipment (~2004->) should be able to play it easily. And I would guess that the difference between the 2 codecs isn't is wide as you think (certainly not 2:1). h265 shines with UHD material, but at lower resolutions the 2 tend to converge in quality/filesize.
    And since as you say you're starting from DVDs (aka standard def, not HD nor UHD), this would more likely favor h264 for universality.
    In regards to what you said about H265 not being compatible on all devices. The devices we have around the house running Plex all stream H265 content perfectly fine, as they're all quite modern. I know H264 is probably the best choice for SD/DVD content but I wanted to practise with encoding to H265 and I thought as its "for the future", I would knock 2 birds with 1 stone. Either way it doesn't matter too much... I don't think my compression process within Handbrake is overly wrong, I could just use the same settings but just swap out H265 with H264. I think I'm going wrong with the earlier "deinterlacing" steps.
    Last edited by ThaKarra; 30th Oct 2020 at 19:25.
    Quote Quote  
  6. That's an unusual sample. It's almost all progressive with only a few interlaced frames. Is the whole thing like that (mostly progressive)? What I eventually decided to do was to deinterlace only those few frames (7, I believe) that were interlaced, leaving the rest alone. This is nothing HandBrake can do. Here's the AviSynth script:

    MPEG2Source("Test.d2v")
    Orig = QTGMC(FPSDivisor=2)
    TDeint(Full=False,Clip2=Orig)


    If you're going to work with animations, you should learn some AviSynth and lose HandBrake. Here's your sample reencoded as an MP4:
    Image Attached Files
    Last edited by manono; 30th Oct 2020 at 21:31.
    Quote Quote  
  7. Originally Posted by ThaKarra View Post
    That sample is mostly progressive frames. But there were a few interlaced frames. I would use TFM() to fix those, not a deinterlace.

    Code:
    Mpeg2Source("Sample.demuxed.d2v", CPU2="xxxxxx", Info=3) # deblock and dering
    TFM() # cleans up frames 106, 108, 110...
    # color correction, denoise, etc.
    Quote Quote  
  8. Member
    Join Date
    Oct 2020
    Location
    Australia
    Search PM
    Originally Posted by manono View Post
    That's an unusual sample. It's almost all progressive with only a few interlaced frames. Is the whole thing like that (mostly progressive)? What I eventually decided to do was to deinterlace only those few frames (7, I believe) that were interlaced, leaving the rest alone. This is nothing HandBrake can do. Here's the AviSynth script:

    MPEG2Source("Test.d2v")
    Orig = QTGMC(FPSDivisor=2)
    TDeint(Full=False,Clip2=Orig)


    If you're going to work with animations, you should learn some AviSynth and lose HandBrake. Here's your sample reencoded as an MP4:

    Oh thanks so much for taking the time to help me with this. I really am trying to do research and learn.

    I'm not sure if the whole DVD is like that. It's a 2 Disc set. I just grabbed a random clip for you. There is definitely a lot more interlacing throughout the actual episodes though.

    I watched a couple of AviSynth tutorials for deinterlacing and now I'm just messing around with plugins and scripts trying to learn the ropes.

    I decided to give it another attempt with some different footage from the DVD, this time the episode intro. You can clearly see that the whole thing is interlaced this time.

    Fingers crossed this time I think I've done it correctly.

    This is the script I used. I'm going to be honest, I don't really know what it does (yet, I will learn), I basically just followed a YouTube tutorial step to step (https://www.youtube.com/watch?v=1s6XNCVUBdE)

    Code:
    MPEG2Source("Sample2.d2v")
    tfm()
    BilinearResize(720,576)
    vinverse()
    If you could please take a look at my MKV attempt linked above, I'd really appreciate it. This time it's properly been done in 25fps.

    Originally Posted by jagabo View Post
    I would use TFM() to fix those, not a deinterlace.
    I used the TFM plugin in this attempt!
    Quote Quote  
  9. Originally Posted by ThaKarra View Post
    I just grabbed a random clip for you. There is definitely a lot more interlacing throughout the actual episodes though.
    Yes, much more interlacing. Maybe TFM is better after all, with a better deinterlacer used instead of the default one:

    Mpeg2Source("Test.d2v")
    tdeintted = QTGMC(FPSDivisor=2)
    TFM(clip2=tdeintted)
    Crop(2,4,-2,-2)
    Spline36Resize(792,576)


    That tells TFM to use the better QTGMC for its post processing instead of the default deinterlacer. As for your video, it's already 720x576 so I'm not sure why you added a resize to the script. However, something should be done as it's not meant to be shown at 720x576. I showed one possibility in the script above. Or fix the AR when setting up the encode. And the use of Vinverse is usually a safe bet as it isn't known for deinterlacing when it's not needed.

    Originally Posted by jagabo View Post
    I would use TFM() to fix those, not a deinterlace.
    As you know, when using TFM, especially with animations, it sometimes deinterlaces a progressive frame. The TFM settings can probably be tweaked.

    Mpeg2Source("Test.d2v")
    TFM(Display=True)
    Image Attached Thumbnails Click image for larger version

Name:	Deinterlaced.jpg
Views:	26
Size:	111.1 KB
ID:	55686  

    Quote Quote  
  10. Member
    Join Date
    Oct 2020
    Location
    Australia
    Search PM
    Originally Posted by manono View Post
    As for your video, it's already 720x576 so I'm not sure why you added a resize to the script.
    Yeah I have a bad habit of adding resize to things, even when I don't need too... I guess my reasoning is because I want to confirm the size regardless. But you're right its totally unnecessary.

    However, something should be done as it's not meant to be shown at 720x576.
    This is interesting. How would I go about determining the proper resolution? 720x576 was the resolution of the original source on the DVD and seems to be the standard PAL resolution for 480p.
    Quote Quote  
  11. Yes, but the DAR is 4:3. All PAL DVDs are 720x576, but the DAR might be either 4:3 or 16:9 and they get resized differently at playback time. To get the correct resolution, multiple 576 by either 4/3 or 16/9 to get the resized width. When reencoding to a different format you can either resize to the proper aspect ratio (as I did in that script) or set a flag in the video to have the player do the resizing at playback time (similar to the way a DVD player resizes a DVD during playback). I also cropped away the black so the resize changed somewhat. And what I wrote is a bit of a generalization.
    Quote Quote  



Similar Threads