Author Topic: What syntax to convert PAL to NTSC?  (Read 3102 times)

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
What syntax to convert PAL to NTSC?
« on: July 17, 2011, 01:32:22 PM »
I have this file from a PAL HD broadcast that seems to have originated from 23.98 but probably converted into 25 fps interlaced for broadcast. It's excellent quality MPEG2 at 50 Mbps. My goal is to turn it into either 23.98 or 29.97 interlaced to be able to encode it with x264 and fit it into a 25 GB Blu-ray so I can play it on my Blu-ray player because the full file is 48.3 GB and I can't leave that on my computer forever. Plus, the only player that can play the video is VLC, other decoders can't, not even ffdshow.

I indexed the file with MeGUI but I don't see a way to change the fps there, although I can edit the Avisynth script it generates to make that happen. So what's the syntax for frame rate change?

Offline nm

  • Member
  • Posts: 358
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #1 on: July 17, 2011, 02:24:02 PM »
If it's not really interlaced but only encoded as such (there's no visible combing), you can simply add AssumeFPS(24000,1001) to the script.

Audio needs to be slowed down to match the new video speed. If there's no MeGUI setting for this, set it to pass the audio through AviSynth. Then AssumeFPS(24000, 1001, sync_audio=true) might do the trick, followed by ResampleAudio(48000).

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #2 on: July 17, 2011, 04:13:36 PM »
But I don't want to change the video speed. I want to keep the same speed, just make it 23.98 so it's playable on an American Blu-Ray player. Is there a way to do that?

Offline nm

  • Member
  • Posts: 358
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #3 on: July 18, 2011, 12:54:01 AM »
But I don't want to change the video speed. I want to keep the same speed, just make it 23.98 so it's playable on an American Blu-Ray player. Is there a way to do that?

But if it was originally 24p, speed was already changed when converting to PAL rate. You would simply be reversing that change and get the original speed and duration. The alternative is to do some frame-blend conversion or advanced motion interpolation. Both give worse quality than the simple rate change.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #4 on: July 19, 2011, 06:57:15 PM »
Sorry, actually I may have not explained this properly. This is footage of a live broadcast. Therefore, the standard speedup done to movies to convert from 24 fps to 25 fps wasn't done here. I assume it originated at 24 fps because it looks progressive, but now that I think about it, it could be 25 fps progressive. When I play it on VLC, if I choose BOB deinterlacing the motion looks interlaced but really weird, kind of like those new TV sets with that 120 Hz frame blending abomination. However, even if it originated as 25 fps progressive, the broadcast I have is 25 fps interlaced, and if I play it in VLC without any deinterlacing applied, I can see combing every now and then.

This is a UK broadcast from a live concert that won't be available on Blu-ray, otherwise I would just wait and buy it.

So lets assume this is 25 fps progressive, what's the best method in Avisynth to convert it to 29.97 without adding a lot of bad looking frame blending and motion blur?
« Last Edit: July 19, 2011, 07:02:07 PM by sebaz »

Offline Didée

  • Member
  • Posts: 43
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #5 on: July 20, 2011, 02:27:55 AM »
From your description, it could be 25 fps progressive, or 25 fps interlaced/native, or 25 fps interlaced/pulldown, or 25 fps interlaced/fieldblendednormconversion. Or it could be something else just as well.

Please, post a sample ...

Offline kierank

  • Member
  • Posts: 58
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #6 on: July 20, 2011, 02:56:29 AM »
Sometimes there can be what looks like field blending if the cameras vibrate from being too close to the stage.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #7 on: July 20, 2011, 09:02:28 AM »
From your description, it could be 25 fps progressive, or 25 fps interlaced/native, or 25 fps interlaced/pulldown, or 25 fps interlaced/fieldblendednormconversion. Or it could be something else just as well.

Please, post a sample ...

I don't think I could post a sample because I wouldn't know how to cut it without recompressing. Also the problem is that this feed is 50 Mbps, so even a minute of that in its natural format would be a pretty large file.

But lets assume this is a 25 fps interlaced that was originated at 25 progressive from a live event, no speed up like in movies. What's the best way to turn it into 29.97? Obviously to avoid field problems the first step is to deinterlace, but I tried ChangeFPS after Yadif deinterlacing to 23.98, it doesn't work. The motion is stuttery. I haven't tried ChangeFPS to 29.97, but I assume it would be similar. What other command can I use?

Offline Didée

  • Member
  • Posts: 43
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #8 on: July 20, 2011, 10:03:20 AM »
So lets assume this is 25 fps progressive, what's the best method ...

But lets assume this is a 25 fps interlaced that was originated at 25 progressive from a live event, no speed up like in movies. What's the best way to ...

I assume neither-nor. Instead, I assume lazyness. Cutting can be done easily with DGIndex, a 5-seconds snipplet would be ~30MB, and since it's about figuring the basic frame/field structure, even a re-encoded sample (without resizing, of course) would suffice for the given purpose.


The usual no-brainer is to produce standard field pulldown:

Yadif(mode=1)
ChangeFPS(30000,1001)
SeparateFields().SelectEvery(4,0,3).Weave()

and encode that as interlaced.


For better insight, post a sample.


And just FYI, there is no "best" way for PAL<>NTSC conversions. The possibilities are frame/field pulldown (stuttery motion), motion interpolation (with funky interpolation artifacts), or fieldblending (with blending ghosts, oviously).  The only visually clean way is slowdown, but then audio needs speed a/o pitch correction, which isn't a good choice for a music concert.



Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #9 on: July 22, 2011, 02:17:05 PM »
I assume neither-nor. Instead, I assume lazyness. Cutting can be done easily with DGIndex, a 5-seconds snipplet would be ~30MB

Lazyness? What is that supposed to mean? Am I supposed to know how to operate every single video tool available on the internet? Besides, I don't really know what DGIndex is, other than the names shows up in MeGUI's file indexer, but I wouldn't know how to use it to cut a small portion of the file. I know how to use the AVS cutter in MeGUI, but that would re-encode the file so it would defeat the purpose.

Offline nm

  • Member
  • Posts: 358
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #10 on: July 22, 2011, 05:47:20 PM »
Lazyness? What is that supposed to mean? Am I supposed to know how to operate every single video tool available on the internet? Besides, I don't really know what DGIndex is

Well, that could be called lazy. I mean not finding out what it is when an expert says it can do the trick. Just try the tool and read the manual if you have problems with it: http://neuron2.net/dgmpgdec/DGIndexManual.html#WhatIsDGIndex

FFmpeg might also work:

Code: [Select]
ffmpeg -i input.ts -vcodec copy -acodec copy -ss [start time in seconds] -t [duration in seconds] output.ts

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #11 on: July 23, 2011, 09:51:31 AM »
Well, that could be called lazy. I mean not finding out what it is when an expert says it can do the trick.

Really? Then scroll up and tell me exactly where did you tell me I could use DGIndex for cutting the file before you said I was lazy. Because I can't find it. Instead, you offend first and then tell me what to use for the cutting. Maybe you should change the way you talk to people. Just saying.

Besides, my last question was very clear. Assuming this started out as 25fps progressive live footage and then interlaced for broadcast, what is the best syntax to convert that to 29.97 fps interlaced, simple as that. I don't even need to upload any footage for that, and your lazyness comment is out of line for the reason stated above.
« Last Edit: July 23, 2011, 10:12:25 AM by sebaz »

Offline Didée

  • Member
  • Posts: 43
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #12 on: July 23, 2011, 10:51:23 AM »
It seems you're mixing up the persons. The first one using the word "lazy" was me, not nm. But then, in my post DGindex already was mentioned. Alltogether, your allegation to nm does not make any sense.

What means "you can't find"? Cant find a particular comment, or can't find DGindex?

Google:"DGindex" leads here (first hit), where since some time is only sourcecode to download, but there's an obvious link to here where you can download the executable.


Nobody forces you to upload a sample. I was under the impression it was YOU who came and asked for HELP, but maybe I don't remember correctly.


You can always use the 'braindead' approach I posted earlier. That approach is always valid. Not necessarily always optimal, but always valid.

To be sure, you might consider posting a sample. :)

Offline Didée

  • Member
  • Posts: 43
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #13 on: July 23, 2011, 12:16:17 PM »
Oh, and just in case that we eventually might see a sample here ...

It is this description

When I play it on VLC, if I choose BOB deinterlacing the motion looks interlaced but really weird, kind of like those new TV sets with that 120 Hz frame blending abomination.

that makes me suspect that it's in fact a fieldblended NTSC -> PAL conversion. If it was a clean 25p or 25i source, then bobbing should not show up any abnormalities.

And IF so, there's two cases: progressive origin, or double-fieldrate/'true video' origin. The former usually can be cleaned/backconverted with Srestore. The latter is virtually impossible to be repaired.)

That's the good interpretation.

The bad interpretation:

With a kosher source, motion cannot look "interlaced" after bob deinterlacing (unless the bobber used unreasonable thresholds). However, there is the possibility that at some point an improper vertical scaling was performed on interlaced frames, wich in turn destroyed the correct field structure. In this case, you often see something that looks like "broad interlacing" after bobbing.
This case usually cannot be repaired either.


Summed up:
There's a dozen of different possibilities what the source actually could be like. No point in basing decisions on "let's assume it is 25i". You can't pick and choose the scenario. The scenario is given & fixed, and the processing must fit the scenario. Not the other way round.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #14 on: July 23, 2011, 02:19:24 PM »
It seems you're mixing up the persons. The first one using the word "lazy" was me, not nm. But then, in my post DGindex already was mentioned. Alltogether, your allegation to nm does not make any sense.

What means "you can't find"? Cant find a particular comment, or can't find DGindex?

I did mix up the persons, so let's go back to your comment, which says "I assume neither-nor. Instead, I assume lazyness. Cutting can be done easily with DGIndex". So you start by saying I'm lazy, and after that you inform me there's a tool to do the cutting, which I had no way of knowing, because like I said, I'm not familiar with every single video tool out there. Now, if you would've told me, there's this tool called DGIndex to cut the video without recompressing, and I tell you I have plenty of time on my hands, but I'm too lazy to do it, then your lazyness comment wouldn't be as rude as it is. Unfortunately rudeness is excessively common these days on pretty much every forum. Maybe it's a result of the brainwashing done by junk reality TV like Jersey Shore and Housewives of you name it city.

Fact is, I have a million things to do, and I don't have time to cut a sample and upload it, period. I just asked for a simple Avisynth command to convert 25 progressive that was turned into interlaced, to 29.97 interlaced. Simple as that.
« Last Edit: July 23, 2011, 02:22:33 PM by sebaz »

Offline Didée

  • Member
  • Posts: 43
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #15 on: July 23, 2011, 04:15:33 PM »
I'm awfully sorry that the world isn't always as simple as you would like it to have.

BTW, 50i is part of the BD standard (720x576x50i and 1440/1920x1080x50i), so you shouldn't need to do any framerate conversion at all.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #16 on: July 24, 2011, 08:57:51 AM »
BTW, 50i is part of the BD standard (720x576x50i and 1440/1920x1080x50i), so you shouldn't need to do any framerate conversion at all.

It is, but unless your player is universal, an American BD player is not going to play PAL footage, and a European player is not going to play NTSC footage, right?

Offline zifnab76

  • Member
  • Posts: 6
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #17 on: July 26, 2011, 09:10:25 AM »
How hard can it be to post a sample for those who are willing to help you?  Baffling.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #18 on: July 26, 2011, 05:58:50 PM »
How hard can it be to post a sample for those who are willing to help you?  Baffling.

I already explained I'm very short on time. Your life won't change a thing because of it.

Offline nm

  • Member
  • Posts: 358
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #19 on: July 27, 2011, 02:33:41 AM »
So you went with Didée's no-brainer solution and were happy with the result?

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: What syntax to convert PAL to NTSC?
« Reply #20 on: July 27, 2011, 03:01:25 AM »
It is, but unless your player is universal, an American BD player is not going to play PAL footage, and a European player is not going to play NTSC footage, right?
Since when do players care about NTSC vs PAL? Even my DVD player plays PAL and NTSC as long as de region code matches.

Offline sebaz

  • Member
  • Posts: 11
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #21 on: August 01, 2011, 07:38:27 PM »
So you went with Didée's no-brainer solution and were happy with the result?

Actually I haven't had time to run tests on this yet. I might simply do a Yadif deinterlace with MEGUI to make a nice h.264 compression, leave the audio intact, and burn to a PAL BD. I still can play it on the computer, which is connected to the home theater by coaxial digital and the TV set acts as a second monitor, so it's not a terrible problem. I just like the simplicity of the Blu-ray player, but I don't want to waste time running lots of tests with different deinterlace modes and Avisynth commands. If I have more time in the future I'll be happy to try Didee's no-brainer solution or others.

Offline nm

  • Member
  • Posts: 358
    • View Profile
Re: What syntax to convert PAL to NTSC?
« Reply #22 on: August 03, 2011, 02:24:15 AM »
Actually I haven't had time to run tests on this yet. I might simply do a Yadif deinterlace with MEGUI to make a nice h.264 compression, leave the audio intact, and burn to a PAL BD.

Bob-deinterlace only if you have truly interlaced video and you want to make a 720p50 disc.

If you can't tell what the source really is (your descriptions are contradictory) and don't have time to cut a sample for us, just encode it as interlaced.