This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] "Real" PAL<>NTSC framerate conversion with speed changing?
#1
Hi, I'm new here!

I was looking for a tool to convert video files from PAL (25 FPS) to NTSC (23.97) and vice versa, and eventually, I got referred to here. I find it hard to explain what exactly I am looking for. I am looking for a way to do "real" framerate conversion, without (extra) frames added or deleted. The original total number of frames should stay the same, and since the amount of frames that can play in one second changes, the speed of both video and audio should increase or decrease, depending on the conversion.

I sadly haven't found such a tool so far. There's MeGUI, but I only got it to work for audio. If I import a video file, only the audio speed will change, causing the video and audio of the result not to be synced correctly.

I hope someone can help me out here. Smile
Reply
#2
From what I understand:
What you want is a 'speed change' not a PAL<>NTSC conversion. You want to speed up / slow down the audio and change the playback frame rate of the video. Smile

Note: I assume the source:
  • is cfr and not vfr
  • progressive, not telecine or interlaced

Haven't done this in years, but here is how this should be done:

25 -> 23.976:
  • load source
  • With video encoding:
    • set 'Base->Processing->Video' to 'the encoder of your choice' (configure the encoder in the corresponding tab)
    • enable 'Filtering->Speed Change->Change Speed'
    • set 'Filtering->Speed Change->Change Speed' to '23.976 fps'
  • Without video encoding:
    • set 'Base->Processing'->Video to 'passthrough'
    • enable 'Muxing->Overwrite->Frame rate'
    • set 'Muxing->Overwrite->Frame rate' to '23.976'
  • set 'Base->Processing->Audio' to 'custom'
  • enable 'Audio->Base->Audio Encoding Options'
  • configure your target format inside the 'Audio->Base->Audio Encoding Options->Encoder'-tab
  • enable 'Audio->Base->Audio Encoding Options->Filtering->Speed change'
  • set 'Audio->Base->Audio Encoding Options->Filtering->Speed change' to 'from 25.000 to 23.976' and depending on your liking enable 'adjust pitch'
  • add the current audio settings for the current audio track to the AudioQueue (Audio->Base->Add current)
  • set output file (Base->Output file)
  • add current settings to the job queue (Base->Add to queue)
  • start the job queue (Jobs->Queue->start)
23.976 -> 25:
Same as '25->23.976', but you need to replace '23.976' with '25.000' and '25.000' with '23.976'.

Cu Selur

Ps.: Both of these should be possible through mkvtoolnix by just adjusting the timecodes of the audio&video streams. Downside of this is a. target needs to be mkv b. no audio pitch control.
Reply
#3
Thanks for your fast reply!

I'm not sure we're on the same page. I don't want a speed-change. I want to convert PAL to NTSC and vice versa in a way it will cause the video to change in speed, as more or less frames should be played in 1 second. I don't want to affect the total number of frames.

You see, a converter, asked to convert 25 fps to 24 fps (actually 23.97.. fps, can do one of the following:
  1. Throw away a one frame every second.
  2. Keep all frames, making the clip like 4.3% (I think) longer.
It's the second thing I'm looking for. I'm not sure we're talking about the same thing here. I'm also not sure if "23.976" isn't precisely enough. There might be more decimals after it.

(17.07.2018, 05:25)Selur Wrote: Note: I assume the source:
  • is cfr and not vfr
  • progressive, not telecine or interlaced

I have to admit these terms go beyond my knowledge of video encoding (if that's the right word even).
Reply
#4
Quote:I'm not sure we're on the same page. I don't want a speed-change. I want to convert PAL to NTSC and vice versa in a way it will cause the video to change in speed, as more or less frames should be played in 1 second. I don't want to affect the total number of frames.
...
Keep all frames, making the clip like 4.3% (I think) longer.

It's the second thing I'm looking for.
this is done by changing how many frames are shown during a second -> so a speed change Smile
By changing the playback speed (= the time each frame is shown) the frame count isn't changed and thus the total playback length changes. Smile
Quote:There might be more decimals after it.
"23.976" is internally converted to 24000/1001.
Quote:I have to admit these terms go beyond my knowledge of video encoding (if that's the right word even).
cfr = constant frame rate (usually anything that is broadcasted or from a physical media)
vfr = variable frame rate (mobile camera captures and some anime encodes from scene groups)

Cu Selur
Reply
#5
Quote:This is done by changing how many frames are shown during a second -> so a speed change Smile

By changing the playback speed (= the time each frame is shown) the frame count isn't changed and thus the total playback length changes. Smile
Oooh, right. I didn't realise that's what playback speed is. Yes, I think we get each other now. Big Grin

Quote:From what I understand:
What you want is a 'speed change' not a PAL<>NTSC conversion. You want to speed up / slow down the audio and change the playback frame rate of the video. Smile

However, if the thing I want is a "speed change", then what is a "PAL<>NTSC conversion" to you?

Also thanks for explaining cfr and vfr.

Quote:Note: I assume the source:
  • is cfr and not vfr
  • progressive, not telecine or interlaced

I'm not sure it's the same things, but MPC-HC says that the "frame rate mode" is constant. The scan type is progressive.

Quote:Haven't done this in years, but here is how this should be done:

25 -> 23.976:
  1. load source
  2. With video encoding:
    • set 'Base->Processing->Video' to 'the encoder of your choice' (configure the encoder in the corresponding tab)
    • enable 'Filtering->Speed Change->Change Speed'
    • set 'Filtering->Speed Change->Change Speed' to '23.976 fps'
  3. Without video encoding:
    • set 'Base->Processing'->Video to 'passthrough'
    • enable 'Muxing->Overwrite->Frame rate'
    • set 'Muxing->Overwrite->Frame rate' to '23.976'
  4. set 'Base->Processing->Audio' to 'custom'
  5. enable 'Audio->Base->Audio Encoding Options'
  6. configure your target format inside the 'Audio->Base->Audio Encoding Options->Encoder'-tab
  7. enable 'Audio->Base->Audio Encoding Options->Filtering->Speed change'
  8. set 'Audio->Base->Audio Encoding Options->Filtering->Speed change' to 'from 25.000 to 23.976' and depending on your liking enable 'adjust pitch'
  9. add the current audio settings for the current audio track to the AudioQueue (Audio->Base->Add current)
  10. set output file (Base->Output file)
  11. add current settings to the job queue (Base->Add to queue)
  12. start the job queue (Jobs->Queue->start)
23.976 -> 25:
Same as '25->23.976', but you need to replace '23.976' with '25.000' and '25.000' with '23.976'.

Could you tell me a bit more about step 2? I was first going to try "With video encoding", but I didn't know what encoder to choose. The video formats I'm currently working with are "MPEG4" and "MPEG4 (H264)" - according to MPC-HC (and my limited knowledge of how to read video file info).
I can't find those in the list, so I guess I'll just go with passthrough then? I'd like the output to be as mostly the same as possible, without quality loss. Smile

As to step 6, I just went with the settings that corresponded with the input.

As to step 8, I expected the "adjust pitch" option to do the opposite than it actually does. I'd say such an option should restore the original pitch, but instead, it makes sure the audio gets slowed down and the original pitch won't be restored. MeGUI has this option too, and I think the way it works is the opposite there.

O, btw, there's a problem I didn't mention earlier. The 23.976 videos I'm using are ripped from an American DVD that uses framerate 29.970. I'm not sure why this is. By having done some experiments between rips from the American release and the European one, I can say for sure the videos were originally slowed down from 25 to 23.976. I suppose it was converted to 29.970 after that for some reason. It's the way of framerate conversion where frames are duplicated, so the speed won't change. I wonder why they didn't just convert 25fps to 29.970fps directly, so there wouldn't have to be a speed change at all. Anyway, I'm not sure what to do. Can I just set the setting in step 3 to 25.000? Or do I have to do something else? Should I change the input framerate somehow?
Reply
#6
Quote:However, if the thing I want is a "speed change", then what is a "PAL<>NTSC conversion" to you?
A PAL<>NTSC conversion in general often includes way more stuff since PAL is not always progressive but can be interlaced and NTSC is normally either interlaced or more often telecined content. Also a PAL<>NTSC conversion normally also includes an image resizing since typically NTSC&PAL use different resolutions.
-> a speed change is just a really special case which can be used to do a PAL<>NTSC conversion. Smile

Quote:"frame rate mode" is constant. The scan type is progressive.
That makes things way easier. Smile

Quote:Could you tell me a bit more about step 2? I was first going to try "With video encoding", but I didn't know what encoder to choose. The video formats I'm currently working with are "MPEG4" and "MPEG4 (H264)" - according to MPC-HC (and my limited knowledge of how to read video file info).
I can't find those in the list, so I guess I'll just go with passthrough then? I'd like the output to be as mostly the same as possible, without quality loss.
MPEG-4 is probably MPEG-4 ASP which can be produced by Xvid, MPEG-4 AVC aka. H.264 can be produced by for example x264.
-> Since you want to avoid quality loss stick with 'passthrough'.

Quote:As to step 6, I just went with the settings that corresponded with the input.
Then you need to adjust the reencoding setting ins the 'Audio->Base->Audio Encoding Options->Encoder' accordingly.

Quote:As to step 8, I expected the "adjust pitch" option to do the opposite than it actually does. I'd say such an option should restore the original pitch, but instead, it makes sure the audio gets slowed down and the original pitch won't be restored. MeGUI has this option too, and I think the way it works is the opposite there.
Hybrid uses SOX for the audio filtering and the naming is taken from sox.

Quote:O, btw, there's a problem I didn't mention earlier. The 23.976 videos I'm using are ripped from an American DVD that uses framerate 29.970. I'm not sure why this is.
And here is where things get more complicated.
If the content is straight from the DVD it was probably telecined. (You should read up on telecine (3:2 pulldown) to understand what most Material on NTSC DVDs is saved as.)

Quote:By having done some experiments between rips from the American release and the European one, I can say for sure the videos were originally slowed down from 25 to 23.976. I suppose it was converted to 29.970 after that for some reason.
For the US market. 23.976 (progressive) -> 29.97 (progressive + pulldown) is what telecine is for. Smile
Starting with telecined content some morons use a deinterlacer to convert from 29.97 (progressive + pulldown) to 29.97 progressive when they should have used an inverse telecine method to convert from 29.97 (progressive + pulldown) to 23.976 (progressive). Or the original content might have been a mix of progressive, interlaced and telecined content,... This is where things can get more and more complicated. Smile

Quote:It's the way of framerate conversion where frames are duplicated, so the speed won't change. I wonder why they didn't just convert 25fps to 29.970fps directly, so there wouldn't have to be a speed change at all. Anyway, I'm not sure what to do. Can I just set the setting in step 3 to 25.000? Or do I have to do something else? Should I change the input framerate somehow?
You got two solutions (without spending hours of analyzing the content):
a. keep all frames and to a speed change from 29.97 to 25, downside of this is that the pitch adjustment to the audio might be more noticeable due to the greater change.
b. reencode the content and throw out unneeded frames (by using Filtering->Avisynth->Restore->sRestore or Filtering->Vapoursynth->Other->Retstore->sRestore).
Upside of this is that lots of unneeded frames will be removed. Downside is this will require a video reencode which always includes a quality loss (unless lossless encoding is used which would let the file size explode).

-> there are other/better methods which require a lot of knowledge and understanding of the two formats, but the above two are probably the best you can do without having to spend lots of time. Smile

Cu Selur
Reply
#7
(18.07.2018, 05:29)Selur Wrote: For the US market. 23.976 (progressive) -> 29.97 (progressive + pulldown) is what telecine is for. Smile
Starting with telecined content some morons use a deinterlacer to convert from 29.97 (progressive + pulldown) to 29.97 progressive when they should have used an inverse telecine method to convert from 29.97 (progressive + pulldown) to 23.976 (progressive). Or the original content might have been a mix of progressive, interlaced and telecined content,... This is where things can get more and more complicated. Smile

You got two solutions (without spending hours of analyzing the content):
a. keep all frames and to a speed change from 29.97 to 25, downside of this is that the pitch adjustment to the audio might be more noticeable due to the greater change.
b. reencode the content and throw out unneeded frames (by using Filtering->Avisynth->Restore->sRestore or Filtering->Vapoursynth->Other->Retstore->sRestore).
Upside of this is that lots of unneeded frames will be removed. Downside is this will require a video reencode which always includes a quality loss (unless lossless encoding is used which would let the file size explode).

-> there are other/better methods which require a lot of knowledge and understanding of the two formats, but the above two are probably the best you can do without having to spend lots of time. Smile

O my god..  Huh

I've been googling a bit for methods to "inverse telecine progressive and pulldown to progressive" but no luck. It indeed seems pretty very complicated. What a shame. I expected it would just be a matter of converting 29.97 to 23.976 by removing the duplicated frames (automatically).

It's hard to go with one of the simpler solutions you suggested. I mean, I'm very alert to small details like the speed difference between 23.97 fps and 25 fps. It kinda triggers me, and I'm pretty sure solution "a" would make the series unwatchable to me. And yea, the quality loss that comes with solution "b" isn't that nice either.

Are you sure there isn't another way without having to spend hours? :#
Reply
#8
If your content isn't properly flagged: No
But try those two methods, in my option for 29.97 progresive input the second one should be fine.

Cu Selur
Reply
#9
(18.07.2018, 20:17)Selur Wrote: If your content isn't properly flagged: No
But try those two methods, in my option for 29.97 progresive input the second one should be fine.

Cu Selur

Okay, I'll try the second one then. Smile

But I can't go to the Filtering tab if I choose "passthrough" in step 3. So what type should I choose?
Reply
#10
Yes, as soon as you mess with the frames you need to reencode and thus you need to choose an encoder.
For testing purposes use the following encoding settings:
  1. set 'Base->Processing->Video' to 'x264'
  2. set 'x264->Base->General Settings->Encoding mode' to 'constant rate factor (1-pass)'
  3. set 'x264->Base->Restriction Settings->Preset' to 'ultrafast' and press the 'Apply'-button next to it
configure the rest, create a job queue entry, start the job queue and look at the output.
Video quality and size are not the main concern atm., just check the whether the output is better/worse than the input 'triggers' you.

Also try method 1. just for comparision. (it's was faster since only the audio is reencoded)

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)