Log in

View Full Version : 1080i29.97 to 1080p25


MrVideo
10th January 2012, 08:14
There is an experiment that I'd like to try. The reference source is the ITV series Downton Abbey, as aired via PBS here in the states.

As the title indicates, I'd like to see if I can get it back to 25p. NBCU is the production company and those airheads have decided to not create a 1080i25 Blu-ray release, instead for both series releases, a butchered 29.97 release.

In any event, what would be the best filters to try and diddle with to get it back to 25p?

If a short video sample is necessary, with a lot of motion, I can provide said short sample and place it on my server for downloading.

I am not an AVISynth guru, simply a novice, hence the asking of help from those who do know the filters that are available.

Thanks.

ajk
10th January 2012, 12:16
It depends on how the conversion has been done. A sample would indeed help.

Atak_Snajpera
10th January 2012, 14:37
it should be relatively easy If they did 25 fps (slowdown) -> 23.976[p] fps (Telecine) -> 29.97[i] fps . However I suspect that they chose probably a "more pro" way ;)

MrVideo
11th January 2012, 08:28
Sorry about not responding sooner. The editing program I use decided to puke on itself. After I finally got it working, I was behind on my editing.

And yes, a professional engineering who lives in the U.K. surmises that slowdown was not used and that a more expensive piece of gear was used .

The sample is at: http://vidiot.com/DowntonAbbey-Sample.ts

ajk
11th January 2012, 10:54
I'm at work and only have limited avisynth capabilities at the moment, but I did a quick SeparateFields() and examined the output. I don't see any blended fields or obvious motion compensation traces, just clean fields with either 2 or 3 repeats. I did a quick count of the separate images within 60 fields and it looks like the source frame rate could be 23.976. Seems like a pretty regular IVTC case to me (and afterwards a conversion to 25 fps if that was the desired target), perhaps someone else can double-check.

MrVideo
11th January 2012, 18:09
If you put the sample into a video editor that shows each field of the frame, without deinterlacing, then you'd see that the normal 2:3 pulldown pattern does not exist. Normally one would see what looks like three progressive frames followed by two frames with different images. In this case there can be two to four fields that look progressive and three to four mixed field frames.

It is most definitely not 2:3 pulldown. I wish it were.

Didée
11th January 2012, 18:56
PAL-to-NTSC Pulldown is 2:3:2:2:3

The simple way is this:

tfm() .tdecimate(cycle=30,cycleR=5)


Which leaves you, of course, with a 24.975 fps PAL video instead of 25.0.

From the short sample it can not be told if they pulled 25.0 to 29.97 directly, or if the 25.0 were first slowed down to 24.975, and then pulled to 29.97.

You need to count about 2000 fields to be sure. :)

MrVideo
11th January 2012, 19:42
OK, here are two more samples, about 80 MB each, both containing a little over 1100 frames.

http://vidiot.com/DowntonAbbey-Sample-2.ts
http://vidiot.com/DowntonAbbey-Sample-3.ts

Didée
11th January 2012, 21:20
Probably a misunderstanding. With
You need to count about 2000 fields to be sure. :)
, I meant the you-you, not the someone-you. And definetly not the me-you. :)

MrVideo
11th January 2012, 21:49
Sorry. I was planning on running a test on a long segment of the program. The computer I use for rendering has been busy catching up on other stuff.

I figured that you had your AVS script already written, that you ran the initial sample through it and would be easy to run a longer segment.

My piece of code segment will be more like:

tfm()
tdecimate(cycle=30,cycleR=5)

I'm not sure what the period before tdecimate does, as I put each entry on its own line.

IanB
11th January 2012, 22:48
:Edit: The period is the chaining operator, the result is the same

To clarify what Didée said, when using a PAL-to-NTSC Pulldown pattern of 2:3:2:2:3 the result is 25*6/5=30 fps which is 1.001 times slightly to fast for true NTSC.

There are 2 common solutions that get used :-

1. Slow the input PAL source down 0.1% to 24.975 fps. This results in a stable 2:3:2:2:3 pattern for the whole video.

2. Do not triple duplicate one set of fields every 1001 fields. This results in an astable 2:3:2:2:3...2:3:2:2:3:2:2:2:2:3:2:3:2:2:3...2:3:2:2:3 pattern with each 84th group being a 2:2:2:2:3 pattern.

So you, MrVideo, need to check the result is still matching correctly after 1001 frames and then after 2002 frames. If they used case 1 everything is simple, if they used case 2 things become a slight PITA and your script needs to handle a 1001 field cycle as well as the 12 field cycle.

MrVideo
11th January 2012, 23:03
Thanks for the info on the period.

If case #2 is indeed used, I wouldn't have a clue as to what to write as a script. But, we'll cross that bridge when I get there. Right now the render boc is busy so I can't test.

The other issue is to what to do with the Masterpiece intro that is before the program and the 29.97 credits that are at the end. :D

IanB
11th January 2012, 23:23
Yes no need to worry until you have to :D

With the intro, UMM? Leave it, convert it bash, convert it with MTools, hard choices.

With credits, maybe slow down to 25 fps and repeat verses of the theme music to keep the length compatible.

MrVideo
11th January 2012, 23:51
I'm thinking of just letting it all run through the conversion. The intro is just talking head stuff anyway. So what if she looks a little funny at a different frame rate :D

manono
12th January 2012, 03:16
The other issue is to what to do with the Masterpiece intro that is before the program and the 29.97 credits that are at the end. :D
Have you said what the output format is to be? If for NTSC DVD just encode the intro and the credits at their correct framerates and join all three sections when authoring with Muxman. If they all output 29.97fps, then it's no problem.

And practically, in my opinion, I don't think you have to worry about any possible extra frames when decimating. The:

tfm() .tdecimate(cycle=30,cycleR=5)

should work fine. And again, if for DVD, just run DGPulldown when done for 24.975->29.97fps.

MrVideo
12th January 2012, 03:30
I don't want to sound elitist, but DVD? Everything I do these days is HD. I haven't decided if I'll author to Blu-ray or wrap in MKV for viewing.

manono
12th January 2012, 04:34
That's OK, you can sound elitist. :)

You didn't say what the the intro is like, but for interlaced 29.97fps credits something like:

AssumeTFF()
Yadif(Mode=1)
ChangeFPS(49.95) #twice the 24.975, or use 50 if making it true 25fps
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()

should keep it interlaced at 24.975fps and playing reasonably smoothly.

MrVideo
12th January 2012, 04:56
I'm doing a test coding at the moment of just less than 15k frames

@manono:

As I'm working on converting to 24.975p, keeping the intro interlaced would end up not matching the rest of the project. I'm assuming that the Weave() would be dropped?

manono
12th January 2012, 05:38
Oh, I see, you want to make the whole thing progressive. That script I gave above makes interlaced 24.975fps of the end credits. So, maybe:

QTGMC( Preset="Medium")
ChangeFPS(24.975)

for the end credits. But you'll have problems whatever you do (unless doing it with frame interpolation, which may present new problems) and those credits won't play entirely smoothly. But we still don't know what the intro is like. Is it interlaced 29.97fps like the end credits or something else? IanB alluded to the problem earlier. And maybe now one begins to understand why the Blu-Ray was created as it was, if they had to use the same opening and end credits.

MrVideo
12th January 2012, 06:05
@manono:

I don't know if you watch PBS, or not, but as a network they are 1080i, though there are affiliates that downconvert to 720p because of multiple SD subchannels making 1080i look like crap. The opening Masterpiece Classic sequence is shot using 1080i video.

So, both the opening sequence and closing credits are 1080i.

What is released on Blu-ray does not contain any of the Masterpiece Classic pieces of video. The retail releases only use program material. AIUI, the retail releases use the original air edits used in the U.K. Just not 1080i25 in the U.K.

Have you seen the credits that WGBH creates for Masterpiece? The scrolling credits are small and go by so fast that the interlacing sucks. I do not care if they get speed butchered. As for the opening sequence, the talking head isn't moving much. The motion is contained in the Masterpiece opening credit sequence.

I don't see how the two new lines of code fit into what you previously listed. Like I said, I'm a novice at AVS scripting and have a lot to learn.

Thanks.

ajk
12th January 2012, 06:20
The idea is that you use Trim() to separate the end (and start?) credits from the rest of the material, and process them with the deinterlacer (QTGMC, or you can just try with Bob() first if you don't have QTGMC set up). Then you have 59.94 fps progressive credit sections. After this you use ChangeFPS(24.975) so they fit in with the actual content. ChangeFPS() will pick the necessary amount frames to achieve the desired fps. Since 24.975 does not neatly divide into 59.94, there will be some stutter in the movement, but the length will be correct and you won't need to mess with the audio track. Finally you just combine the segments again:


video = xyzSource("...")

a = video.Trim(0,1000) # intro/credits
b = video.Trim(1001,2000) # actual content
c = video.Trim(2001,3000) # end credits

a = a.QTGMC(...).ChangeFPS(...)
b = b.TFM(...).TDecimate(...)
c = c.QTGMC(...).ChangeFPS(...)

return a ++ b ++ c

MrVideo
12th January 2012, 06:30
All video that I process is pre-edited using the VideoReDo program. I also use it to separate the file into elementary streams. The audio isn't even touched. So, I would separate out the intro video and the closing credits video for processing. I would then take the MKV wrapped pieces and edit them together with VideoReDo.

ajk
12th January 2012, 07:25
Yes, you can do the trimming and joining outside of AviSynth if you wish.

manono
12th January 2012, 07:43
Yes, I watch PBS all the time but have never capped anything from a TV.

My earlier one was for keeping the end credits interlaced. Later I switched to making them progressive. Earlier I used Yadif as the bobber (as it doesn't make much difference quality-wise). Later I switched to using QTGMC as the bobber (as you'll be keeping the whole frames rather than using fields from the frames). Anyway, someone else may have different and better solutions. Converting interlaced 29.97fps into progressive 25fps isn't a whole lot of fun.

Edit: What I propose is exactly what ajk is suggesting. Except for some reason he used ChangeFPS when describing it but ConvertFPS when showing the script example.

MrVideo
12th January 2012, 07:52
That way I know exactly where I'm cutting, can add black to have extra head/tail and for editing pieces together, etc.

The 10 min test piece came out perfect. I saw nothing while watching to indicate any kind of hiccup and when looking at various sections frame by frame in the editor, everthing turned out great there as well. There was one frame of blotched video. I thought it might be the result of PBS editing that resulted in the blotchy video. But, when I looked at the source, it appears that their encoder screwed up, messing up a field. That messed up field caused a frame hiccup. Watching a speed, it isn't noticeable.

And yes, it was the PBS encoder, as I capture the PBS Ku HD network feed. The bitrate sucks, being around 17.5 Mbps. For a network feed, that sucks.

Next on the list, to try the two lines of code you indicated on the intro and credits.

MrVideo
12th January 2012, 08:44
Once I got QTGMC installed, the script aborted with ConvertFPS complaining that the frame rate was too low and must be greater than 39.9600.

EDIT: ChangeFPS appears to be working, but damn, it is slow.

ajk
12th January 2012, 09:03
Oops, yep, sorry about the confusion, was just about to leave when I posted that. ChangeFPS is of course the one you would want, ConvertFPS adds blending.

ChangeFPS should not be at all slow, though QTGMC is.

MrVideo
12th January 2012, 09:20
ChangeFPS should not be at all slow, though QTGMC is.

Bad wording on my part. I meant the whole chain of QTGMC and ChangeFPS was slow. But yes, logic would indicate that it wouldn't be ChangeFPS :D

MrVideo
12th January 2012, 21:26
Damn, the conversion of the intro and credits from 29.97 to 24.975 resulted in a wonderful side effect. It converted this crap:

http://vidiot.com/images/PBS-HD-Masterpiece-DowntonAbbey-S2-1a.png

into this:

http://vidiot.com/images/PBS-HD-Masterpiece-DowntonAbbey-S2-1b.png

While there is some judder, it is not objectionable.

Thanks to all who responded for the help.

MrVideo
12th January 2012, 21:27
Yes, I watch PBS all the time but have never capped anything from a TV.

So, you've never kept any PBS show?

manono
12th January 2012, 22:51
Kept? I have some on DVD.

You can thank QTGMC for the improvement in the appearance of the end credits. I'm glad it worked out for you.

MrVideo
13th January 2012, 00:08
Ya, QTGMC did a great job on all of the video. Thanks to all for the suggestion.