Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th December 2009, 18:59   #1  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
24p->25p woes - "Euro Pulldown"?

Right now I have a 24p-based music video that has to go out to PAL DVD. This is really problematic piece of video, because the entire thing is full of tiny details (guitar strings, etc.) which cause interpolation issues with all of the motion compensated frame rate conversion tools I've tried, and really nasty interlace flicker with field-blending standards converters (and it'd be a damn shame to just blur the video to conceal this).

Wikipedia mentions another method for converting 24fps to 25fps:
Quote:
This pulldown method[4] is sometimes used in order to convert 24 frames/s material to 25 frames/s. Usually, this involves a film to PAL transfer without the aforementioned 4% speedup. For film at 24 frames/s, there are 24 frames of film for every 25 frames of PAL video. In order to accommodate this mismatch in frame rate, 24 frames of film have to be distributed over 50 PAL fields. This can be accomplished by inserting a pulldown field every 12 frames, thus effectively spreading 12 frames of film over 25 fields (or “12.5 frames”) of PAL video. The method used is 2:2:2:2:2:2:2:2:2:2:2:3 (Euro) pulldown (see below).

This method was born out of a frustration with the faster, higher pitched soundtracks that traditionally accompanied films transferred for PAL and SECAM audiences. A few motion pictures are beginning to be telecined this way[citation needed]. It is particularly suited for films where the soundtrack is of special importance.
Can AviSynth produce such a conversion? I imagine it involves some use of the "SelectEvery" function, but I'm not aware of exactly how I'd go about doing this. Can anyone help?
Lyris is offline   Reply With Quote
Old 15th December 2009, 19:50   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,080
Just use DGPulldown on it, with the 'Custom' box checked and 24->25 filled in.

http://neuron2.net/dgpulldown/dgpulldown.html
manono is offline   Reply With Quote
Old 16th December 2009, 16:48   #3  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Thanks for the link Manono. This is going out to a replicated, pressed DVD. This isn't going to break DVD-Video spec compliance, is it?
Lyris is offline   Reply With Quote
Old 16th December 2009, 17:25   #4  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,543
Use assumefps(25.000,sync_audio=true)

Frames are just sped up, not interpolated. Sound is adjusted to sync with the new framerate.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.

Last edited by Revgen; 16th December 2009 at 17:27.
Revgen is offline   Reply With Quote
Old 16th December 2009, 17:55   #5  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,374
Quote:
Originally Posted by Revgen View Post
Use assumefps(25.000,sync_audio=true)

Frames are just sped up, not interpolated. Sound is adjusted to sync with the new framerate.
If you use this approach, you will also need to resample the audio back to a standard rate for DVD, since assumfps does the time adjustment by simply changing the playback sampling rate.

But speeding the video up might be a bad idea here, since this is a music video. As Lyris said, the 'euro pulldown' "is particularly suited for films where the soundtrack is of special importance".

Last edited by Gavino; 16th December 2009 at 17:58.
Gavino is offline   Reply With Quote
Old 16th December 2009, 18:11   #6  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Compatibility is the #1 priority here. My authoring tools are pretty strict with what they accept, but I'm still not willing to lose sleep over it. If manipulating the stream in such a way could cause player hiccups, then is there no way to perform the Pulldown in AviSynth to generate an interlaced stream which I can then encode, rather than achieving the same result with Repeat Field Flags? That way I could be assured what I was doing was in-spec...

Last edited by Lyris; 16th December 2009 at 18:32.
Lyris is offline   Reply With Quote
Old 16th December 2009, 18:43   #7  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,374
If you want a pure Avisynth solution, it would be something like:
Code:
SeparateFields()
SelectEvery(48, 0,1, 2,3, 4,5, 6,7, 8,9, 10,11, 12,13, 14,15, 16,17, 18,19, 20,21, 22,23, \
   22,25, 24,27, 26,29, 28,31, 30,33, 32,35, 34,37, 36,39, 38,41, 40,43, 42,45, 44,47, 46,47)
Weave()
Gavino is offline   Reply With Quote
Old 16th December 2009, 19:02   #8  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Thanks Gavino, I'll give that a whirl. In any case though, it just occurred to me that any playback device is going to have to deinterlace in Video mode (since I don't think any solution out there would recognise this pulldown pattern!) which is going to cause aliasing anyway. I think I'm just gonna go for duplicating every 24th frame with "ChangeFPS(25)" - hardly perfect, but it's a slow-paced video so it shouldn't be too jarring.

Frickin' 50hz...
Lyris is offline   Reply With Quote
Old 16th December 2009, 20:03   #9  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,312
After manono suggested using DGPulldown, I did a bit of "research" (thank you Google), but I couldn't find anything absolutely definitive. I found at least one site claiming that the chips in DVD players simply honour any combination of pulldown flags, so if they can pulldown 23.976, they should also be able to pulldown 24 to 25, as long as the flags are right. But as I said, I couldn't find an absolutely definitive "yes it will always work" answer.

David
davidhorman is offline   Reply With Quote
Old 16th December 2009, 20:44   #10  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Frame repetition it is then. Thanks for your help, everyone.
Lyris is offline   Reply With Quote
Old 16th December 2009, 21:36   #11  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Quote:
Originally Posted by Lyris View Post
Frame repetition it is then. Thanks for your help, everyone.
It's your decision. But consider ...

Soft pulldown means 99% of viewers will have a smooth viewing experience. 1% of viewers may experience some sort of problems (and probably are already used to have them, due to their hardware).

Frame repetition means 100% of viewers will have a stuttery viewing experience.

Satisfy the vast majority of customers, or punish all customers because a minority has funky/cheapo hardware?

I'm not recommending anything, but you see in which direction my argumentation is heading. The strictly "least common denominator" is always that: the poorest solution.
(And no matter what you do ... there will always be some customers that can't play your disk correctly, for reasons nobody has thought of.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 16th December 2009 at 21:41.
Didée is offline   Reply With Quote
Old 16th December 2009, 23:11   #12  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Didee: In principle, I agree with you (well, apart from one thing: I think field-blended interpolation would be the poorest solution).
I'm going to give DGPulldown a look and test the hell out of the disc.

One of the other reasons I'd rather just repeat frames is so that progressive scan equipment's Film Mode Detection can operate and give full vertical resolution. If the DGPulldown method requires a Progressive device to deinterlace in Video mode, then it wouldn't be so great. True, repeating frames will cause stutter, but to me that seems better than flickering in fine details... anyone else's thoughts?

Stephen: it's good to know that discs have gone into replication using this technique. Is it safe to assume they used DGPulldown to achieve that? I don't think any other tools offer this option...

Last edited by Lyris; 17th December 2009 at 08:05.
Lyris is offline   Reply With Quote
Old 17th December 2009, 00:01   #13  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
soft pulldown doesn't break compatibility. i've used it quite a few times.

i'll disclaim that by saying i've used it on replicated discs and it hasn't proven a problem. i haven't observed an increase in returned discs beyond the "background level" of discs that are returned to the store because the customer is too daft to wipe their own fingerprints off a perfectly functional disc.

you'll have far more problems with the physical process of replication than with soft pulldown.

that said, a lot of users simply may not notice a problem, or not bother to return a disc if they notice one. it's a tricky area. i was lucky enough to work at a very enlightened authoring house back in the day which had returned discs sent to the office for inspection, and also had online forums where technical questions from customers were addressed directly with the authoring team. during my 2 years, no problems with pulldown came up (many other issues did mind you... only one of these was avisynth related, and i was very embarrassed by my poor choice of the dedot filter on hard pulldowned material).

so... if your authoring software is correct, it will accept the stream you give it, and the replicator will have no issue if the disc compiles nicely.

just be wary of maximum bit-rates, as these will need to be changed.

good luck!

btw, in avisynth, assuming progressive input:

changefps(50)
assumetff()
separatefields().selectevery(4,0,3)
weave()

for upper-field first output
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 17th December 2009, 00:11   #14  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
A cunning approach might be to repeat the natural duplicates in lower motion parts of the clip.

Neuron2's Dup filter normally used for making approximate duplicates exact duplicates also can log the metrics to a file. i.e. (Debug=True, Log="log.txt")

A little calcu-processing to find the natural duplicates and insert extra frames there. Probably need some rules like duplicates no closer than 10 frames and no further then 120 frames. As AV sync errors of 200ms are just detectable you could hold upto a 4 or 5 frame deficit for a short while, perhaps including some scene change detection to allow for dumping all the deficit there and maybe even go 1 frame into credit.

For 2.5.8 DuplicateFrame() takes multiple frame numbers to duplicate so you could add say 50 at a time. And Stickboy has a good selection of frame remapping tools.

Just an idle thought.
IanB is offline   Reply With Quote
Old 17th December 2009, 00:27   #15  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
What about changing every 25th frame to an average (either blended or motion compensated) of frames 24 and 26? That is, fill in the gap to make the judder a little less noticeable. That way, I could just hand-check each of the synthetic frames for artefacts (it's a 6-minute music video). Can anyone think of a way of doing that with AviSynth? My coding skills aren't quite up to that.
Lyris is offline   Reply With Quote
Old 17th December 2009, 00:53   #16  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
unless you change every frame but the 24th, there'll be noticable motion stammering whichever way you look at it. at least if it's soft pulldown it can be removed, and will give you a handy bitrate advantage.

it'll only really be noticable on smooth pans. if it's a music video it'll probably have tons of fast cuts, and flashing lights, and handheld camerawork. you wont see it on that unless you're unlucky enough to have a dup on a flash, or have very very good eyes.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 17th December 2009, 01:46   #17  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Fortunately it doesn't, because I shot it
It's an acoustic music video, so it's very slow-paced, no whip-pan camera moves, etc., and all done on a tripod.
Lyris is offline   Reply With Quote
Old 17th December 2009, 01:58   #18  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,312
Could you post a short sample? I'm curious to see if anything can be done with it. Given that it's a slow smooth shoot, it's a shame you've had trouble making a nice mo-comp'd version.

David
davidhorman is offline   Reply With Quote
Old 17th December 2009, 07:40   #19  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 587
Sure thing. I'll post a short sample of the most nightmarish shot, which shows a tripod pan of a guy playing guitar.
There is actually a similar test clip to this one on the Silicon Optix HQV test disc. Says it all. The funniest thing is, I shot the whole thing knowing full well what the delivery frame rate was going to be; I guess I'm just a glutton for punishment.

When you see the amount of detail in here, I think you'll understand why I really want to encode and playback as 100% Progressive whenever possible.

http://lyris-lite.net/temp/guitarpan.avi (~40mb, Lagarith YUY2) - link active 10 mins after post time

I would have made the disc NTSC, but the 'main event' on it is native 25fps. What a shame you can't mix 50/60hz on DVD (while staying in spec, that is) like you can on BD.

Last edited by Lyris; 17th December 2009 at 07:43.
Lyris is offline   Reply With Quote
Old 17th December 2009, 09:57   #20  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,373
For what i know, 'standard' PAL telecine only consist on speedup from 24fps to 25fps. This way, you avoid the off seing... don't know the correct english word... 'glitch' on traveling, introduced by other method. This way give advantage to video over light sound speedup. The other way described in first post, give advantage to sound over video, you'll have a 'glitch' every 0,5s.
The other option is simply to make a Blu-Ray at 24fps. Note, only 720p and 1080p are allowed at 24fps for Blu-Ray, so you may have to upscale your video if it's not at this framerate.

Last edited by jpsdr; 17th December 2009 at 10:04.
jpsdr is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.