Correctly recode PAL 25fps dvds to standard 23.976 fps

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
leethompson
Posts: 18
Joined: Wed Sep 04, 2019 12:14 am

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by leethompson »

I've been writing a command line tool to automate this process (in Perl, calling external tools), I'm still coding (especially fringe cases) and I haven't wired in all the command line switches but I'll post it to this thread when it's ready (both in .pl form and a compiled .exe for those that don't want to install Perl.)
Palle34
Posts: 1
Joined: Sat Jun 12, 2021 8:30 am

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by Palle34 »

Hey, is it ready yet? Would love to try it out :D
danman121
Posts: 1
Joined: Wed Dec 21, 2022 12:11 pm

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by danman121 »

The OP method, for me, is too long and complicated...
For anyone interested, for converting/slowing down 25fps sources to 23.976 fps you can simply load the file in Avidemux, use the filter "Change frame rate" for both video and audio and recode it using x264 and AAC (with your favourite bitrate settings).
Much simpler and straightforward.

If you want to slow down the subtitles as well, here's how:
extract them from the original 25fps MKV;
if it's a VOBSUB file, load it in "VOBSUB Cutter" and use the "Change frame rate" setting, then export and remux it with the new (previously converted) 23.976 fps file;
if it's an SRT file, load it in "Subtitle Edit" and use the "Change frame rate" setting, then export and remux it with the new (previously converted) 23.976 fps file.

I still haven't found a way to make the chapters match... if they're absolutely essential I can spend some time editing the XML file replacing the old durations with the new ones, otherwise I just discard them...

I hope all this helps you!
drxenos
Posts: 47
Joined: Sun Mar 17, 2019 12:55 pm

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by drxenos »

I have this automated in my own scripting tools. I use ffmpeg to re-time the audio/video (with optional pitch adjust), and mvkmerge to re-time the subtitles and chapters.
ArArdin
Posts: 187
Joined: Fri Nov 20, 2020 1:40 pm

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by ArArdin »

Audio, subs and chapter syncing aside, proper PAL to NTSC video conversion would indeed not only require framerate conversion. Which for NTSC is actually 29,97 interlaced. But as most players support dvd format, 23.976 should be no problem. Staying as close to NTSC as possible, also MPEG(2) recoding into a NTSC video-resolution would be necessary.

However, PAL's framerate of 25 fps is often the sole reason players can't handle it. Where 23.976 framerate often is supported and also PAL's native video-resolution itself wouln't be a problem. So in short, many players accept a video with PAL resolution that's been slowed down to 23.976 fps.
This obviously has the benefit of not having to recode. Whilst preserving native quality, you also save the time.
Should you have such a player, I'd like to point to a pitfall, but one that can be fixed easily.

Note that setting "Default duration/FPS" to 24000/1001p in MkvToolNix only changes container presentation timestamps. The timestamps in the elementary MPEG videostream will stay unaltered though (so here, with values reflecting 25 fps video). Some players show unwanted behaviour as they're confused by these differences. Simply rewriting the videostream timecodes fixes this. Which is a lossless process; there's no recoding.
Checking "Fix bitstream timing info" in MKVToolNix would do this for you, but only AVC streams are supported here. An (older) tool that works for MPEG video is "Restream". After rewriting the timestamps, import the result in MKVToolNix and do set "Default duration/FPS" to 24000/1001p before muxing.

https://www.videohelp.com/software/Restream

danman121 wrote:
Wed Dec 21, 2022 12:28 pm
I still haven't found a way to make the chapters match...
With chapterEditor you can easily resync timestamps by framerate. It's a Swiss Army Knife for working on any kind of chapter format.

https://forum.doom9.org/showthread.php?t=169984
HStone32
Posts: 2
Joined: Sun Jun 04, 2023 6:59 pm

Re: Correctly recode PAL 25fps dvds to standard 23.976 fps

Post by HStone32 »

I realize this is an older thread, but I've found it invaluable thus far. As others have mentioned, I am also working on a shell script to automate this whole process. There's a few kinks I need to work out first. To be specific, I need a way of getting the video duration printed out in plain text to the CLI output stream. In the OP, we are told to find this number out by using the 'info tool' tab on MKVToolnix. Is doing this analogous to a shell command? If so, does anyone know which one? It doesn't need to be just that one line, I can use regex to sort it out later.
Post Reply