View Full Version : Expert PAL to NTSC conversion? (DVD)
mantis2k
22nd July 2005, 03:28
It doesn't matter which software you use to convert from one standard to another, the quality is never as good as the DVDs released by professional companies around the world.
A correct standards conversion should change the total running time of a typical 90 minute film to +/- 3 minutes, depending on the type of conversion, but all software methods I've seen keep the same running times and introduce ghosting or motion judder.
How can one professionally convert between PAL and NTSC?
It's come to my attention that Sony's Vegas 6 (released just over 3 months ago) actually has the ability to perform the standards conversion properly, which has something to do with 24fps and inserting a pulldown!? Would somebody kindly explain this in more detail?
Can Canopus Procoder do this type of conversion? There is an output option for 24p -> NTSC (3-2pulldown), but I don't know how to use it, and the program crashes whenever I try...
Guest
22nd July 2005, 03:35
DGPulldown can convert progressive PAL to NTSC for DVDs without blending or judder (at least no more judder than normal 3:2 pulldown). The running time remains the same and the audio does not need to be altered.
You're probably thinking of a process where the video and audio are slowed from 25fps to 23.976fps and then standard 3:2 pulldown is applied. But this is no longer necessary because DGPulldown can convert directly from 25fps.
But if the 25fps film was made from an original 24fps film, however, then it will have been sped up from 24fps to 25fps, and one might prefer the process including the initial slowdown back to 23.976 to get as close as possible to the original film speed. The audio will suffer from the double conversion. (Even in that case there is a way to "lie" to DGPulldown to achieve the slowdown for the video. You'll still have to alter the audio.)
Most decent MPEG2 encoders support 3:2 pulldown. Even if they don't, you can do that with DGPulldown, too.
mantis2k
22nd July 2005, 03:53
I've just checked a guide on that program you mentioned, and the concept of changing only the resolution and leaving DGPulldown to change only the framerate, sounds very interesting indeed... I'll give it a try and let you know the results! :thanks:
Guest
22nd July 2005, 03:56
Let me know if you have any problems. I know DGPulldown pretty well.
BTW, what's the link to the guide you're using? Thank you.
mantis2k
22nd July 2005, 04:00
http://www.johnisme.com/avi1.shtml
I'm going to try and author a small clip now (already done the conversion).
mantis2k
22nd July 2005, 04:09
The results are VERY impressive indeed!!! The motion looks fluid, and there's no noticeable judder compared to the PAL source. Is this really NTSC video I'm now watching? :D
I'm uploading the 2 clips now for comparison...
Guest
22nd July 2005, 04:19
happy_users++;
Did you play it on a standalone DVD player or a software player?
mantis2k
22nd July 2005, 04:47
I played it on software DVD player, but parsed the files and authored it with DVDMaestro, to ensure DGPulldown really did change the framerate from 25 to 29.97 (and it did!) :p I even checked the file in Canopus, and of course it really now is DVD compliant NTSC video, which will work in my standalone player etc. I hope DGPulldown has not done some kind of fake "patch"! :D
7 Steps of Kung Fu clip (PAL source) (http://www.rarekungfumovies.com/new/7StepsPAL.mpg)
7 Steps of Kung Fu clip (NTSC converted) (http://www.rarekungfumovies.com/new/7StepsNTSC.mpg)
Guest
22nd July 2005, 04:52
Don't worry, it's not fake. It's completely valid and legal MPEG2, and fully DVD compliant. There's a good thread here that explains the theory:
http://forum.doom9.org/showthread.php?t=88031
DGPulldown is based on an original idea by Xesdeeni.
mantis2k
22nd July 2005, 06:41
I read some of that discussion on the first few pages, and somebody suggested you guys were trying to program some kind of "patch" tool, causing the video to not be compatible with certain DVD players or have video/audio problems during playback. Well, I tested it on my fussy panasonic, and it plays fine! You know, this method will save me a lot of time... Currently, it takes me 14 hours to do a conversion with Canopus, but now it would only take about 4 hours at the most and appears higher quality (I'm converting a whole movie now - just the resolution - for secondary conversion with DGPulldown).
mantis2k
22nd July 2005, 06:49
Somebody claimed they used DGPulldown already, but got video glitches ocassionally popping up. When I've converted the whole movie, I'll test it out properly to see if the claims are true...
mantis2k
22nd July 2005, 07:47
Is there any way you could add Audio input and VOB output to your program? It would make a life even more easier! :D
My friend took some screencaps of these supposed glitches, but I'm wondering if they could be due to an interlaced source? I've asked him if his source was progressive, but he's gone to bed.
http://www.rarekungfumovies.com/new/still029.jpg
http://www.rarekungfumovies.com/new/still030.jpg
Guest
22nd July 2005, 14:13
That's the first time I've heard of any glitches supposedly coming from DGPulldown. Is your friend saying that the MPEG elementary stream is fine before applying DGPulldown and bad afterwards? Or does this appear only after authoring? Does it occur on all streams or only some? Does it happen on all players or only some?
Please provide details about the exact minimal process that creates this issue, and upload a small source M2V (before applying DGPulldown) to my server that will allow me to duplicate the issue. Thank you.
Paulcat
22nd July 2005, 15:47
I have had no trouble at all with DGPulldown. interlaced or progressive source files. (A lot of the PAL episodic DVD's I have come across are interlaced, I just use TMPGEnc to de-interlace)
mantis2k
22nd July 2005, 20:02
I have had no trouble at all with DGPulldown. interlaced or progressive source files.
I thought DGPulldown doesn't work with interlaced files?
(A lot of the PAL episodic DVD's I have come across are interlaced, I just use TMPGEnc to de-interlace)
How do you know TMPGEnc is the best program to de-interlace?
scharfis_brain
22nd July 2005, 20:06
Even if a PAL-DVD has been encoded interlaced, there is commonly no need to deinterlace it, unless you do see the typical interlacing combs.
mantis2k
22nd July 2005, 20:15
Even if a PAL-DVD has been encoded interlaced, there is commonly no need to deinterlace it, unless you do see the typical interlacing combs.
Well, of course if the DVD is originally interlaced, you obviously will see those combs in Widows Media Player/Winamp. Interlaced files won't work with DGPulldown, unless you deinterlace first, right? And what kind of problems happen when you do try to apply DGPulldown to an interlaced file?
Guest
22nd July 2005, 21:00
Yes, interlaced content will not work, because the fields get out of order. I explained it in detail in the main DGPulldown thread.
mantis2k
22nd July 2005, 21:08
Briefly, what visual problems occur when you try to apply DGPulldown to an interlaced file? I couldn't understand the main topic because it was too technical for me.
If I'm going to use DGPulldown to get the highest quality out of my PAL to NTSC conversions then I also need to know the best program for de-interlacing PAL DVDs. Ordinary PAL to NTSC conversion doesn't necessarily require a progressive source; it can work with interlaced files, so that's never been an issue until now. People using DGPulldown need to know the best way of de-intelacing; it's essential!
No chance of adding Audio input/VOB output to DGPulldown, similar to SVCD2DVDMPG?
Waiting for my friend to get back to me regarding that glitch. He said his source was progressive, and he'll try the program again later on. I've forwarded your reply to him.
scharfis_brain
22nd July 2005, 21:18
there mainly are 5 types of PAL interlacing:
1) none/progressive -> you do NOT see (do NOT trust DGindex upon the frametype!) combing
so just resize from 576 to 480 lines and encode as 7ßßx480@25fps as progressive
2) phase shifted progressive -> combing is clearly visible.
telecide(order=1,guide=2,post=0) should remove it without quality drawbacks.
3) truely interlaced video -> use kerneldeint() or tdeint(type=3) for deinterlacing.
4) mixtures of 1), 2) and 3): use tdeint(type=3,full=false)
(only deinterlaces the really needed scenes)
5) fieldblended crap: you see ghosting images and jerky motion after applying the deinterlacer? use restore24
Guest
23rd July 2005, 00:13
Briefly, what visual problems occur when you try to apply DGPulldown to an interlaced file? I couldn't understand the main topic because it was too technical for me. The fields get out of order. An object moving from right to left will move forward, then back, then forward, instead of always forward.
If I'm going to use DGPulldown to get the highest quality out of my PAL to NTSC conversions then I also need to know the best program for de-interlacing PAL DVDs. Talk of "best" violates forum rule 12 and can precipitate flame wars.
Ordinary PAL to NTSC conversion doesn't necessarily require a progressive source; it can work with interlaced files, so that's never been an issue until now. People using DGPulldown need to know the best way of de-intelacing; it's essential! For every 10 people you'll get 20 opinions on what is the best! Even if you ask me "what is your favorite one", I can't answer, because it depends upon the nature of the source content. Sometimes you think you need deinterlacing when all you need is a one-field phase shift. When you really do need deinterlacing, try several of the popular ones and decide for yourself what is best for your source material and your esthetic tastes.
No chance of adding Audio input/VOB output to DGPulldown, similar to SVCD2DVDMPG? What is the justification?
Waiting for my friend to get back to me regarding that glitch. He said his source was progressive, and he'll try the program again later on. I've forwarded your reply to him. I remember seeing artifacts like that once and it turned out to be some weird unexpected cause. but I can't remember any more about it than that. :(
mg262
23rd July 2005, 00:23
there mainly are 5 types of PAL interlacing:
1) none/progressive -> you do NOT see (do NOT trust DGindex upon the frametype!) combing so just resize from 576 to 480 lines and encode as 7ßßx480@25fps as progressive
2) phase shifted progressive -> combing is clearly visible.
telecide(order=1,guide=2,post=0) should remove it without quality drawbacks.
3) truely interlaced video -> use kerneldeint() or tdeint(type=3) for deinterlacing.
4) mixtures of 1), 2) and 3): use tdeint(type=3,full=false)
(only deinterlaces the really needed scenes)
5) fieldblended crap: you see ghosting images and jerky motion after applying the deinterlacer? use restore24
This is a really really useful post. IMO, it would be great to have it assimilated into a sticky somewhere (not necessarily on this forum)...
mantis2k
23rd July 2005, 01:45
For every 10 people you'll get 20 opinions on what is the best! Even if you ask me "what is your favorite one", I can't answer, because it depends upon the nature of the source content.
By comparing several deinterlacing software/methods performed on the same source, you can rank one higher than another, and ultimately prove which is the best!
The nature of the source content I've described is specifically interlaced PAL DVDs, which all look the same when played back on any DVD player with a built-in deinterlacer. Therefore, why should there be 5 different methods of de-interlacing, when really there must be a single universal method. Canopus Procoder has Adaptive Deinterlacer and TMPEGEnc has it's own deinterlacer too. They must all work in the same way as a DVD player, but which one produces the highest quality? A Sony DVD player is bound to play DVDs in higher quality than a lesser brand, so which software is better at converting interlaced PAL DVDs into progressive video?
What is the justification?
The majority of people are using DGPulldown to convert video to NTSC DVD, and so it would be quicker in most cases if the video was outputted as VOB files with automatic chapters, as this is the standard file type for DVD. If somebody wanted to create menus, they could still demux the VOBs and author it themselves.
mantis2k
23rd July 2005, 01:46
This is a really really useful post. IMO, it would be great to have it assimilated into a sticky somewhere (not necessarily on this forum)...
Glad you found it useful, but it makes absolutely no sense to me!
Guest
23rd July 2005, 03:21
By comparing several deinterlacing software/methods performed on the same source, you can rank one higher than another, and ultimately prove which is the best! That's only true if you agree in advance about the ranking of the criteria and their weightings. What if I value total elimination of residual low level combing more than retention of detail in static areas, and you value those oppositely? What if I don't mind sacrificing some quality for much faster operation, and you value those oppositely? So, again, there is no "best". It depends on your personal values and goals.
The nature of the source content I've described is specifically interlaced PAL DVDs, which all look the same when played back on any DVD player with a built-in deinterlacer. Therefore, why should there be 5 different methods of de-interlacing, when really there must be a single universal method. Perhaps all of *your* content is of one type, but I can tell you from long experience that sharfis_brain has got it exactly right (except for not listing a few more obscure types of interlacing). And you haven't shown us any of your material, so how can we guess which type it is?
Canopus Procoder has Adaptive Deinterlacer and TMPEGEnc has it's own deinterlacer too. They must all work in the same way as a DVD player, but which one produces the highest quality? A Sony DVD player is bound to play DVDs in higher quality than a lesser brand, so which software is better at converting interlaced PAL DVDs into progressive video? Your premises are incorrect and so your questions are ill-formed.
The majority of people are using DGPulldown to convert video to NTSC DVD, and so it would be quicker in most cases if the video was outputted as VOB files with automatic chapters, as this is the standard file type for DVD. If somebody wanted to create menus, they could still demux the VOBs and author it themselves. Actually, I haven't seen any polls about it and you just learned about DGPulldown, so I have trouble crediting your statistics. In any case, I have more important ideas I'd prefer to work on for the forseeable future.
mantis2k
23rd July 2005, 04:19
What if I value total elimination of residual low level combing more than retention of detail in static areas, and you value those oppositely?
I don't quite understand what you mean, but which option would a DVD player with a built-in deinterlacer favor? Is certain software powerful enough to take care of both those problems you mentioned? Which software converts interlaced DVD video in the most similar way to how a DVD player deinterlaces DVD video on-the-fly?
What if I don't mind sacrificing some quality for much faster operation, and you value those oppositely?
Clearly, any software that loses quality would rank lower than other software, regardless of time. By asking for the "best" software, I'm obviously referring to the software with the highest quality results. If I'm not happy with the speed of the software, I can always upgrade my PC. In other words, I agree speed is a factor, but quality should naturally take higher priority.
And you haven't shown us any of your material, so how can we guess which type it is?
My DVD player doesn't ask me what type of interlaced DVD I'm loading, before displaying it perfectly without any combs. If a software can't handle a typical interlaced PAL DVD then it must be deviating from the standard deinterlacing method, which only complicates things by introducing unecessary parameters into the equation. Either that, or it's not designed specifically for deinterlacing DVD video. I simply want to know the best way of de-interlacing a PAL DVD. If you cannot make a decision as to which software is better than another then please give me your top 3 favourites, so I can compare them myself.
Actually, I haven't seen any polls about it and you just learned about DGPulldown, so I have trouble crediting your statistics. In any case, I have more important ideas I'd prefer to work on for the forseeable future.
I haven't done any statistics; It's common sense! Isn't it clear to you that the majority of people would be using your software for converting video, in order to burn onto DVD and work in their player? Why else would someone want to change the framerate, if not to to perform a PAL to NTSC conversion and make the video compatible with DVD players in NTSC territories? I realise there are other applications with your software, but they would be used by the minority, otherwise I must be going mad... Not everybody would prefer VOB output, but it would be nice if the option was there, no?
mantis2k
23rd July 2005, 04:41
Message from my friend who initially reported having glitches with DGPulldown
Worked fine this time... I think it was because I still had a few other programs running in the back at the time.
Guest
23rd July 2005, 04:56
@mantis2k
When you learn more about the theory and get some experience under your belt with the diverse types of source material that are encountered in practice, perhaps you'll be better able to understand the points that we are making about SW deinterlacers.
You could start by studying how different progressive output DVD players handle combing, the flag followers versus the field matchers, and how various different video-mode deinterlacers vary dramatically in quality, and how various different methods are used for switching between film mode and video mode. Then you'll know that even in the hardware arena, players do well on some source material and not on others.
If you show a specific source clip to me, I can make a recommendation. Otherwise, there's a big danger of giving a seriously suboptimal solution. scharfis_brain gave you his opinion, carefully tying it to the types of source material. You confessed that it makes no sense to you. I would argue that it is due to your lack of knowledge and not to any incoherence on scharfis_brain's part.
Just to be sure, when you draw our attention to your "perfect" DVD output, you *are* talking about progressive output from a DVD player, yes? Because if not, then the DVD player is not deinterlacing at all; it's just outputting interlaced to the TV at field rate. It's pointless to compare a software deinterlacer to what you see on an interlaced display when playing a DVD on a player.
Newbies come on here quite often asking for the "universal script". Now you want the "universal deinterlacer".
mg262
23rd July 2005, 05:01
Glad you found it useful, but it makes absolutely no sense to me!@mantis2k... in that case, I think you would be best served by spending time reading the guides on the main site ... IIRC there are two in particular that deal with interlacing; if you can't find them I will look up the URLs for you.
I don't quite understand what you mean, but which option would a DVD player with a built-in deinterlacer favor? Read what @neuron2 said about your premises being incorrect carefully and compare with the guides...
Edit:
Just to be sure, you *are* talking about progressive output from a DVD player, yes? Because if not, then the DVD is not deinterlacing at all; it's just outputing interlaced to the TV.
... and because the TV displays in a different way to a PC screen, @mantis2k, the same picture that shows combs on your screen won't show them on a TV; it's nothing to do with a 'built-in deinterlacer'.
I'm getting out of my depth here... I didn't realise you could force progressive output on interlaced DVDs in a hardware player.
Guest
23rd July 2005, 05:20
Message from my friend who initially reported having glitches with DGPulldown
Worked fine this time... I think it was because I still had a few other programs running in the back at the time.
Yeah, that was the weird cause I was thinking of. There's a thread here somewhere about it.
mantis2k
23rd July 2005, 05:37
When you learn more about the theory and get some experience under your belt with the diverse types of source material that are encountered in practice, perhaps you'll be better able to understand the points that we are making about SW deinterlacers.
I understand there are other types of source materials, but I am only concerned with DVD Video.
Then you'll know that even in the hardware arena, players do well on some source material and not on others.
I'm not particularly fussy about certain source materials, only general DVD video (PAL). If you can recommend software that will convert my DVDs progressively in the same quality (or better) compared to how they appear on my DVD player, I'll be a happy man. Ideally, I was hoping there would be several softwares that would qualify for this digital task?
If you show a specific source clip to me, I can make a recommendation.
Thank you for the offer! Source clip coming right up...
You confessed that it makes no sense to you. I would argue that it is due to your lack of knowledge and not to any incoherence on sharfis_brain's part.
He explained his methods out of context, which is why they make no sense to the average person. I assume it has something to do with AviSynth?
Just to be sure, when you draw our attention to your "perfect" DVD output, you *are* talking about progressive output from a DVD player, yes?
Yes, or have you heard of a software player called PowerDVD? This can display all my PAL DVDs in exceptional quality.
Guest
23rd July 2005, 05:53
I understand there are other types of source materials, but I am only concerned with DVD Video. It's a giant mistake to suppose that "DVD video" is all of one type. It verges on laughable.
I'm not particularly fussy about certain source materials, only general DVD video (PAL). See above.
He explained his methods out of context, which is why they make no sense to the average person. I assume it has something to do with AviSynth? If you wanted to do more than call attention to how little you know, you could set yourself the task of understanding the points he made.
Yes, or have you heard of a software player called PowerDVD? This can display all my PAL DVDs in exceptional quality. I don't know what method it uses or what compromises it makes. And I don't know if what you think of as "exceptional" we would think of as ho-hum and easily exceeded by a SW method tailored to the video source type. Don't forget that players have to work in real time, while SW solutions for transcoding can take as long as they like.
Post your unprocessed source clip and then we can talk concretely about scripts.
mantis2k
23rd July 2005, 06:29
It's a giant mistake to suppose that "DVD video" is all of one type. It verges on laughable.
Of course, there are differences. However, in regards to deinterlacing, DVD players with a built-in deinterlacer can always display them in above satisfactory quality, without needing to know anything particular about the source DVD. Nobody ever complains about the deinterlacing quality of certain DVDs played with PowerDVD. Therefore, I believe "DVD Video" is a perfect pigeon hole to describe my source material, without complicating things.
If you wanted to do more than brag about how clueless you are, you could set yourself the task of understanding the points he made.
Likewise, he could set himself the task of understanding how to explain things in better context. Having worked for major companies authoring DVDs, I consider myself quite technical. I'm not a developer like yourself, but I can atleast "hold my own", so to speak... The fact that I can't make sense of what he's talking about, means not many other people will either. All that talk about scripts and functions is useless, unless he puts them into context with the software he's using.
I don't know what method it uses or what compromises it makes. And I don't know if what you think of as "exceptional" we would think of as ho-hum and easily exceeded by a SW method tailored to the video source type.
If you can come up with an SW method tailored to my video source type, which exceeds what PowerDVD can achieve, I would be very grateful! Here's a clip taken from a movie recorded using a Panasonic DVD recorder, which is how all my VHS tapes were backed up...
Download Dragon Fist clip (http://www.rarekungfumovies.com/new/DragonFist.mpg)
What can you please tell me about this source clip?
Guest
23rd July 2005, 13:38
Of course, there are differences. However, in regards to deinterlacing, DVD players with a built-in deinterlacer can always display them in above satisfactory quality, without needing to know anything particular about the source DVD. You're showing your lack of knowledge again. The best players analyse the video to determine the appropriate mode of decombing to use. So they do "know about" the nature of the source video.
Likewise, he could set himself the task of understanding how to explain things in better context. Like me, he hasn't the time to repeat existing explanations for every newbie that arrives wanting to be spoonfed.
Having worked for major companies authoring DVDs, I consider myself quite technical. I'm not a developer like yourself, but I can at least "hold my own", so to speak... The fact that I can't make sense of what he's talking about, means not many other people will either. All that talk about scripts and functions is useless, unless he puts them into context with the software he's using. Within the domain of this site and it's history, his comments are very well placed in context.
What can you please tell me about this source clip? It's letterboxed straight video (type 3 as given by scharfis_brain), with no problematic aspects, at least in the short clip you provided. Here's one possible script:
loadplugin("dgdecode.dll")
loadplugin("leakkerneldeint.dll")
MPEG2Source("kungfu.d2v",upConv=true)
leakkerneldeint(order=1,threshold=0)
You can improve static area detail by setting threshold=7, but that causes some artifacts on the border with the letterboxing. If it were me I would first crop those off, then deinterlace with threshold=7. Finally, I would resize and add borders as needed for NTSC DVD compatibility.
scharfis_brain
23rd July 2005, 13:59
;)
Neuron2, I think you made a little mistake here:
It is phase shifted progressive :)
@mantis: why are you capturing to lossy MPEG2?
the video is blocky and totally smoothed.
I suggest capturing with a TV-Card and a CoDec like HuffYUV or MJPEG.
your video can be reverted without deinterlacing to progressive by using telecide, like described earlier.
Guest
23rd July 2005, 14:13
Oops. You're right. I looked at only the first few fields and got fooled by the noise. Sorry.
With the noise between fields, though, postprocessing might be useful.
@mantis2k
Here's a starting script.
loadplugin("dgdecode.dll")
loadplugin("decomb.dll")
MPEG2Source("kungfu.d2v",upConv=true)
telecide(order=1,post=0)
This perfectly illustrates the point scharfi and I have been making. If you just deinterlace your clip, you'll lose quality compared to recovering the progressive frames, as Telecide does here.
Carpo
23rd July 2005, 14:23
how would you go about ntsc to pal ?
Guest
23rd July 2005, 14:35
how would you go about ntsc to pal ? If it's 3:2 pulled-down material, you can just do IVTC first and then do the traditional 4% speedup. What kind of material are you talking about?
scharfis_brain
23rd July 2005, 14:46
@mantis2k:
I suggest this script for a Pulldown Conversion from PAL to NTSC:
loadplugin("D:\x\dgdecode.dll")
loadplugin("D:\x\decomb.dll")
mpeg2source("man.d2v")
# crop away black borders
crop(0,72,0,-96)
# match fields
telecide(order=1,guide=2,post=0)
#shift chroma and remove chroma flicker
mergechroma(crop(0,4,0,0).addborders(0,0,0,4).blur(0,1))
# convert image size to NTSC
converttoyuy2()
last.lanczosresize(last.width,round(last.height/1.2))
addborders(0,ceil((480-last.height)/2),0,floor((480-last.height)/2))
I think this is enough filtering.
Guest
23rd July 2005, 14:53
@scharfi,
Isn't it better to do the color space up conversion in MPEG2Source (using upConv=true), where you can be sure you are doing the correct upsampling on the original encoded MPEG2 pictures? It's perhaps a small point, but worth noting.
Carpo
23rd July 2005, 14:58
If it's 3:2 pulled-down material, you can just do IVTC first and then do the traditional 4% speedup. What kind of material are you talking about?
bit of all sorts really animation mainstream films and the such - just wondered how it would be done so i could mess about and see if i could get the hang of it as there has been a few ntsc films my uncle has brought with him on visits fromt he states (he lives there now) that my standalone has an issue with - was wondering if converting it to pal might solve the issue
scharfis_brain
23rd July 2005, 15:05
since I am SURE, that I have a progressive image after telecide, I can upconvert it progressively after teleciding with a simple converttoyuy2().
also, I don't think, that relying on the frametype alone for upconversion is so good (but it is a starting point...).
I've seen several DVB-S streams where the image content was interlaced, but the image was coded progressively (motion probably was und a certain threshold).
In past I've done some motion adaptive YV12<->YUY2 conversions for hybrid video:
http://forum.doom9.org/showpost.php?p=618364&postcount=1
of course, for this video those routines will probably fail due te big imperfection.
Guest
23rd July 2005, 15:17
The flags reliably state how the video was *encoded*. And that is how the upsampling should be done at the time an MPEG picture is decoded. Whether the *content* is actually progressive is irrelevant.
I think your idea that since you've decombed you can now treat it as if it was *encoded* progressively is a misconception. Think about that carefully, please.
scharfis_brain
23rd July 2005, 15:22
An interlaced encoded progressive PAL-movie is better upsampled progressively.
interlaced downsampling of progressive frame contents can be
upsampled progressively without drawbacks.
Have I written drawback?
upsampling interlaced mpeg2 with progressive video in a progressive way enhances chroma quality!
one can do so, because the inventor of YUV 4:2:0 has wisely choosen the position of the sampling points.
They are the same for interlaced and progressive. Only their origin is different.
Guest
23rd July 2005, 15:26
We'll have to agree to differ. I am giving the correct MPEG2 theory. You are giving unsupported claims.
It is not correct that the sampling points for interlaced and progressive encoding are the same.
I remind you that quality DVD players that avoid the chroma upsampling bug all follow the progressive flag and upsample per MPEG2 picture.
I will try to prepare a demonstration that illustrates the perils of not upsampling at picture decode time.
Guest
23rd July 2005, 15:43
bit of all sorts really animation mainstream films and the such - just wondered how it would be done so i could mess about and see if i could get the hang of it as there has been a few ntsc films my uncle has brought with him on visits fromt he states (he lives there now) that my standalone has an issue with - was wondering if converting it to pal might solve the issue The method to use is going to depend on whether the material is 3:2 pulled down, video, or field-blended. You can show us a clip of one that you'd like to convert and we can advise you. But not in a thread about PAL --> NTSC. Please start a new thread.
scharfis_brain
23rd July 2005, 15:43
how can I convince you?
EDIT: I have several interlaced encoded movies, that look MUCH better using progressive upsampling than interlaced upsampling.
also, I claim that motion adaptive upsampling of real interlaced content looks better than plain interlaced upsampling.
According the this page, the chroma sampling points are located in the SAME spatial position for interlaced and progressive YUV 4:2:0:
http://www.mir.com/DMG/chroma.html
Guest
23rd July 2005, 15:45
how can I convince you? Let's take it offline and then we'll come back to the thread with our conclusion. First, I'll prepare and send you a PM with my position. Please standby. It'll come this weekend, but not immediately as I've to go pick up some drugs for my dad and then I'm off to the pool. :)
I read your argument as that the method may not be fully correct per MPEG2, but it has useful side effects that may improve matters in some cases. I can accept that in principle, but I'd like to see a specific example if you can provide one. And I'll try to give a counter example. It may be yet another case where the nature of the content is the determining factor. But let's do it offline. Thanks for engaging in this with me. I always learn a lot from our interactions.
Guest
23rd July 2005, 15:56
According to this page, the chroma sampling points are located in the SAME spatial position for interlaced and progressive YUV 4:2:0: But they come from different fields in the original full resolution image that was sampled. So they need to be recreated in the same way. That's the whole point. But can we please take it offline as I suggested, because I think we may be having some terminology differences as well that will just confuse things for people. We can come back with a clear analysis. Is that OK?
scharfis_brain
23rd July 2005, 15:58
We can come back with a clear analysis. Is that OK?
This is fully okay.
I also have to leave now.
EDIT: could you split this thread in a way, that our chroma-discussion is located in a new thread?
mantis2k
23rd July 2005, 23:23
You're showing your lack of knowledge again. The best players analyse the video to determine the appropriate mode of decombing to use. So they do "know about" the nature of the source video.
In that case, the deinterlacing software should also be able to analyse the source when converting to progressive. I shouldn't need to know anything specific about my DVD video.
Like me, he hasn't the time to repeat existing explanations for every newbie that arrives wanting to be spoonfed.
I'm not asking for a big explanation. He could atleast say which software each script/function uses, to put them into context. He's just being lazy, and I doubt English is his native language either.
Within the domain of this site and it's history, his comments are very well placed in context.
Not everyone who visits this site is a part of the board's history. Your comments are bordering on elitism.
loadplugin("dgdecode.dll")
loadplugin("leakkerneldeint.dll")
MPEG2Source("kungfu.d2v",upConv=true)
leakkerneldeint(order=1,threshold=0)
You're getting ahead of yourself again, like Mr. Brain. Correct me if I'm wrong, but I assume you're biased towards AviSynth, which in turn uses TMPGEnc? Well, TMPGEnc is not the best MPEG encoder on the market, and downgraded my video last time I tried it, making it appear too bright. Anyway, I'm willing to give your scripts a try, so can you please tell me how to use them? If it's too much trouble, just give me a link to a guide/tutorial...
@mantis: why are you capturing to lossy MPEG2?
I'm capturing to DVD, which in turn uses MPEG2 video streams.
the video is blocky and totally smoothed.
That's because it's from a rare VHS tape, which is not original or the best of quality to start with.
loadplugin("D:\x\dgdecode.dll")
loadplugin("D:\x\decomb.dll")
mpeg2source("man.d2v")
# crop away black borders
crop(0,72,0,-96)
# match fields
telecide(order=1,guide=2,post=0)
#shift chroma and remove chroma flicker
mergechroma(crop(0,4,0,0).addborders(0,0,0,4).blur(0,1))
# convert image size to NTSC
converttoyuy2()
last.lanczosresize(last.width,round(last.height/1.2))
addborders(0,ceil((480-last.height)/2),0,floor((480-last.height)/2))
Wow, I didn't realise you guys had the time of day to insert comments into your code! :p
Thanks for all your help so far! However, I don't wish to muck around with the boarders!? Surely, the picture would look the wrong aspect ratio when authored back to DVD?
Guest
24th July 2005, 01:33
He's just being lazy...
You're getting ahead of yourself again, like Mr. Brain.
Wow, I didn't realise you guys had the time of day to insert comments into your code! You've just crossed the line, mantis2k. We're trying to help you and you respond with insults. Please see forum rule 4. Thank you.
:readrule:
Guest
24th July 2005, 01:35
could you split this thread in a way, that our chroma-discussion is located in a new thread? I can't do it because I'm not a moderator on this forum. We can resume in the Avisynth development forum if you like.
mantis2k
24th July 2005, 01:52
You've just crossed the line, mantis2k. We're trying to help you and you respond with insults. Please see forum rule 4. Thank you.
:readrule:
No need to feel insulted! Noticed the smily I used after my comment, indicating that I was joking being sarcastic... If I've violated a rule then you've also violated the same rule several times, by some of your comments towards me.
mantis2k
24th July 2005, 02:08
scharfis_brain (copied and pasted),
Do you personally feel insulted that I referred to you as Mr. Brain because I couldn't remember the first part of your nickname?
communist
24th July 2005, 13:11
I'm not asking for a big explanation. He could atleast say which software each script/function uses, to put them into context. He's just being lazy, and I doubt English is his native language either.
AviSynth + mentioned external plugins which can be found here:
www.avisynth.org
Also his explanations make totally sense to me and my native language isnt English either :p
You're getting ahead of yourself again, like Mr. Brain. Correct me if I'm wrong, but I assume you're biased towards AviSynth, which in turn uses TMPGEnc? Well, TMPGEnc is not the best MPEG encoder on the market, and downgraded my video last time I tried it, making it appear too bright. Anyway, I'm willing to give your scripts a try, so can you please tell me how to use them? If it's too much trouble, just give me a link to a guide/tutorial...
Yes you're wrong - AviSynth has nothing to do with TMPGEnc. TMPGEnc is an MPEG Encoder, AviSynth is a frameserver using a scripting language that can be easily learned. For an overview / manual how to use AviSynth have a look at the abovementioned link.
I'm capturing to DVD, which in turn uses MPEG2 video streams.
That's because it's from a rare VHS tape, which is not original or the best of quality to start with.
Capturing lossless or *almost* lossless would have saved you from the blocks introduced by the real time encoder used in your DVD recorder and would allow for some cleanup and improved picture that you could have encoded to MPEG (for DVD).
Thanks for all your help so far! However, I don't wish to muck around with the boarders!? Surely, the picture would look the wrong aspect ratio when authored back to DVD?
Hence they added the AddBorders (http://www.avisynth.org/AddBorders) command to AviSynth ;)
mg262
24th July 2005, 17:02
Can I add to @communist's answer:
If you're working from VHS, please read the analogue capture guide; it tells you, among other things, that AVISynth is unrelated to any encoder, that capturing in MPEG is (to put it mildly) not the preferred method and, perhaps of more use to you at the moment, exactly how you should preserve the aspect ratio. I believe it also has an introduction to using AVISynth in it.
Out of curiosity, may I ask what you are capturing? (Preservation of old tapes -- mainly children's programmes! -- being my main interest.)
Grrr.. the speech recogniser posted this before I was finished again. I wanted to say one other thing, which is that in a limited medium like this, it can be very hard to read the tone of people's posts. So it is best to try and make sure that there is absolutely no way that your comments can be interpreted as being aggressive, sarcastic or critical unless that is really what you intend (and if that is really what you intend then you would be better off starting flame wars on USENET). Something to bear in mind is that, despite the fact that they have answered these questions literally hundreds of times, @scharfis_brain and @neuron2 still seem to take the time to keep answering them... so it is if nothing else more polite to say 'I'm sorry, I really didn't understand that, could you give me an idea of what terms to search for so I can' rather than that something 'makes no sense to the average person'.
scharfis_brain
26th July 2005, 15:24
@neuron2: Did you've got some time to check my claims?
Guest
26th July 2005, 16:34
@scharfis_brain
Sorry, not yet. Can you supply a clip that demonstrates your point of view, i.e., one that is encoded interlaced but looks better when upsampled progressively after deinterlacing?
scharfis_brain
26th July 2005, 17:19
have a look on your FTP.
There I've placed a m2v & a avs file demonstrating the difference between
dumb interlaced upsampling
dumb progressive upsampling
and
motion adaptive upsampling
Guest
26th July 2005, 19:42
have a look on your FTP. What is fc.avs and where do I get it?
Please state what the results are according to you for the three methods.
Paulcat
26th July 2005, 19:51
Mantis2K: Considering the pool of knowledge represented by a small group of people, it's easy to feel pretty dumb here. Of course, since they have had to answer the same questions over and over, they tend to get sarcastic themselves.
Considering your original question, what I would do is separate your audio and video (from the dvd) into separate streams (DVD Decrypter will do it quite efficiently). You can load your *.M2V file into tmpgenc and reprocess it, all you really have to do is re-size it, and leave the framerate at 25fps (assuming a PAL source). To check if the video is interlaced, look under SETTINGS, ADVANCED and double click on DEINTERLACE. You can turn off the filter and look at the image to see if there are interlace lines (will be obvious!), then you can choose odd field or even field and activate the filter.
(Make sure you encode as non-interlaced!!)
When you are done, you will have a 25fps progressive 720x480 *.m2v file. Run that through DGPulldown to change the 25fps to 29.976 and use your favourite dvd authoring tool to re-multiplex your original audio and your new video file, and, voila!
scharfis_brain
26th July 2005, 21:58
@neuron2: whoops. I forgot to delete those lines.
just knock out all this fc() stuff.
it is just a framecache.
then, when the script is running, you should clearly see, that
- progressive upsampling brings far more detailed static chroma but destroys interlacing
(similar, as if I would resize interlaced video without progressive treatment!)
- interlaced upsampling reduces detail of static areas (toally jaggy, do a zoom to get a 1st-time impression!) but leaves chroma-interlacing intact
(similar, like stupid interlaced resizing of progressive video)
- motionadaptive upsampling combines the advantages of both sampling type.
additional (thanks to TDeint) it does a ELA-interpolation of moving (interlaced) areas.
So it is like doing a motion adaptive interaled resizing like I earlierer recommended:
motionadaptivebob()
resize()
assume?ff().separatefields().selectevery(4,0,3).weave()
if you take a closer look at my function yv12toyuy2_laced() you will see, that it uses exactly the same method!
You may also try to replace tdeint with leakkerneldeint.
Guest
27th July 2005, 17:09
I've forgotten how unreliable the progressive_frame flag can be! Gosh, I've even posted many times about that. I must be getting senile.
So, your clip is downsampled progressively, but the progressive_frame flag is left at 0. Unfortunately, this is a common error, because the progressive_frame flag does not affect the decoding process in any way and is just there to guide the display process, so it can be wrong without affecting the decoding of the picture.
If the progressive_frame flag is unreliable, then we move into the realm of image heuristics, of which your solution is an example. If the flag is reliable, then upConv=true is satisfactory.
Interestingly, there is a patent describing an approach similar to yours:
http://www.freshpatents.com/Chroma-upsampling-method-and-apparatus-therefor-dt20050210ptan20050030422.php?type=description
I'm thinking of making a native conversion plugin that does this.
Interestingly, with your clip, if you compare upConv=true to ConvertToYUY2(interlaced=true), you would expect them to be the same, because the progressive_frame flag denotes interlaced. But the upConv=true way looks better, even though some artifacts are still visible. I'm curious about why. I'll look into it.
EDIT: I'm not sure of this anymore. As you say, interlaced upsampling preserves the interlacing, so that suggests that it really is downsampled as interlaced. I have to ponder some more. The content appears to be field-blended progressive from an NTSC->PAL conversion. I wonder how that affects things, because that's not traditional interlacing. Maybe the encoder had downsampled some frames progressively and some interlaced but without bothering to set the progressive_frame flag.
EDIT2: Negative on the speculation that the encoder had downsampled some frames progressively and some interlaced, because in a frame showing interlacing, if you upsample progressively you get rid of the CUE but mess up the interlacing, while if you upsample interlaced you keep the interlacing OK but have the CUE. Hmm. Very strange. I'm going to think how this mess could have arisen as a consequence of the field-blending format conversion. I do agree that the heuristic approach appears to be the right way to go -- for this video at least.
Guest
29th July 2005, 02:41
@scharfi,
I've convinced myself that the presence of areas that upsample better interlaced and areas that upsample better progressive in the same frame is an artifact of the field blending process *for the clip that you provided*.
I'd be very interested to hear if you have any examples where you see this phenomenon in a clip that is not field-blended; that is, dual areas within the same frame. Of course I also acknowledge that the progressive_frame flag can be outright wrong, but that would affect the whole frame.
I think another possible case would arise from applying the upsampling to a frame that has been progressively downsampled but then pulled down so that portions of it are interlaced. It was to avoid this case that I preferred upConv=true (because it upsamples the encoded pictures and not the pulled-down frames). Another reason is to avoid having to use image heuristics to determine per frame which upsampling to use, but that assumes that the flags are reliable.
You've certainly convinced me that there is (possibly a lot of) video that cries out for adaptive chroma upsampling. I'm wondering if we've been unnecessarily making lots of poor upconversions due to this phenomenon, and whether we should make a fast native adaptive upsampler for the Avisynth core.
I would appreciate hearing your views about this. Thanks for yet again stimulating some new arrangements in my neurons, especially neuron number two.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.