View Full Version : PAL-> NTSC for hybrid material
Bexley
4th April 2014, 03:50
I have a collection of PAL-only DVDs that I am trying to convert to NTSC in the highest possible quality because I'm just not happy with the way any region-free player I've tried handles interlaced PAL material. (I know the real solution is to buy all multi-standard equipment and forget it, but I can't afford that so I'm experimenting.) I have a script that I really like for 50i material, and a script I like for 25p material.
The problem is that I'm working with a lot of hybrid film/VT stuff (Blake's 7 at the moment), and I'm not happy with the way either script handles the whole thing. The motion on the film inserts is too fast and smooth using SmoothFPS2, and the motion on the main VT part is too stiff and film-like using ChangeFPS. My question is whether it's possible to accurately identify the interlaced and progressive parts with AVISynth and apply different conversion scripts to them.
Here is my interlaced script:
ColorMatrix(hints=true, threads=0)
AssumeTFF()
AssumeFPS(25,1)
Yadif(mode=1,order=1)
Lanczos4Resize(720,480)
LRemoveDust(17,2)
SmoothFPS2(60000,1001)
SeparateFields()
SelectEvery(4,1,2)
Weave()
And here is the progressive script:
ColorMatrix(hints=true, threads=0)
AssumeTFF()
AssumeFPS(25,1)
TDeint(mode=1)
Lanczos4Resize(720,480)
RemoveDirtMC(20)
LRemoveDust(17,2)
ChangeFPS(60000, 1001)
SeparateFields()
SelectEvery(4,1,2)
Weave()
To anticipate the question, no, there's no particular reason I'm using both TDeint and Yadif except that's just the way I've always done it. :) I've successfully done two separate conversions and spliced them together manually, but there has to be a better way. Any ideas greatly appreciated. TIA
Mounir
4th April 2014, 14:27
why do you use SeparateFields().SelectEvery(4,1,2).Weave() ?? Your video is deinterlaced
selectevery(4,0,3) (for top field) or selectevery(4,1,2) (for bottom) should be enough i believe
Bexley
5th April 2014, 02:48
why do you use SeparateFields().SelectEvery(4,1,2).Weave() ?? Your video is deinterlaced
selectevery(4,0,3) (for top field) or selectevery(4,1,2) (for bottom) should be enough i believe
Not really sure... that's the way it was in the script where I discovered SmoothFPS2. Here:
http://forum.videohelp.com/threads/346341-Converting-1080i-30fps-to-1080i-25fps
TheSkiller
5th April 2014, 11:40
selectevery(4,0,3) (for top field) or selectevery(4,1,2) (for bottom) should be enough i believeYes, but with just SelectEvery(...) you completely throw away what would become a unique field of the final video! You would end up with 29.97p instead of 29.97i. For a normconversion this would be quite unwatchable.
Why ColorMatrix? It is not needed.
Are you aware of the fact that SeparateFields().SelectEvery(4,1,2).Weave() changes the field order of the output? If you don't want that use 4,0,3 instead.
For a 25p to 29.97i conversion (your second script) it is not ultimately required to encode this ChangeFPS-style pulldown. Any DVD-Player can do the ChangeFPS-like field repetition on playback if you instruct them to do so using pulldown flags (note this is not the same as playing a PAL DVD and having the player butcher it for NTSC output). All you would have to do is resize to 480 lines and encode to MPEG2 at 25 fps progressive, then apply pulldown flags for 29.97i output.
Bexley
5th April 2014, 14:27
Why ColorMatrix? It is not needed.
Why not? I was under the impression that although it is only needed for some streams, if info=3 and hints=true, it is only applied if a Rec.709 stream is detected. I always use it this way for decoding MPEG2 streams in the belief that it is only applied if needed. Is this not correct?
Are you aware of the fact that SeparateFields().SelectEvery(4,1,2).Weave() changes the field order of the output? If you don't want that use 4,0,3 instead.
Yes, I know. I like to encode BFF because the majority of my work is with DV material, which is normally BFF. When I work with TFF DVDs I reverse the field order to keep everything consistent and avoid mixing field orders.
For a 25p to 29.97i conversion (your second script) it is not ultimately required to encode this ChangeFPS-style pulldown. Any DVD-Player can do the ChangeFPS-like field repetition on playback if you instruct them to do so using pulldown flags (note this is not the same as playing a PAL DVD and having the player butcher it for NTSC output). All you would have to do is resize to 480 lines and encode to MPEG2 at 25 fps progressive, then apply pulldown flags for 29.97i output.
This only works for 100% progressive material, not interlaced or hybrid. I've tried the pulldown route before and it looks completely unwatchable on 50i material. Moreover, most authoring programs (at least the ones I use) won't accept such a stream even though it is technically 29.97. See my question - I need to apply both scripts selectively to different parts of the stream, not just one.
I think pulldown for standards conversion is something of a dirty hack anyway. You don't see commercial DVDs released that way. I think the better way to do it is apply a proper standards conversion and encode a 100% compliant stream. Using these two scripts, I can approach the quality of a professional standards conversion, albeit with the occasional wonky motion artefact.
TheSkiller
5th April 2014, 20:50
Why not? I was under the impression that although it is only needed for some streams, if info=3 and hints=true, it is only applied if a Rec.709 stream is detected. I always use it this way for decoding MPEG2 streams in the belief that it is only applied if needed. Is this not correct?It should be correct if the flags of the DVD are correct. But then all it does is: nothing.
There is no question about the colorimetry of the source and both source and target use the same colorimetry, hence I don't see a reason to put ColorMatrix in the script at all. DVDs always follow Rec.601 color coefficients (unless incorrectly mastered), although sometimes it is incorrectly flagged as Rec.709 which is why I'd advice not to put ColorMatrix in the script unless you know it is really needed. If the flags report 709, ColorMatrix will incorrectly apply a conversion. If the flags report 601 or nothing, it won't do anything.
This only works for 100% progressive material, not interlaced or hybrid. I've tried the pulldown route before and it looks completely unwatchable on 50i material. Yes, pulldown works with progressive video only.
However, it can be used with hybrid videos. You would have to encode each change separately as a part and splice the pulldown-applied and the real interlaced parts together with something like Cuttermaran.
So yeah, it is possible but it would have to be done 100% manual and therefore probably not worth the huge effort.
Moreover, most authoring programs (at least the ones I use) won't accept such a streamDid you use DGPulldown to apply pulldown? It's odd because pulldown is 100% DVD compliant. The vast majority of Hollywood film DVDs released in NTSC terretories use the very same technique for outputting 29.97i from their encoded 23.976p video.
The authoring app shouldn't even recognize the stream as anything but 29.97 interlaced.
See my question - I need to apply both scripts selectively to different parts of the stream, not just one.I don't know of any other reliable way to do this other than doing it manually. At least using ClipClop (http://forum.doom9.org/showthread.php?t=162266) it would be "as convenient as possible", you just need to enter the frame ranges. Depending on how often the video changes, of course, this may be no option.
I think pulldown for standards conversion is something of a dirty hack anyway. You don't see commercial DVDs released that way.That's only because the first thing usually to happen way before the encoding and authoring of a DVD takes place is standards conversion. Hence there never is a 480p 25 fps master for a DVD to apply pulldown after encoding. It has been converted to 480i 29.97 with pre-applied pulldown or motion compensated frame rate conversion beforehand.
I think the better way to do it is apply a proper standards conversion and encode a 100% compliant stream.Like I've said, it is compliant. Quality wise ChangeFPS does nothing differently than pulldown, it just repeats frames/fields.
Nevertheless, I wouldn't chase pulldown in your situation as well – too much effort with hybrid videos.
Bexley
5th April 2014, 22:46
There is no question about the colorimetry of the source and both source and target use the same colorimetry, hence I don't see a reason to put ColorMatrix in the script at all.
I'm actually going to x264 in this case, although I do use DVD sometimes too. I'm going to stick the whole series on a couple of Blu-Rays instead of a 20-disc DVD set. Would it matter then?
Did you use DGPulldown to apply pulldown? It's odd because pulldown is 100% DVD compliant. The vast majority of Hollywood film DVDs released in NTSC terretories use the very same technique for outputting 29.97i from their encoded 23.976p video.
The authoring app shouldn't even recognize the steam as anything but 29.97 interlaced.
Yes, I used DGPulldown. I'm authoring with Encore CS5.5 ATM, but I've tried it with others in the past. The only thing I've found that will take a stream like that is TMpegEnc DVD Author (which doesn't behave well on Win7) or MultiAVCHD. Encore will take a standard 3:2 pulldown just fine, but it won't take a 2:2:3:2:3 pulldown without wanting to transcode it.
TheSkiller
6th April 2014, 00:13
Would it matter then?Doesn't matter. Unless you would be upscaling to 720p or 1080i before encoding the colorimetry should not be touched coming from a DVD source.
manono
6th April 2014, 12:39
I'm authoring with Encore CS5.5 ATM...
It's well known for not accepting perfectly compliant 3:2:3:2:2 pulldown. Don't use it. I've never used it and haven't found any authoring programs that won't accept any kind of 'legal' pulldown. Use Muxman instead.
As TheSkiller says, the different parts have to be encoded separately. The different M2Vs can (also) be joined when authoring by using Muxman to do it.
I think pulldown for standards conversion is something of a dirty hack anyway.
Nonsense. It's a helluva lot better than hard telecine (which is what I think your progressive script is doing) and way way better than field-blended garbage. I fail to understand why purposely interlacing progressive material to then be encoded as interlaced (and then deinterlaced by some DVD player) is in any way better than encoding it as progressive with pulldown (and then played as progressive by the DVD player).
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.