Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd October 2022, 15:21 | #21 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,435
|
Quote:
If the primary concern is "smoothness", how about retiming using optical flow or equivalent for interpolation of "in between" frames? RIFE is in avisynth now ( not just vapoursynth) and it tends to do a cleaner, better job than mvtools2 on most content. a) retiming the 1st part to 29.97p ? Smooth, no judder. b) Or if you don't like the 29.97 "look", retime 29.97p stairs section to 23.976p ? ie. leave the entire thing at 3:2 to keep the judder consistent like a normal film c) or the 59.94 "soap opera" look ? rife@29.97 https://www.mediafire.com/file/mgy52...29.97.mkv/file rife@23.976 https://www.mediafire.com/file/33qpj...3.976.mkv/file rife@59.94 https://www.mediafire.com/file/hfgt7...59.94.mkv/file Rife 4+ models allow for arbitrary framerates, but <4 can only produce powers of 2 (so you have to call them multiple times and selectevery, or use other interpolation at 2nd step) . The best model overall is 2.3 or 2.4 on most content, but models 4+ are faster and are easier to use because of the fpsnum / fpsden . Interpolation is not perfect, there can be artifacts, and you have to manually identify the sections with trim() |
|
3rd October 2022, 18:55 | #22 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,079
|
Jesus, the first season was made in literally the same year in which the first Betamax devices were released in Japan. How cutting-edge they must have thought they were being
I think any reasonable solution to this issue would require ripping the episodes from DVD, not Blu-Ray.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 3rd October 2022 at 18:58. |
3rd October 2022, 20:45 | #23 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,900
|
Quote:
https://en.wikipedia.org/wiki/Videotape#Broadcast_video The Bluray version looks better. |
|
3rd October 2022, 23:41 | #25 | Link | |
Registered User
Join Date: Aug 2016
Posts: 718
|
Quote:
It's really weird with that show Oz cause they always switched to 30fps for locations whenever there are CRT monitors in the scene. I figured it's something to do with syncing to the 60hz of the CRTs for anti flicker reasons. I seem to recall the TV broadcast versions were full framerate 1:1 interlaced cadence for those sections, but it was a long time ago. |
|
3rd October 2022, 23:57 | #26 | Link | |
Registered User
Join Date: Aug 2016
Posts: 718
|
Quote:
Last edited by flossy_cake; 4th October 2022 at 00:00. |
|
4th October 2022, 00:00 | #27 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
It's a bit contentious actually! On other forums some are saying the "remastered DVD" is still better as it doesn't have DNR and sharpening of the BD version (plus the aspect isn't squished, but they didn't notice that).
Personally I am satisfied with the BD version but only because we can unsquish the aspect. If all I had was a BD player without fine-tuning of the aspect then I probably wouldn't find it acceptable. Is your DVD the original or remastered? |
4th October 2022, 00:26 | #28 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,435
|
Quote:
Unlikely in realtime, especially not with the vulkan avs version. The cuda version in vapoursynth is significantly faster if you have a Nvidia card You can try FrameRateConverter with mvtools2 as well - that might be able to do realtime with multithreading enabled on a decent system. Many settings and has built in artifact masking, and blend fallback when artifacts are severe. Pure flow output can be called with output="flow" Quote:
Yes, you have to manually identify sections and use Trim() for differential filtering. I don't know of a way to automate that For the 23.976 version, the 1st part used TDecimate , 2nd part used model=9 Code:
o=LWLibavVideoSource("1-1-1-2 to 1-1.mkv") a=o.trim(0,274).tdecimate() o.trim(275,0) z_ConvertFormat(pixel_type="RGBPS", resample_filter="bicubic", colorspace_op="709:709:709:l=>rgb:709:709:f") rife(model=9, fps_num=24000, fps_den=1001) z_ConvertFormat(pixel_type="YV12", resample_filter="bicubic", colorspace_op="rgb:709:709:f=>709:709:709:l") b=last a+b You can try FrameRateConverter with mvtools2 as well - that should be able to do realtime with multithreading enabled on a decent system. Many settings and has built in artifact masking. Pure flow output can be called with output="flow" |
||
4th October 2022, 02:13 | #29 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
Thanks, I think I would prefer a decimate-based solution then.
I did manage to get Rife working and yeah it's definitely not real time -- I'm getting around 2-3 fps at 100% GPU load on old R9 380. Code:
rife.avs: DirectShowSource("1-1-1-2 to 1-1.mkv") z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:limited=>rgb:709:709:full") RIFE(model=9,fps_num=24000,fps_den=1001) ffmpeg -i rife.avs -c:v libx264 -preset medium -b:v 4000000 -pix_fmt yuv420p10le -profile:v high10 -r 59.940 -c:a copy result.mkv Was expecting a 23.976 output but got 59.94 @ 1:1:1:1:1:1:1:3 & 1:1 |
4th October 2022, 02:23 | #30 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,435
|
Quote:
-r 59.940 as output option in ffmpeg will add duplicates 23.976=>59.94 If you do not decimate the 1st part in the script, it will not be as smooth because rife will be interpolating from those weird duplicates Be careful with directshowsource as a source filter - it's not necessarily frame accurate and might give you weird results, especially with temporal filtering or any filter chain that requests multiple frames -c:a copy from an avs script will output uncompressed audio. Avisynth frameserves uncompressed audio and video. You'd probably want to use the original audio stream and -map arguments for each stream when using -c:a copy . Assuming the original stream map for original.mkv is stream 1 for the audio, stream 0 for the video, it would look something like this: ffmpeg -i video.avs -i original.mkv -map 0:0 -map 1:1 .... -c:a copy.... Last edited by poisondeathray; 4th October 2022 at 02:31. |
|
4th October 2022, 03:07 | #31 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
Thanks. I tried with -r 23.976 and still get a bad result for the stairs section: https://drive.google.com/file/d/1Efx...ew?usp=sharing
My previous attempt with -r 59.94 resulted in 1:1 60fps on stairs not duplicate. Anyway it's a moot point as I can't use this filter due to practical constraints. |
4th October 2022, 03:24 | #32 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,435
|
Quote:
|
|
4th October 2022, 05:45 | #33 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,900
|
Quote:
720 x (16/15) / 576 = 4:3 For an mpeg4 PAR 704 x (12/11) / 576 = 4:3 or 720 x (12/11) / 576 = 15:11 The mpeg4 PARs are the mpeg4 equivalent of the original ITU PARs derived from the standard for digitising analogue video. They're almost the same as ITU but easier to remember and work with because they only result in two DARs for both NTSC and PAL DVDs, 20:11 and 15:11 (the mpeg4 equivalent of 16:9 and 4:3). |
|
4th October 2022, 06:10 | #34 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,900
|
Quote:
I prefer the Bluray because it's obviously been remastered for modern displays. The gamma and contrast looks better. Apparently back in the dark ages the BBC were obsessed with the picture being bright. Some of the actors on my classic Doctor Who DVDs complained about that in the commentary. The other DAR issue is the HDMI spec which says PAL and NTSC should be exactly 16:9 or 4:3, so modern players/displays resize that way. Apparently DVD players with analogue outputs tend to use ITU resizing for analogue and generic resizing for HDMI, so the DAR could be mpeg4 for the remastered DVD version and it's generally being viewed a bit squished too, so it looks the same as the Bluray. I'm not a fan of video that looks sharpened, but just based on the small sample I've seen I don't think the sharpening was too over the top. I haven't seen the remastered DVDs though, so I can't comment on those. PS I don't actually know, but I suspect the bluray was created using some sort of interpolation method rather than it being de-interlaced and re-interlaced. I have some NTSC DVDs of classic Doctor Who that were created that way. They look like standard interlaced NTSC but they don't de-interlace well. Lots of aliasing and only QTGM seemed to do a decent job. If the Bluray version was created the same way you might find it's a job for QTGMC once you get to scenes with objects with sharp edges etc, even though BWDIF seemed to do a decent job with the sample. For HD you could probably get away with speeding QTGMC up a fair bit, ie QTGMC(Preset="Medium") and it'll still do a better job than most de-interlacers. Last edited by hello_hello; 4th October 2022 at 06:29. |
|
4th October 2022, 08:42 | #35 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
Solved this with viddetect=2. The motion blur is a bit ugly but still better than the harsh stuttering without it. This opens the possibility of creating a VFR file with native rates for both cadences, if I can figure out how to do it...
|
4th October 2022, 09:45 | #36 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
Found this post by hello_hello explaining it somewhat (thanks): https://forum.doom9.org/showthread.p...53#post1783153
It sounds like applying the mkv timecode file requires re-encoding (generation loss) though -- is this correct? But other stuff I read seemed to imply the file can be remuxed into a new mkv file without having to re-encode? edit: actually no that can't be right now that I think about it since TDecimate is removing frames so as soon as you change any frame it all needs to be re-encoded. The problem is this degrades image quality (generation loss) and takes a very long time. Is it possible for avisynth to do the VFRing in real time? I'd imagine at least 1 pre-pass would be required to generate the timecode file, but then after that can avisynth take the timecode file + the original file and produce a VFR output from it in realtime? Last edited by flossy_cake; 4th October 2022 at 09:50. |
4th October 2022, 15:47 | #37 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,900
|
Not in realtime as Avisynth only supports a constant frame rate (I'm not sure about VapourSynth). Typically the CFR is the average frame rate and the timecodes are used when muxing to make it VFR, or for x264 you can add the timecodes file to the command line and encode in VFR mode (I don't use x265 so I don't know if it has a VFR mode).
|
5th October 2022, 00:02 | #38 | Link |
Registered User
Join Date: Aug 2016
Posts: 718
|
Ok cool.
I think I'll just use TDecimate to 24p in real time and live with the motion blur on the 30p->24p converted sections as they aren't very common in this show. Plus an added benefit is that the native 24p sections can be output natively at multiple of 24hz instead of baking in the 3:2 judder @ 60p. I have mixed feelings about 3:2... I suppose it's kind of interesting and charming in a way, but also a bit jarring on panning shots. My main display isn't sample-and-hold so maybe that's exacerbating it. When there's not much camera movement though it does seem to imbue a kind of dream-like feel though which I find amusing. I sort of want to watch it and pretend I'm living in a 60hz country haha For Fawlty Towers I saw that LAV Video Decoder has recently added bwdif so I might just deinterlace in realtime and save some storage space. DXVA deint is not bad also (tag file with [deint=video] in madvr) but it has this weird delay on the 1px patterns in the 576i25 clip in the OP. Thanks again for all the help and code examples, which sped up my learning a lot. Because of this thread I also discovered the AssumeFPS() function to slow PAL stuff to 24p in realtime. This is really quite amazing to me but I'm still getting used to actors' voices being low and slow after hearing them chipmunked for the last 2 decades. Last edited by flossy_cake; 5th October 2022 at 00:11. |
5th October 2022, 12:17 | #39 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,900
|
Given you use MPC-HC, have you tried ReClock? I'm still using it on XP but I assume it works for newer Windows. It'll slow PAL down to 24fps and/or pitch correct the audio without changing the video speed. I think it's 32 bit only though.
|
6th October 2022, 06:49 | #40 | Link | |
Registered User
Join Date: Aug 2016
Posts: 718
|
Quote:
Although there's a lot of AVS dll's which are 32-bit and those won't work with 64-bit MPC-HC either so maybe I need to figure something out. The AssumeFPS(24,1,true) seems to do the trick though -- it slows down both the video and audio to 24. It's not just the pitch that's wrong, it's the whole speed of dialogue, the intonation of actors speaking feels slower or something. For sitcoms it seems to make things seem... less comedic? Also have a look at this. Last edited by flossy_cake; 6th October 2022 at 07:01. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|