Upscaling old DVDs to 4K (SciFi & Star Trek)

Hello anyone and everyone interested in upscaling old DVDs towards 4K resolution.

I thought I would share some thoughts, insights and ideas on the topic based on my recent project/attempts to upscale a couple of old SciFi DVDs from the Star Trek series “Deep Space Nine”.

The method could certainly be adapted to work for other material as well, so if you are interested, follow the topic/discussion and participate if you like.
Since I don’t have much time right now, I will give you all the relevant details over the course of this weekend and expand the topic from there.

Just so you get a little preview of what I mean by upscaling old DVD material to 4K and how good it “can/could” look, here a little sample (left the original DVD source, right side is 4K upscale - please be advised that cropping and pixel aspect ratio adjustments have been done, so the right image looks a bit “stretched”:

5 Likes

Thanks, looking forward to seeing your advice.

Impressive improvement.

I’m looking forward to checking out your QTGMC script! I haven’t been messing around with this nearly as long as you have but have spent long enough tweaking avisynth scripts to know there is much I can learn.

I’m working on some tooling to automate these workflows; the goal is to get to a point where i can start a batch (e.g. an entire season, whatever) and it will do all the work completely unattended. This started out as some bash scripts but my vision became loftier so I’m in the middle of writing it all as a JavaScript CLI application. I’m automating dvddecrypter (as much as possible, of course you still have to change discs), dgindex, avisynth (via ffmpeg), veia, ffmpeg to encode h.265, and finally mkvmerge to pull back in the timecodes for the VFR output. The app manages all the files involved in the workflow and pushes them through each tool in sequence.

May I ask your models and settings you choose?

I think my biggest problem so far was finding a solution that I was OK watching without noticeable video artifacts. Some methods produced some really great shots in some scenes, then in others, was terrible, so I could have really great closeups and terrible distortions in the background, or ok backgrounds and less impressive closeups.

Even the last week alone I have tested more methods than I can possible count at this point. Artemis > Gaia, Gaia to Artemis, Dione to Gaia, Dione to Artemis, Straight upscale for all three models, tweaked avisynth settings to the point I was throwing things at the wall to see what would stick.

Nothing seems to get me to a point that I am 100% happy with, so always happy to experiment with others processes just to see what happens. Interestingly, I have learnt that individual image comparisons, even short bursts, are pointless. So many times I saw something that looked good on a screenshot, but was terrible when watching back at fullscreen & full framerate on the TV.

This my best “balanced” upscale so far, with the least noticeble issues on my TV when playing back, as a short 1m clip as an example: https://www.dropbox.com/s/um55xgs6my1zm30/S01E07%20Test.mp4?dl=0

Note that this is early Voyager and there is a lot of dot crawl and rainbow artifacts in the source. This method attempts to remove those as much as possible without degrading too much - but I know for a fact that removing those filters definitely helps in a lot of the footage, but it leaves some scenes with consoles looking really, really crappy and very distracting. This was my best balance so far between those filters and output.

I am hoping as I move through the seasons, the quality upgrade in later seasons will alleviate that issue.

I know everything is subjective. If anyone wants to recreate this, let me know and I can post the full script for avisynth. The actual upscale is just using Gaia at the moment.

1 Like

Thank you for sharing your work. Looks pretty good.

I will post my stuff soon, just have to write up a few more things before uploading here.
And I totally agree, the source material (DS9 as well as VOY) is a b****, especially the early seasons (in terms of visual quality).

This. A million times this. I test my upscales of DS9 on a 43 inch 4k display from which I sit a foot and a half away. I have yet to make one episode that I am completely happy with. Please do post your script as I’m always looking for new ideas.

This is the avisynth script using at present - the good news is it can be imported direct into Topaz in teh current versions:

D2VSource("D:\Video\Voyager\S01E07 Demuxed\VTS_03_1.d2v").ConvertToYV12()

fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=2)

chroma = last.checkmate(thr=12,max=25,tthr2=25)
luma   = last.checkmate(thr=12,max=25,tthr2=0)
fixed  = luma.MergeChroma(chroma)

tfm(d2v = "D:\Video\Voyager\S01E07 Demuxed\VTS_03_1.d2v")
tdecimate(hybrid = 1, mode = 1) 

santiag()

Deblock()

pSharpen()

VagueDenoiser()
QTGMC(inputtype = 1, EZDenoise = 1.00)

Spline16Resize(640,480)

At the moment, then upscaling to 1080p using Gaia, no grain.

Ok people, this is going to be a longer post, but I will write it anyway, since I wanted to explain in detail what I am doing to upscale the DVDs (in this case Star Trek DS9) - please be advised that I am working with the PAL DVDs, so that’s the basis of my work.
The complete, “uncut” workflow/script will be available for download via link in a separate post - this is just to illustrate the general steps:

1: Use a software to extract the raw-data (uncompressed) from the DVDs

2: Use a software to extract the audio files from the raw-data you just collected in step 1

3: Use a software to modify the audio tracks towards a running speed of 23,976 FPS

4: Use a software to clean up the source material
(That includes: Derainbowing, Deinterlacing, Deblock, DeHalo, Deringing, Anti Aliasing, Sharpening, compensating for Color Banding, Frame Rate Adjustments, Cropping)

5: Use a 3-step approach utilizing Topaz VEAI
5.1: Step 1 - Input video from step 4, use Gaia HQ at 100% Deblock/Denoise at MP4 with CRF 0
5.2: Step 2 - Input video from step 5.1, use Artemis LQ at 1080p at MP4 with CRF 0
5.3: Step 3 - Input video from step 5.2, use Gaia CG at 4K at TIFF (16 bit uncompressed)

Note: You will need a total of 3 TB storage for a 45-minute episode, 6TB for a double 90-minute!!!

6: Use a software to put the images back together (create a video stream) and adjust with Color Grading (LUT), Deband, Film Grain, Sharpen, Unsharp Masking

7: Use a software to merge the now created video file with the adjusted audio files from step 3.

Done!

Don’t worry, there will be more details and samples soon.

These three steps are the part that is hard justify on a time basis. This is where it would be so fantastic to have multiple people doing individual episodes to consolidate PC time.

These three steps alone, just from what you have posted here, I already see several days worth of processing for each episode. That’s ok - the downside is the time investment to do 172 odd episodes would mean in the region of 1.5 years to do all the episodes, 24/7 assuming no other use of the PC (and I was guessing conservatively).

If each episode became a 4K masterpiece that I never wanted to touch again, it might be ok - but I don’t know what the chances of that are. Still happy to give it a go, albeit, I am starting with the NTSC source so a few steps I would probably change.

Of course everyone would need to evaluate him-/herself if that is worth pursuing, especially since there are still some bugs to work out.

I am crazy enough to try :wink:

Here is a video sample of the first six minutes of the pilot of DS9 in 4K upscaled, password to unpack is “DS9Up”:

Here you can see all comparison images (left side = PAL DVD / right side = 4K upscale) from the complete pilot of DS9, password to unpack is “DS9Up”:

And here you have to written full workflow, including all scripts and details - it’s a pdf-file, password to unpack is “DS9Up”:

Oh yeah, the password needs to be input without quotation marks, meaning: DS9Up

Thanks for that.

This example is a really good example of how hard it is to get everything “perfect” (and the Rabbit hole I keep going down). Generally speaking the scenes with people in them look great. Then you have some scenes (some of the CGI and the long distance people shots) that look very strange.

This scene:

Starts to make it look like an oil painting.

Whereas this one:

Looks pretty good.

I don’t know if I can offer any insight that might make it better… most of the time is just throwing things against the wall over and over and seeing what happens.

The detailed guide you posted is very long - I won’t be able to replicate it fully. I bought a 2TB SSD specifically to speed up encodings, and the files sizes here are immense, though I can certainly try some smaller scale clips. The only downside is that very little of the process uses programs that I typically use (my current process does not use Staxrip, DVDShrink, MeGui, MakeMKV, MKV Toolnix, or Davinci Resolve) but many of the processes here are just another way to do similar things.

You do, however, have a number of filters that I have not tried, or not used those settings on, so I am definitely interested in playing with these to see how it affects the output.

There is one thing I am confused on - and this may be simply not having used these applications - but your video input file, which from the typical PAL DVD’s is phase shifted interlaced, is being fed into Staxrip with a Progressive QTGMC script and a forced fps output (the 23.976 NTSC framerate). Usually the first thing I have to do is eliminate the faux interlacing on PAL DVD’s - what is Staxrip doing to that file exactly to eliminate it?

A couple practical observations:

  1. An SSD won’t make any difference in processing speed. The bottleneck is the CPU/GPU; I doubt there’s any single step that’s going to be limited by disk speed, unless you have to copy or move the output from a step for some reason. Even that would probably be a small fraction of the time involved in actual processing. Also don’t try to use windows explorer for clean up. Use the mac or windows command line to delete folders with 65,000 files in them!

  2. Does anyone know of a reason we should be using TIFF8/16 instead of PNG?

  • All store the images in RGB color space (vs YUV which is what the input is) so they probably aren’t lossless because of this conversion
  • None uses lossy compression
  • The input & output is 8 bits, so I don’t see why using TIFF16 would benefit

I originally I was using Tiff 16 because it seems like “the best” but the space requirements are massive compared to PNG, and as far as I know there should be no difference in the output. What would be good is if VEIA didn’t convert to RGB before writing the TIF files, but it does.

On the other hand, I do encode using h265 @ 10 bits, which I’ve always done, and that definitely can result in better output even from 8 bit sources (which is quite noticeable in very dark scenes), because it can make better choices while compressing with the extended color depth.

Generally yes - but when I took the output files that Topaz processed and reassembled them into a video, on the SSD it was averaging between 15-30x minutes to complete. When I used a standard drive, it took closer to 4x hours to reassemble.

I attempted to use my larger archive drives for this purpose as a test last week and spending closer to day finalising 4x episodes instead of an hour was a ridiculously different scenario.

Actually, I have used the SSD enough to know that there are always improvements in the workflow when using it - enough that I won’t process anything off the SSD drives anymore.

I had been using TIFF 8 for ages, and I switched to PNG recently to check and I could see no visible difference at my 1080p upscales. The space save was large enough I left it at PNG for the moment.

I haven’t used H265 very often for me personally as I stream on a NAS with a PLEX server and H265 streams cause far too many issues.

Generally yes - but when I took the output files that Topaz processed and reassembled them into a video, on the SSD it was averaging between 15-30x minutes to complete. When I used a standard drive, it took closer to 4x hours to reassemble.

Oh, maybe you have a step I don’t. (Multiple VEAI passes)? Once I have the images, the next thing I do is encode them with ffmpeg, so I would never need to reassemble them independently of the encode which already takes a day or so. If you have to basically copy a massive set of files to another massive file on the same hard drive (which is what is sounds like you had been doing) then that would be slow because of hard disk thrashing.

Yeah I don’t see any visible difference with PNG either. If I had some reason to believe that there really could be a difference that I couldn’t perceive, I’d still use TIFF, but I can’t come up with any technical reason it should be diffeerent.

For h265 - I use a plex server too - zero problems with h265, but that probably depends a lot on whether you need to transcode on the NAS, and whether it’s chipset supports h265 decoding, or whether the player can direct play, etc.