Deinterlacing/detelecining Star Trek episodes

Greetings all!
I’m not entirely sure, where to put this topic, but this category seems the most fitting.

I recently got the whole nine yards of Star Trek DVDs for cheap and I want to re-encode them to x265, so that I can watch them in Plex and they do not take up a huge amount of space.
The encoding works great. However the detelecining/deinterlacing/deblocking is not my friend in this case. It seems, that some scenes are shot progressively, while others are shot interlaced and so on.
I have to admit, that I do not have that much knowledge of how the whole deinterlacing/detelecining works. In fact, I can’t even differentiate the two in most cases.
When googling I find many articles, where people state, that from a modern perspective the older Star Trek episodes are basically a visual nightmare and cannot be fully visually healed. But I have hope.

Is there somebody here, that has maybe done it and can share some tips? It would mean the world to me.

Cheers!

interesting

Friend of mine encoded some for me not so long ago, and somehow it seemed to fix the problems when he upscaled them to 1080p. I have no clue as to how it should’ve solved the problem, but it did.

1 Like

Sounds good! Do you know how he upscaled the files?

I can ask him next time we talk. He’s an avid windows user, so I would assume he’s using some of the better known programs for this. He’s been doing these things for at least 20 years, he might have a guide laying around.

1 Like

If I had to take a stab in the dark I’d say handbrake

1 Like

That would be awesome! Thank you very much in advance!

Yeah, he’s mentioned handbrake

2 Likes

Probably using Topaz Video Enhance AI for upscaling, that’s what I am using and many others seem to be as well.

For your video deinterlacing/detelecining issues I can help you with handbrake to get acceptable results.

Assuming you have ripped the discs with makemkv

load the files into handbrake
In the video tab:
Set it to mkv, h265 10bit, cbr (constant frame rate), same as source as the frame rate; unless you know it needs to be set to a specific frame rate, set the encode speed to slow. You can use the RF value, or set a specific bit rate.

In the Filters tab:
set detelecine to default, set deinterlace to bob, interlace detection to default.
The denoise is where your time will be eaten if you apply a filter. If you want to clean the source of some film grain set it to NLmeans medium grain and you will retain quality and remove film grain. If you want to retain film grain and details, on the video tab set the encoder tune to grain.

Denoising is very resource intensive!! You may need to play around with filters if you start using them to find the best fit for your source material.

Make sure you check the dimensions tab to be sure handbrake isn’t automagically over-cropping.

check your audio and subs to see if they importing correctly, and if you are encoding them they way you want.

I’m not saying these are the best possible settings, but ti will get you started. If you want to fine tune things you might need to read handbrake docs to add extra arguments etc.

2 Likes

Very interesting to read, thanks!
I knew, that there are guys out there, remastering and upscaling the older shows, but I did not know there is actually documentation for this. Thanks!

Thanks for your input!

I already did try to work out the issues with handbrake, but I always had some scenes with stuttering. What I didn’t try and what I will do next, is use a variable framerate, since those older episodes are alternating between different framerates. At least that what it seems. Maybe that helps.

Quick question: Why would you set it to 10Bit depth? Correct me, if I am wrong, but MPEG-2 is just 8Bit, right?

Denoising is not a thing for me. I actually want the end result to look as much as the source as possible. That’s why I’m already using the grain tune option.

I’ll give Handbrake another try. I begun experimenting with the different video filters in ffmpeg and if it yields better results I have no problem crawling around the command line further (I’m a Linux and FreeBSD sysadmin, so that’s what I do most of the time anyway).

Anyway, thanks again for your tips, I will definitely look into them.
Cheers!

10 bit helps reduce banding when compressing, especially if reducing the video bitstream to cut down on overall file size.

If you do not care about storage size you can keep them as 8bit, and aim for larger files, it is all a matter of how you want to store them.

Seeing as you can CLI, maybe look into hybrid, staxrip or other AVI scripted frontends so you will be able to use QTGMC interlace filters etc. Fair warning, you need to understand video to grok these tools.

ETA: Another thing you can try if you find stuttering on playback when deinterlacing; double the framerate. So, 29.97 becomes 59.94. use the same suggested general settings for handbrake. In short this will assist the bob filter when deinterlacing/deteleceing, but it’s not a guaranteed solution, and might introduce that weird soap opera effect on some sources.

2nd edit: Get media info to check the state of the file before transcoding. It will tell you frame rate, whether it is variable, or constant, progressive, interlaced, or interleaved etc.

1 Like

Asked him today, he’s using ripbot for scaling. Also said that latest version of dvdfab was worth checking out

2 Likes

There’s some screen shake effects that were done in the Avid editor at the output framerate of 59.94i. These cases, you discard fields for your telecine rather than reconstruct the telecine pattern. It will not line up if you telecine keeping both fields if you encounter these NLE made effects.

Early Voyager ran the CG at 30fps rather than 24. For this, either discard one field or process that shot as PsF (both fields yield a progressive image)

For Voyager and DS9, you need to encode variable frame rate with 2 constant frame rates: 23.976 for only telecine from the negatives, and 29.97 for early Voyager and some DS9 CG. The credits also run at 59.94i, so you need to discard one field.

You will also need to do 3D Y/C noise reduction for older seasons as Component or DigiBeta didn’t exist back then.

2 Likes

Also, since the pandemic has everyone working from home, this is the PERFECT time to clean up all the negatives of DS9 and Voyager as a pandemic job, then assembling the episodes and remaking the CG because they can’t make more Picard or Discovery right now. Pre-pandemic, there just wouldn’t have had the resources to ever do it. But with people needing work from home, this can hire a ton of digital artists and post production people.

1 Like

Fellow trekkie here.

Interleaced video… blast from the past,… but if you want to go down that route, and not get the files that someone has already fixed up for you… a long time ago there was this thing called tomsmocomp that worked with .avs files and avisynth on Windows.

It was sort of like the best thing that I’ve seen ever for deinterlacing because it was trying to reconstruct/detect what moved and by how much between frames,not just blindly apply some trivial mathematical filter based on some statistical values. There’s possibly other motion compensation based deinterlacers out there these days… or maybe not.

Telecine/detelecine process is a dumb way of mapping progressive original video onto interlaces half frames and back Because the original is progressive and how frames are mapped is pretty dumb and depends on the frame rates that need matching, it’s easily detectible and reversible.

Are doom9 forums still a thing?

2 Likes

That’s very interesting, I did not know that. I will certainly experiment with that.

I have no problem with learning about how video works. Can you recommend some sources, which convey the necessary knowledge?

I have seen the program AVIsynth mentioned many times. Can somebody shed some light on it, as I am not fermilliar with it?

As I am open to every suggestion, thank you. I will certainly add it to the list of things to try, when I have the time again.

I will reply to the rest of the posts in the next days. Sorry for me being absent very often currently.

Anyway, thanks for your insight!

a good starting place would be https://forum.doom9.org/

Lots of guides and helpful people doing the same sort of work there

1 Like

Thanks again. I will dig into the forum.