I'm trying to export long sequences of frames from a DVD, and I want to preserve every single tiny pixel present in the original DVD's files. Here's the method I'm using -- could I please get a critique?
1) rip the DVD's .VOB to my computer. (I had been using MacTheRipper, but want to switch to a PC-based program. What's the current "best" ripping software, that copies .VOBs exactly without any quality or info loss?)
2) Index the .VOB with DGIndex. Select IEEE-1080 for the iDCT algorithm, select Force Film, and disable the audio. Generate a .d2v file.
3) Write a short AviSynth script pointing to the .d2v using MPEG2Source, and open the script in VirtualDub.
4) Scrub through the footage in VirtualDub, determine the frame numbers of the sequence I want to export, and modify my AviSynth script using Trim.
5) Run the script again; I should now see just the scene I want to export all the frames of.
6) in VirtualDub, select "Export Image Sequence", and select lossless .tif files. Run it, and generate frames!
Is this correct? Did I do anything along the way that degrades the quality of the DVD's image? Is there a better way to do this?
Thank you!!
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 24 of 24
Thread
-
-
you can directly drag and drop the VOB file to virtualdub .. use [Mark in] [Mark out] to indicate the sequence ..
Last edited by sekininsha; 23rd Mar 2020 at 19:02.
責任者-MDX -
You cannot really export YV12 frames from a DVD to RGB images losslessly. There will always be a lossy YUV to RGB conversion and lossy 4:2:0 to 4:4:4 chroma upscaling.
-
tiff supports YUV and subsamping (eg. ffmpeg can export YUV image sequence) , but vdub's image sequence is RGB
Code:ffmpeg -h encoder=tiff Supported pixel formats: rgb24 rgb48le pal8 rgba rgba64le gray ya8 gray16le ya16le monob monow yuv420p yuv422p yuv440p yuv444p yuv410p yuv411p
But it depends on how you are using the image sequence, and what programs you are using
Most programs do not support YUV tiff, and will convert to RGB . And that YUV=>RGB is usually not lossless for a number of reasons. (it can be lossless, if conversion is done in float, and the recieving program can work in float)
It's usually better to use YUV video instead of image sequence, because there is a higher chance it will be handled properly -
Thank you all, this is very helpful!
From what you're saying, the step that causes the quality loss is using VirtualDub as the frame exporter. It *is* possible to export the frames losslessly as YV12 .tifs, but I need to use another method. Is that correct?
Poisondeathray, you mentioned using ffmpeg to export the frames as YV12 .tifs. Would you mind showing me an example script to do that? I'm still very new to AviSynth. -
Yes, you need another method
BUT - WHY are you doing this ? How are you going to use it ?
The compatibility issue is important. Don't expect to open the tiff in any random program. ffmpeg can read the image sequence as YV12, but most programs cannot
What is the background information ? There are probably better/ smarter ways to go about this
eg. ffmpeg
If the script output is YV12, the tiff sequence will be YV12
Code:ffmpeg -i input.avs -start_number 0 output_%06d.tiff
-
Wow, very quick response, thank you!
In that example script, "input.avs" should become my AviSynth script, correct? Do I need to modify anything else in your example? (And if I've already used Trim to specify my start and end frames, i should leave the "-start_number" as 0, yes?)
Background info: I plan to heavily rearrange the .tifs (delete some, duplicate some, change the order of some, etc etc all kinds of stuff), then use them as the individual frames of a new movie.
I don't want to lose any image or color detail, because my next step is to upscale this new movie using Topaz Video Enhance AI. I want that upscaler to have as much unaltered image data as possible to work with.
(I'm testing the upscaling software on various weird situations, which is why I need the freedom to rearrange the frames willy-nilly. And why I'm not just using AviSynth to, say, slow down scenes or reverse scenes or whatnot. I'm sure it sounds odd, but it makes sense in my head.)
Next step: I need to find an image viewer that will open VY12 .tifs, I guess! -
If you want the frame numbers to start with a different number, then enter that number
Background info: I plan to heavily rearrange the .tifs (delete some, duplicate some, change the order of some, etc etc all kinds of stuff), then use them as the individual frames of a new movie.
or a video editor ?
I don't want to lose any image or color detail, because my next step is to upscale this new movie using Topaz Video Enhance AI. I want that upscaler to have as much unaltered image data as possible to work with.
(I'm testing the upscaling software on various weird situations, which is why I need the freedom to rearrange the frames willy-nilly. And why I'm not just using AviSynth to, say, slow down scenes or reverse scenes or whatnot. I'm sure it sounds odd, but it makes sense in my head.)
But you're going to have to convert to RGB at some point if the goal is to use Topaz
EDIT: actually the video version (Video Enhance AI) can accept YUV video directly (you don't need image sequence) . Only the original GigaPixel AI requires images (and that has to be RGB)Last edited by poisondeathray; 23rd Mar 2020 at 15:31.
-
Thanks, poisondeathray!
I did a little reading of these forums before I posted. I've seen lots of threads where a new member asks about a project, and longtime members ask followup questions and explain that there's a better/simpler way to achieve the goal. The newbie sometimes sputters "but but my way, but I wannnna", the longtime members roll their eyes, and the thread dies. I don't want to be that guy.
But here I go anyway! Why export & rearrange the frames? Because I'm not very good/practiced at AviSynth or non-linear editing...because I'm sheltering-in-place and I think it will be fun...and because I wannnnna.
EDIT: actually the video version (Video Enhance AI) can accept YUV video directly (you don't need image sequence) . Only the original GigaPixel AI requires images (and that has to be RGB)
Setting aside all this chat about frame exporting -- what would you say is the "best" (most lossless) way to prep a DVD's files for upscaling using Video Enhance AI? -
DVD can only be YUV (all DVD's are YUV)
But it also depends on what your DVD video is specifically. eg. is it interlaced ?
Interlace is going to be a problem, and if it has pulldown you probably want to remove the pulldown
(Basically , the upscaling is only going to work ideally with progressive video)
Video Enhance AI can actually import a VOB or mpg directly .
But you might want to prepare the video . Some DVD's might need cropping, some might need IVTC, etc... Maybe you want to prefilter. AI upscalers tend to do poorly with noise . -
For the purposes of this hypothetical, let's assume that the DVD reads as 100% film in DGIndex (and I select "Force Film" anyway), so interlacing wouldn't be a worry.
In that case, Video Enhance's biggest hurdle would be noise? So I'd want to run some sort of AviSynth smoothing/denoising filter first? How would you recommend doing that, while maintaining as much image detail as possible for upscaling?
Thanks again for these quick and informative replies, by the way. This is all very helpful! -
Just try a small test and look for problems.
I don' t know how "clean" your DVD is or what needs to be done
Video Enhance is not as "strong" as other "AI" methods, but it's more stable temporally - it's more suitable for general use video. Other single image based "AI" methods - including Gigapixel - tend to give more extreme results, and are more prone to problems with noise . Temporally, the results tend to flicker and are not as stable for video
But noise is a problem in all "AI" (I'm using that term loosely; it's more neural network predictive technique) upscaling techniques, because the noise is upscaled. It can impair the results considerably. Besides weird artifacts, that's the most common complaint -
Okay, so results will vary from DVD to DVD depending on the footage -- there's no all-purpose Best Setting and I'll need to experiment. Makes sense.
Back to exporting frames: so I write an avs script pointing to the indexed .d2v file, I use Trim to indicate the frames I want, then I use ffmpeg (using your example format) to export them as tifs, correct? They'll automatically export as YV12, since that's how the frames are on the .VOB?
What software do I use to run this avs script? Should I open it in VirtualDub as before, and frames will just start appearing in a folder somewhere? Should I use a different program?
Also, can you recommend an image-viewing program that will open these YV12 tifs? -
There is no reason to use an image sequence in this scenario. You gain nothing except a lot of headache. Usually there are various pros/cons to doing something. Here it's all "cons". zero "pros"
What software do I use to run this avs script? Should I open it in VirtualDub as before, and frames will just start appearing in a folder somewhere? Should I use a different program?
Also, can you recommend an image-viewing program that will open these YV12 tifs?
But there is no reason to use YV12 tiff's here
And they get converted to RGB when you , the human, "see" something on a monitor anyways. Your display works in RGB. When you see something in say, ffplay's viewer, it's an RGB converted representation of the original YV12 data. You're not viewing the original data directly
I think you're better off using the original format, which is MPEG2. (Every dvd is MPEG2 4:2:0). That's the original data, original compression tooLast edited by poisondeathray; 23rd Mar 2020 at 19:02.
-
And I'm rather surprised that Video Enhance actually accepts a YV12 tiff sequence... but it does
-
Ah! So ffmpeg isn't a plugin, it's a piece of software like VirtualDub that can run AviSynth scripts. Thank you, clearly I was confused about that!
I feel like I'm approaching "that guy"/"but I wannna" territory, so I won't keep pressing this issue. Mainly I'm simply not confident in my ability to edit the footage properly in AviSynth or a NLE, and feel like it would be "easier"/less frustrating to just rearrange all the frames manually.
I think you're better off using the original format, which is MPEG2. (Every dvd is MPEG2 4:2:0). That's the original data, original compression too -
ffmpeg.exe is a standalone commandline binary, but the commonly distributed windows binaries are usually compiled with avisynth support.
I feel like I'm approaching "that guy"/"but I wannna" territory, so I won't keep pressing this issue. Mainly I'm simply not confident in my ability to edit the footage properly in AviSynth or a NLE, and feel like it would be "easier"/less frustrating to just rearrange all the frames manually.
But how are you going to re-arrange them manually ? What is your process? Are you going to rename individual image files one by one ? Anything other than something very simple is going to be tedious
For most people, having it all laid out in a NLE is going to be waaaayyyyy easier (!) That's what is there for. You can "see" what you're doing
I think you're better off using the original format, which is MPEG2. (Every dvd is MPEG2 4:2:0). That's the original data, original compression too
I mean you can open the vob or mpeg2 directly in Video Enhance. But if your goal was individual images that you can reorder manually, it won't make a difference.
The point about the original compression is you can never get it back. "Lossless" means decoded from MPEG2 to uncompressed data. That will be the same. But it will be much larger in filesize than the original MPEG2 compressed frames. If you use lossless compression it will still be much larger. But it doesn't matter really, because your goal is to upscale and you have to re-encode anyways.
If it was me, I would do the edits in an actual editor (or avisynth if the edits were simple), and prefilter too . You can export a lossless YV12 video, such as using ut video codec, and it will accept that too.
Have you tried this yet ? I think you will not be impressed. You almost always have to do some massaging to get decent results. Don't concentrate so much on the "original data" in this scenario - you almost always have to denoise or alter it to get better results from a DVD source. The fact is DVD's are rarely very clean. The "original data" includes all the noise artifacts which get enhanced. Just try it on a short segment.
The problem with this approach is the training uses a bunch of generic sources. The results are not as good as if you trained on specific sources related to your specific input video -
ffmpeg.exe is a standalone commandline binary
What is your process? Are you going to rename individual image files one by one ? Anything other than something very simple is going to be tedious
You make a good point that I'm going to have to change to RGB at some point anyway, even if it's my monitor doing the work at the very end.
Speaking of... I took another look at DGIndex's settings, and under the Video menu I saw this:
YUV -> RGB: PC Scale / TV Scale
I have to select one of those two; I can't say "neither." Does this mean that DGIndex is changing the colorspace from YUV to RGB as it indexes the VOB? -
Thanks. In that case, where in this process of "rip DVD -> denoise/smooth/whatever -> import into upscaler -> save result" would you suggest switching from YUV to RGB colorspace -- and how best to do it?
-
It's not going to make a big difference to the end result . You can do it yourself beforehand or let it convert YUV to RGB. There are slightly different types of algorithms you can use for the chroma resizing(upscaling) from 4:2:0 to 4:4:4 and RGB. Some might give you slightly better results, some slightly worse.
You might want to correct for AR beforehand ; DVD's don't use "square pixel" . Although it has presets for things like 1920x1080 , that won't work for some types of DVD sources (4:3) , or ones that need to be cropped. That goes into the prep work. So you'd typically use 200%, or 400% then process it afterwards for the final format -
You can do it yourself beforehand or let it convert YUV to RGB.
You might want to correct for AR beforehand ; DVD's don't use "square pixel"
Circling back to my first post: I need a replacement for MacTheRipper. (I'm switching over to PCs to better use AviSynth.) Is there a current "best"/most accurate program for ripping .VOBs from DVDs? Or any recommendations of favorites?
Thanks as always! -
There is one possible way you can avoid YUV to RGB conversion until after upscaling: upscale the three channels (Y, U, V) as greyscale, separately, then join them back together at the end. It would be interesting to compare the results with the regular RGB process. My guess is there will be little difference making the extra work not worth it.
NTSC DVD is always 720x480 (the other legal frame sizes, 704x480, 352x480, 352x240, are hardly ever used on commercial DVDs). That's a frame aspect ratio of 3:2. But the display aspect ratio is always either 4:3 or 16:9. The player resizes the frame on the fly to match the display aspect ratio. So the 720x480 16:9 DVD will be stretched to 1920x1080 by an upscaling DVD player. A 4:3 DVD will be stretched to 1440x1080. -
Yes, it works internally in RGB and will convert
Circling back to my first post: I need a replacement for MacTheRipper. (I'm switching over to PCs to better use AviSynth.) Is there a current "best"/most accurate program for ripping .VOBs from DVDs? Or any recommendations of favorites?
The old DVD Decrypter , DVD Shrink (set not to shrink) still work on many DVD's even today , but people also use makemkv (will put into a MKV container), anydvd ($)
Similar Threads
-
Exporting Frames from a .WSEQ File
By SteveCat in forum EditingReplies: 0Last Post: 2nd Mar 2020, 07:16 -
Losslessly Convert 2.0 to 5.1
By koberulz in forum Newbie / General discussionsReplies: 3Last Post: 5th Sep 2019, 11:05 -
is this reliable method to join m2v? / VOB losslessly through mkvtoolnix
By efc1978 in forum EditingReplies: 15Last Post: 15th Sep 2016, 21:57 -
Concatenate .264 streams losslessly
By SameSelf in forum Video ConversionReplies: 9Last Post: 7th Dec 2015, 09:27 -
Losslessly demux elementary streams
By SameSelf in forum Video ConversionReplies: 7Last Post: 20th Sep 2015, 23:49