Hi everyone!
I have couple of Children's DVD here at home (Learn to Count, ABC, etc). I sometimes play it for the kids, but I want to get ride of my DVD Player (I have a Kodi now for streaming). The initial idea was to just copy the .vob files from the DVD into my hard-drive and be done with it. But I noticed the files are too big for my taste. Especially when the content is Children's stuff that isn't very high quality to begin with.
I'm considering using FFMPEG to re-encode them. I know that re-encoding music files (lossy to lossy) is a big no no. I assume it's the same for Video? But since all I own is a Lossy .vob files from the DVD, I guess I'm going to try it anyway just to save some space.
I used FFMPEG in the past to convert Loseless VHS Videos to Lossy format like so:
So obviously, the source is going to be vob files instead of AviSynth script. But what about the rest? Couple of questions:Code:ffmpeg64 -i "E:\test\test.avs" -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -vf setsar=12/11 -c:a libfdk_aac "results.mp4"
1. Preset slow and crf 18 sounds a bit like over-kill for a Children's DVD. What would be a saner option?
2. I assume, I don't have to state YUV 420 because unlike the VHS capture I captured at 422, DVDs are at 420 by default?
3. what about setsar? I'm using is to have an proper aspect ratio when the TV scale it up. But 12/11 is for PAL capture (576x720). Do I even need to set it on DVD content?
4. Is there any other DVD specific options I should be aware of and state to FFMPEG when handling DVD?
5. The DVD disk I was checking was interlaced. Are all DVDs interlaced? or some are progressive? Will interlaced content will benefit from de-interlacing with QTGMC (and in that case, I assume I will need to write AviSynch script that loads the VOB file).
6. Does FFMPEG support adding couple of .vob files into a single mp4 file? or I need to do that in AviSynth?
Thanks!
+ Reply to Thread
Results 1 to 30 of 89
-
-
You can not simply copy the vobs from the dvds to your hard drive. You have to RIP (the correct useage word) first.
Yes. Makemkv can do this in one step, RIP and create the mkv container.
If you want .mp4 then handbrake is also an option. Then you simply load the entire RIPPED folder and it can create a single .mp4 -
Oh, I missed that. I filled around with the Vob files, and it seems like Media player was able to play those. I don't really care about Menus and such, I assume all I need is the vob, or multiple vobs (and merge them during the mp4 conversion).You can not simply copy the vobs from the dvds to your hard drive. You have to RIP (the correct useage word) first.
Well, I convert my Loseless VHS content into mp4, so that's the only container I'm familiar with really. Mkv is better for DVDs? or is just a different container that does the same thing?Yes. Makemkv can do this in one step, RIP and create the mkv container.
I had a strange experience with handbrake in the past. It does a lot of things automatically for you, like de-interlacing (which is something I'm not sure is right/proper for DVD content?).If you want .mp4 then handbrake is also an option. -
If your media player plays the vobs without ANY picture disturbance then you can copy them straight to the hard disk. But typically there will be some copy-protection and you see missing pixels.
Mkv is just a container. You are left with the original mpeg2 video as is on the dvd. No re-encoding done.
Why not de-interlace for mp4 ? Check out dvd-rips (the modern useage of the word now) and, typically, many will be created by Handbrake or similar tools and will be de-interlaced. Of course the re-encoding also means you get a smaller file than with makemkv.
If you still want to use ffmpeg then there are several GUI's available so you do not have to concern yourself with the command-line. Also bear in mind that many of the stand-alone conversion 'one-click' programs also make use of ffmpeg. I can not recc a GUI since I do not use these (or ffmpeg directly for that matter) but there are active topics that discuss these. -
Well, I didn't play all the Video - but the section I did see didn't have any missing pixels. Probably this "Learning to Count" DVD isn't copy-protected. So Ripping is basically the process of taking copy-protected video file and make them viewable video files, cool.
Ha, in that case, Perhaps I will do a bit of reading about the difference between mkv and mp4 - as boon being just container - I wonder how they differ. But I will probably end up with mkv as you guys suggested MakeMkvMkv is just a container. You are left with the original mpeg2 video as is on the dvd. No re-encoding done.
No reason I guess. Was wondering if I can use QTGMC as de-interlancer inside Handbrake. Will check it out!
Is there active topic for FFMPEG? because I couldn't find a dedicate forum for that.but there are active topics that discuss these.
Thank you! -
Here is the topic that discusses GUI's
https://forum.videohelp.com/threads/400709-GUI-for-ffmpeg -
Just for clarity why de-interlacing is suggested.
Your DVD is either 720*480 or 720*576. The actual display is different (640*480 or 768*576). If you plan to create a mp4 with different parameters you MUST de-interlace BEFORE you resize. -
-
Well, I assume I can perhaps use ffmpeg with avisynth script for that.Nope.
What I did with my VHS content, is to leave it at the original resolution (and de-interalce that). I didn't re-size the video, but instead I'm letting the source to do it for me (TV, PC etc). That's what the `setsar` parameter in ffmpeg is for I believe. It tells the source how even after re-sizing, how to keep the aspect ratio correct?Your DVD is either 720*480 or 720*576. The actual display is different (640*480 or 768*576). If you plan to create a mp4 with different parameters you MUST de-interlace BEFORE you resize.
I was checking it's interlaced with MediaInfo - will media Info let me know if it's really progressive?Also, the DVD may contain progressive video but flagged as interlaced (typical for PAL DVDs with movies). If so, deinterlacing of progressive footage is not recommended. -
[QUOTE=Okiba;2610948]
No, you would have to separate the fields (or bob the video), select a scene with action or horizontal panning, then step through the fields (or bobbed frames). If there is movement between successive fields (frames) then the video is interlaced. If the fields (or bobbed frames) change every 2nd field (frame) only, the video is progressive.I was checking it's interlaced with MediaInfo - will media Info let me know if it's really progressive?
Also you will see the typical combing when you watch interlaced video on your PC with any deinterlacer of the player disabled. -
That is fair enough. Should have made it more clear when I mentioned the actual display where the vertical resolution is untouched. Just that these days with larger screens it is more 'tempting' to resize with a 4:3 video typically resized, for example, to 720*540.
Just trying to put the OP on the correct path and avoid disappointment. But, for clarity sake, how would one know that the video is already progressive (the OPs disks are not movies but could be animations)
Edit: I see that last point has already been addressed. -
Yeah, animations can be tricky. Also, I should have mentioned that movies on NTSC DVD are often hard- or soft telecined which would require IVTC rather than deinterlacing.
Perhaps the OP uploads a sample to collect better advice. -
Oh right, can do that easily with VLC.Also you will see the typical combing when you watch interlaced video on your PC with any deinterlacer of the player disabled.
Yea, for animation I use Srestore(23.976) after de-interlacing with QTGMC mostly.Yeah, animations can be tricky.
So It looks like the plan is something like that:
1. Ripping the DVDs with MakeMKV. If I want the retain the quality 1 to 1 with the DVD. That's all I really need to do. However, if I want to to de-interlace it, or compress it a bit more -
2. I can load up the MKV file with Avisynth, de-interlacing with QTGMC, and output a mp4 out of it.
I guess there is no need to state the output file being 4:2:0, as all the DVD I checked were 4:2:0 already. So the only open questions left I need to figure out, is what the SAR parameter should be in order to maintain a proper aspect ratio when the source upscales the DVD resolution. I will also check the FFMPEG GUI thread mentioned above.
Thanks guys! -
720x480 NTSC 4:3 DVD: SAR = 8:9
720x480 NTSC 16:9 DVD: SAR = 32:27
720x576 PAL 4:3 DVD: SAR = 16:15
720x576 PAL 16:9 DVD: SAR = 64:45 -
Thank you jagabo, and hi again

Is there any formula I can refer in the future for figuring out the SAR myself?
Besides that, I did a bit reading for the sake of learning more. It seems like FFMPEG is able to Rip DVD by basically concatenating the vob file. But as mentioned above, it seems like ripping also take care of the copy-protection, so I assume that concatenating option only work with non copy-protected DVDs. So it seems more reasonable to use the recommended MakeMKV.
Then, it seems like AviSynth is able to read .mkv using FFMpegSource2. So I can write an AviSynth script that will de-interlace the DVD using QTGMC (with casual preset like fast), and create a smaller mp4 out of it using the FFMPEG command line:
Will install MakeMKV tomorrow and give everything a goffmpeg64 -i "E:\test\test.avs" -c:v libx264 -preset veryfast -crf 18 -pix_fmt yuv420p -vf setsar=16:15 -c:a libfdk_aac "results.mp4"
Last edited by Okiba; 16th Feb 2021 at 14:39.
-
Rip using a real decrypter, not something that repackages it into an MKV. Then use DGIndex to join the VOBs and to create a D2V project file so you can use MPEG2Source in an AviSynth script.
If it's an NTSC DVD of a film, better you IVTC it. You don't want to deinterlace film sources. Even film sources on PAL DVD shouldn't just be blindly deinterlaced when there's interlacing. As mentioned, samples are always welcome.However, if I want to to de-interlace it
Not for me, it isn't. DVDs shouldn't be worked on as MKVs, not when there's a better alternative (outlined above).So it seems more reasonable to use the recommended MakeMKV.
Once again, don't blindly deinterlace. Do that only with pure interlaced sources, not film sources. And use MPEG2Source whenever possible within an AviSynth script.So I can write an AviSynth script that will de-interlace the DVD using QTGMC... -
Had some free time. MakeMKV works like a charm and very easy to use. Here's the AviSynth script I used to de-interlace the MKV output into lossy mp4 file if anyone find it interesting:
The DVD I own is interlanced, at 720x480. After cropping the 8 black bar pixel on each side - I'm using SAR of 8:9 (as it's 4:3 DVD). Here's the FFMPEG command to generate the final mp4 file:Code:SetFilterMTMODE("QTGMC", 2) FFMpegSource2("E:\title_t00.mkv", atrack=1) Crop(8, 0, -8, 0) AssumeTFF() QTGMC(Preset="Fast", EdiThreads=3) Prefetch(3)
I had a quick look on a short example, looks fine. The original DVD is 29.97FPS. QTGMC bring it to 59.94 and it looks fine, but I probably should test it with SRestore, see if 29FPS looks better as this is a cartoon.Code:ffmpeg64 -i "dvd.avs" -c:v libx264 -preset veryfast -crf 18 -pix_fmt yuv420p -vf setsar=8/9 -c:a libfdk_aac "results.mp4"
Thanks!
EDIT: Just missed your post manono.
Have any example for one? and why is it more real then MakeMKV?Rip using a real decrypter
As you see above, I used FFMpegSource2. What the difference and why should I prefer MPEG2Source?MPEG2Source
I can attach an example, but this will be for this specific DVD. How can I tell if a video is "Pure interlanced source"? How Sharc mentioned above?Once again, don't blindly deinterlace. Do that only with pure interlaced sources, not film sources.
I heard it mentioned on the forum couple of times, mostly when people referencing ripping Cartoons, but I never really got into it. I think it was mentioned once SRestore after De-interlacing has the same effect of IVTC? or am I'm wrong?IVTCLast edited by Okiba; 16th Feb 2021 at 15:07.
-
Never deinterlace when you can IVTC, Any deinterlacer - even the best ones such as QTGMC - damages the video. An IVTC, on the other hand, does no damage to the original frames.
If, during a section with steady movement, all the frames are interlaced. If you're working with a movie (or animations), that almost certainly is not the case. And you have to view it with something that won't deinterlace it. You can open your unfiltered AviSynth script in VDub (or VDub2) to check.How can I tell if a video is "Pure interlanced source"?
And I trust MKVs about as far as I can throw them. MPEG2Source is far and away the best way to open DVD sources. That's after decrypting the DVD using DVDDecrypter, DVDFab or somesuch.
SRestore(frate=23.976) after bobbing might give you 23.976fps, yes, but not with the same quality as an IVTC.I think it was mentioned once SRestore after De-interlacing has the same effect of IVTC? or am I'm wrong?
You should probably perform an IVTC as 23.976fps is probably the correct framerate. Untouched samples are worth 1000 words....but I probably should test it with SRestore, see if 29FPS looks better as this is a cartoon. -
In theory, on DVD the full 720x480 frame constitutes the 4:3 image. That makes the SAR 8:9. But... When analog tape is digitized they follow the ITU specification. That spec captures the 4:3 analog frame in a 704x480 digital frame with 8 extra pixels of padding at the left an right edges. So the ITU capture has a SAR of 10:11 and the full 720x480 frame is slightly wider than 4:3. When those caps are made into DVDs the difference between the MPEG spec and the ITU spec is often ignored. The full 720x480 is simply written to the DVD and flagged as 4:3 DAR.
In short, if you have 8 pixel borders at the left and right it's usually a dead giveaway that you're working with an ITU cap and you should use the 10:11 SAR.
The general equation that relates display aspect ratio, the frame size, and the sampling aspect ratio (sometimes called pixel aspect ratio) is:
So, for example, with an ITU cap:Code:DAR = FAR * SAR DAR = display aspect ratio, the final shape of the picture FAR = frame aspect ratio, ie, width:height of the digital frame in pixels SAR = sampling aspect ratio, the relative distance between samples horizontally and vertically (ie shape of individual pixels)
DVD Decrypter is very old but free and still works on a lot of DVDs. Also the free version of DVD FAB will decrypt DVDs to VIDEO_TS folders.Code:DAR = FAR * SAR DAR / FAR = SAR 4:3 / (704:480) = SAR 4/3 / (704/480) = SAR 4 * 480 / 3 / 704 = SAR 10 / 11 = SAR 10:11 = SAR
ffMpegSource2() is not always frame accurate. Complex AviSynth scripts may end up reading frames out of order and ffMpeg2Source() may not deliver the right frame every time. DgIndex/Mpeg2Source() works better. Unfortunately the pair doesn't work well with MKV files. So the output of MakeMKV will have to have the MPEG2 video extracted as an MPG file.
The best way to analyze for this is to open the video and apply Bob() or SeparateFields():
Then step through the video frame by frame (a horizontal panning shot is best for this) and watch how often the frame changes (ignore the aliasing and slight up/down bouncing). If there is motion in every frame the video is true interlaced. Telecined film usually shows a 3:2 repeat pattern -- one film frame repeated 3 times, the next 2 times, repeating. Those can be restored to the original 24 fps film with TMF().TDecimate(). Unfortunately, there are many other possible cases. Cartoons will never be true interlaced -- nobody is going to draw 60 different film frames per second when they can get away with 12 (24 in panning shots). But sometimes you may get a video that is very hard or impossible to IVTC. I usually just resort to QTGMC() in cases like that. In fact, your kids probably won't appreciate the difference between a good IVTC and QTGMC. You might just make your life easy and convert them all with QTGMC and leave them at 60p.Code:Mpeg2Source("filename.d2v") Bob() # or SeparateFields()
The Wikipedia article is pretty good: https://en.wikipedia.org/wiki/Telecine -
Thank you both. I was able to rip a Vob file with DVDDecrypter, and now using MPEG2Source instead of FFMpegSource2. And thank you jagabo for the SAR formula. Stored it aside on my note. Will write a Python script to do it automatically when I'll have more free time

With SeparateFields() I was able to indeed note the 3:2 movement. Strangely enough, I couldn't with Bob() (with Bob() a movement occurred every 5 frame). So yea, not really interlaced.
I agree. For this kind of videos, it's probably an overkill. The kid won't notice :PIn fact, your kids probably won't appreciate the difference between a good IVTC and QTGMC. You might just make your life easy and convert them all with QTGMC and leave them at 60p.
But sometimes you may get a video that is very hard or impossible to IVTC.So I check couple of old forum posts. It seems most suggest way doing IVTC is with: TMF().TDeimate(). This happens after QTGMC (so the other magic QTGMC will get applied to the video?) - or if I'm using TDecimate() I can't use QTGMC? Is this valid?You should probably perform an IVTC as 23.976fps is probably the correct framerate.
I'm trying to create a condition fork in my mind. If 3:2 pulldown, IVTC. On what other scenarios should I use IVTC with TDecimate, and on which scenario should I use Srestore(frate=23.976)? (and on which I should just give up and go with QTGMC60?Code:AssumeTFF() QTGMC(Preset="Fast", EdiThreads=3) TFM().TDecimate()
I have couple of DVD I would like to rip, so while I can share an example, it's probably only relevant for this specific DVD - so I'm trying to grasp the conceptsUntouched samples are worth 1000 words.
Thank you!Last edited by Okiba; 17th Feb 2021 at 05:45.
-
No, you use only TFM().TDecimate(). QTGMC() has a special cleanup mode that's sometimes useful for otherwise damaged material.
When TFM() can't find a matching field to complete a frame it falls back on deinterlacing. You can supply your own deinterlaced frames for it instead of using its internal deinterlacing algorithm. QTGMC() is sometimes used for that:Code:TFM() TDecimate() QTGMC(InputType=2) # cleanup only, no deinterlacing
There are pulldown patterns other than 3:2. TFM().TDecimate(Cycle=X, CycleR=Y) may work for them. Sometimes you come across a PAL video that simply has the wrong fields merged into frames:Code:TFM(clip2=QTGMC(FPSDivisor=2)) # use QTGMC() for fixup when field matching fails TDecimate()
That last scenario can be fixed with just TFM().Code:four film frames: 1 2 3 4 broadcast as fields, top field first: 1T 1B 2T 2B 3T 3B 4T 4B captured normally as top field first frames: [1T+1B] [2T+2B] [3T+3B] [4T+4B] # all frames look progressive captured "incorrectly" as bottom field first frames: [1B+2T] [2B+3T] [3B+4T] [4B+5T] # every frame looks interlaced when there's motion
SRestore() is for PAL/NTSC conversions with field blending (this is a common method of frame rate conversion; if you use a simple Bob() you'll see some blended frames, some clean frames). First you double frame rate deinterlace, then you run SRestore():
When working properly SRestore() will preferentially discard blended frames leaving only clean frames.Code:QTGMC(preset="fast") # or Yadif(mode=1) SRestore(frate=X)
Sometimes there is just too much blending or some other damage. There may be no way to restore the original film frames. Attempting to do so may leave lots of blended frames, jerky video, or other damage. In cases like that using just QTGMC() will look no worse than watching the original DVD, usually better because QTGMC() is a better deinterlacer than that in any TV or DVD player. -
I assume this cleanup mode doesn't apply the normally applied sharpness and other touches QTGMC do? can I use QTGMC to apply everything but the de-interlacer? or the other side effects are direct effects of the de-interlacing?No, you use only TFM().TDecimate(). QTGMC() has a special cleanup mode that's sometimes useful for otherwise damaged material.
Sounds like a sane default. Thank you, will be using that.use QTGMC() for fixup when field matching fails
So anything that is not 3:2 is sort of a mistake in the video? It probably means the original video will look funky?Sometimes you come across a PAL video that simply has the wrong fields merged into frames
Oh, OK. I was sure SRestore is just another way to IVTCing a video. So SRestore just discard blended frame, mostly happening by PAL/NTSC conversionSRestore() is for PAL/NTSC conversions with field blending.
Oh, so SRestore is not another method of IVTC, but rather another tool to fix another problem that happens due to PAL/NTSC conversion (but because it used about QTGMC, is half the frame-rate back to the frame-rate used in Cartoons).
Just for the sake of testing, I compared the same 10 second of a cartoon once with QTGMC().SRestore(), to TFM().TDecimate() - and during playback, I didn't notice a difference. Perhaps I will see one if checking it frame by frame - or perhaps my eye isn't trained enough
So I think a decent scenario would be: Try to SeparateFields(). If every frame moves, De-interlace normally with QTGMC. If after QTGMC you seeing frame blending, use SRestore. If It's 3:2, use TFM().TDecimate(). Any other pull-downs, play around with CyclesX/Y.
I wonder if there's out there in a wild any example for how NTSC/PAL conversion blended frames looks like or any video that compare QTGMC().Srestore() vs TFM().TDecimate() that make difference more noticeable?
EDIT:
Compared TFM().TDecimate() to QTGMC().Srestore() frame by frame. With QTGMC.Srestore I get movement every 2 frame. With TDecimate() I mostly get movement every 2 frames, but sometimes, I will see movement frame and frame.Last edited by Okiba; 17th Feb 2021 at 10:48.
-
-
With most cartoons character animation is done at 8 or 12 fps so fewer cell have to be drawn. Panning shots, where they pan over a large background are shot at 24 fps (character motion on top of that will still be 8 or 12 fps). So you expect to see motion with every frame during panning shots. Character animation usually shows motion every two (12 fps animation) or three (8 fps animation) frames.
-
I'm assuming he's comparing the same sections and getting a steady 12fps (2-2-2-2) when using SRestore, but sometimes movement every frame (2-1) with TDecimate. There should also be some threes in there to compensate (2-1-3-2-1-3) or some such. If he's comparing different sections of the episode then, yes, it's an apples to oranges comparison as different sections were drawn to be displayed at different framerates. He should still be using TDecimate's Mode=1 for any animations as I've seen plenty of 2-1-3-2-1-3 when it should be 2-2-2-2-2-2 if not using it.
Last edited by manono; 17th Feb 2021 at 21:14.
-
-
Yea, I am comparing the same sections, and getting a steady 2-2-2-2 with SRestore. Using TDecimate(Mode=1) did make TDecimate more steady - but I do see movement every 1 frame once in a while (even though much rarely compared to the default mode). It's the same frame however I'm seeing with SRestore - so no information is being lost. What is the end goal here? steady 2-2-2-2? is that true for any IVTCing?
In that case, is it better to just use SRestore? (where it's steady 2-2-2-2) (as a rule of a thumb).
Thanks for the blending video!
By the way, back to the DVD ripping question above - I use IFO mode with Decrypter (or else I get audio out of sync issue). The end results are multiple vob files. How do you guys keep your source videos? Leave couple of Vob files? basically the output of Decrypter? or do you change the container to something that is easier to work with? (and maybe concatenating all the vob files into a single file?).Last edited by Okiba; 18th Feb 2021 at 10:36.
Similar Threads
-
help DVDRip encoding of .VOB files using LINUX tools?
By precipizio in forum DVD RippingReplies: 1Last Post: 16th Apr 2020, 11:38 -
Splitting or trimming raw VOB or MPG files without re-encoding?
By DF001 in forum Capturing and VCRReplies: 3Last Post: 14th Mar 2020, 23:53 -
Multiple .VOB file to one file?
By neworldman in forum Video ConversionReplies: 12Last Post: 4th Jan 2017, 03:00 -
vob to mp4 - encoding using vdub to mimic HB settings
By wolfdogg in forum Video ConversionReplies: 27Last Post: 24th Dec 2016, 22:03


Quote
