PAL to NTSC exact speed conversion

Some preset which would convert NTSC 23,976fps to PAL 25fps with out averaging the speed change to get smooth FPS. Like VirtualDub has. It allows me to set PAL Video speed from 25 to 24000/1001 and get the exact NTSC speed.

Hi, dududas! :slightly_smiling_face:

I actually had made requests about this a couple of times before. Here was the second request I made:

Dan kindly added more decimal points to the speed control in the Properties tab after each time I requested it. So it went from just 2 decimal points to now 6. After experimenting A LOT, I came to the speed change of 0.95902 to convert PAL to NTSC speed. Please try it and see how it comes out for you.

Based on audio, the conversion comes out right. The only issue is that the frame rate for video will vary by a frame or two every now and then. I’ve done comparisons with video that were sold in PAL and an identical one sold in NTSC. Sometimes the frames will match up but every now and then they will be off by one or two in the converted video then match up later but then down the line be off by a frame or two again. I don’t know if this is normal when converting a 25fps source to slow down to an NTSC frame rate such as 29fps or 23fps. Or maybe the issue could be that more decimal points are needed to get the frames to match up perfectly. However, Dan in the thread above said there was a bug with the spinner control. That thread is a year old so I don’t know if the issue has been fixed or if it still exists. @shotcut, any updates on that?

I should note that the issue with the video is not noticeable at all unless you are actually comparing the frames between a video that you converted with one that was commercially converted to PAL. Also, for me this is all in SD because they the PAL videos I have are from DVDs so I didn’t convert them to NTSC 23.976 but instead aiming for NTSC 29.97.

@Austin, would you happen to have any knowledge in this area?

I would prefer to be able to change the FPS instead of giving a specific percentage, 24000/1001 would give you the exact fps you need. Since it is an never ending number for 23,97602…

I think you can use ffmpeg. This is not the intended goal of Properties > Speed.

So no chance of adding this in the future? Because it would be really handy.

I would think Shotcut already does this, unless I’m not understanding the problem or the request.

Suppose we have an NTSC video at 24000/1001 and we want to convert to PAL 25fps.

If we created a new project using the “HD 1080i 25fps” video mode and dropped the NTSC video onto the timeline, Shotcut will duplicate frames as necessary to get to 25fps. Same thing if going PAL to NTSC except it will discard frames as necessary. And yes, Shotcut uses the actual 24000/1001 in the video mode rather than the decimal estimate.

The video mode can be changed from the menu bar: Settings > Video Mode > [long list of choices]. This applies to new projects. I don’t think it changes an existing project. I think you have to manually edit the top line of the MLT XML project file to change fps after the fact.

Is that sufficient? The only way I’m aware to get a smoother transition between frame rates would be some kind of optical flow interpolation, but there’s a chance that could really mess up some edges. If you were converting between different forms of NTSC, we could maybe do some inverse telecine stuff, but PAL puts things in a whole different ballpark.

It’s not about giving percentages. I don’t know if you read the thread but as I said the result was more decimal points were added to the speed control and you can get PAL converted to NTSC speed with the option in Properties. The frames per second depends on what you choose it to be. It’s slowing down the speed that’s the issue not the frames per second.

@shotcut, is the bug with the spinner control still there?

The issue is the speed. PAL video runs faster than NTSC video. If you all do is pick a project to have fps like 29.97 and drop a PAL video in there, Shotcut is not going to adjust the speed automatically. The fps will change but not the speed. You have to actually slow down the speed of the video and audio accordingly to do an actual PAL to NTSC conversion.

But I want it to speed up to 25fps, not duplicate.

I don’t understand the request, and the concepts above don’t sound right, so maybe I’m missing what you’re trying to do.

If you were to play back the original NTSC and the transcoded PAL versions at the same time, are you wanting them to play back in sync with each other and end at the same time? Or are you wanting one video to reach the end sooner than the other one?

“Speed up NTSC to 25fps without duplication” doesn’t make sense at a technical level and would cause the video to finish 4.1% faster than it should. PAL is not faster than 24000/1001 NTSC. PAL has more frames per second than NTSC. But one second of elapsed time is always one second of elapsed time in either format, and Shotcut manages A/V sync by elapsed time, not frames. Said a different way… If you don’t duplicate frames to pad the difference in frame rates between formats, then you accidentally speed up time itself and the “sped up” NTSC video will finish faster than a properly encoded PAL video.

@DRM, has changing a PAL clip speed to 0.95902 worked well for you? I don’t understand how that math would work. If the PAL clip has its speed changed to 0.95902, then the exported video would finish in 95.9% of the time of the original PAL video. The video would also finish ahead of the audio track. Shotcut does not have a way to slow down audio without causing a pitch shift in the process (to my knowledge). This is why Dan said that the speed property is not intended for this purpose.

@dududas, I guess we need you to clarify what you’re looking for. Shotcut already makes automatic adjustments between formats. This is one of its killer features.

Let’s use a different example to clarify the difference between “speed” and “frames per second” because the terms are causing confusion.

Let’s say somebody has a 25fps PAL DVD that they are playing on a computer monitor. The refresh rate of the monitor is 60 Hz (or higher) even in Europe, not 50 Hz or 25 Hz. How is 25fps video played on a computer monitor with a 60 Hz refresh rate? Somewhere between the media player, video card driver, and graphics card hardware, the 25fps video is getting its frames duplicated to pad the frame rate up to 60fps to match the monitor. The usual way of accomplishing this is to duplicate every fifth frame to turn 25fps into 30fps, then duplicate every frame to turn 30fps into 60fps.

Shotcut does this same process if you drop a 25fps PAL video onto a 60fps NTSC timeline.

Shotcut will duplicate or discard frames as necessary to make the source video play using the timeline’s frame rate. Always remember that A/V sync happens by elapsed time, not by frames. One of Shotcut’s killer features is the ability to take videos from all over the world and from all kinds of different cameras and drop them all onto the same timeline without any pre-processing and the playback just works regardless of mixed frame rates.

Shotcut is able to do this because it measures everything in time (as in “seconds”) rather than measuring things in frames. For instance, if we are three seconds into a movie, Shotcut will look up frame index 75 in a PAL 25fps video but will look up frame index 180 in a 60fps MP4. And they will be in sync because those frames both represent what was happening three seconds into the movie.

This is why duplication is required. If exporting as 60fps but the input is 25fps, and we get three seconds into the export, how else do we produce 180 frames of export when the input only has 75 frames to offer for the first three seconds? We have to duplicate some of those 75 to get the frame count up to 180. Shotcut does this implicitly to source videos in order to make them match the frame rate of the timeline.

Give it a try and see if you like it. I’m pretty sure it will do what you want with minimum fuss.

At the same time.

No, it would slow it down not speed it up. To speed it up you would have to go beyond 1.000000. Inputting below 1.000000 slows the video down. In my tests, 0.95902 is the best result I got to slow down PAL so that it can match NTSC speed with the slight issue of the video frames sometimes being one or two frames off every now and then compared to an equivalent NTSC video which again I don’t know if that is just normal part of the conversion or if there is a way to remedy that. Perhaps more decimal points for more precise control could be the trick but then there was the issue of the spinner control mentioned earlier.

But the audio totally matches NTSC speed on point from what I have experienced. I don’t notice an issue with audio pitch. Isn’t that really only an issue if the audio is being sped up not slowed down?

PAL runs approximately 4% faster than NTSC which means faster than it should go overall. If you compare any VHS or DVD release of any movie and compare the running times to the releases in countries where PAL was used (e.g. Europe) with those countries where NTSC is used (e.g. the Americas), you would notice that the running times in the PAL releases were always shorter. It’s not because they cut out footage but because PAL ran 4% faster.

To give an example, here is a link to the British Board of Film Classification’s page on Star Wars The Phantom Menace. Click on “Feature” and it will list all of the entries for the film that was submitted to get approval from the BBFC. If you scroll all the way down you will see a listing for “Film” and the other for “Video”. The “Film” is what was released theatrically and the BBFC lists that running time at 132m 43s. Then right above it at “Video” it lists a running time of 127m 24s. That’s for the home video release (i.e. VHS and DVD). European home video releases use PAL and because PAL is around 4% faster than NTSC the running time for the video listing is shorter than the film listing.

I wanna mux an PAL audio track with NTSC Video. The movie is in 23,976fps but the German audio track I plan on using is being used with 25fps video and is faster than the NTSC video source. So I plan on speeding up the 23,976fps video to 25fps.

Why not convert the audio to match the video? After all, PAL is sped up and not the accurate running time.

Because it sounds wrong for us Europeans, the pitch is just too low of the voices.