Log in

View Full Version : HDTV to DVD -- Odd framerate conversion


DoctorM
27th July 2011, 06:00
I'm trying to convert a 1080i TS file to DVD, but I'm completely lost on what to do about the frame rate.

I'll admit I'm a bit of a n00b when it comes to HD sources, and I assumed it would be 29.97i or some such flavor, but Mpeg2Repair reports: 1920 x 1080, 29.97 fps (24.13 fps Telecine)

Examining the frames, the video is progressive. I thought maybe it was 29.97p and I started with assumefps(29.97). Too far off.

So then I guessed the telecine info meant 23.976 or 24 with pulldown flags, but 23.976 made the video longer than the audio as did 24fps.

So mpeg2repair was right and assumefps(24.13) syncs the audio and video lengths.

I just don't know where to go from there. changefps(23.976) would probably make a jerky conversion as would a decimate filter (there doesn't appear to be any duplicate frames).

If it were an even 24fps I guess dgpulldown would work, but it's not even.

I'm sort of left wondering if I need to assumefps(23.976), then re-encode the audio and subtitles to slow them for the speed change.

None of it sounds right in my head. Is this normal for HDTV? My Googling is coming up with nada on how to deal with this properly.

Edit: Correction there is some occasional interlace artifacts (but it's largely progressive and not the 3:2 pattern you'd expect). Since the source is mpeg2, it can't be something like MBAFF can it?

MrVideo
27th July 2011, 07:44
There is no 1080p that is broadcast, it is 1080i. It may look progressive, because of the 2:3 pulldown, but it is 1080i. I think DirecTv, or Dish, is trying to do some 1080p, but I think it is 1080p23.976.

Too bad you are trying to throw away all of that good HD video.

I don't know what program you are trying to use (it would have been nice to indicate what you are using and how you are using it).

Since DVD video wants to be 29.97 interlaced, you should leave well enough along and encode to 720x480i29.97, tff (top field first), anamorphic widescreen.

DoctorM
27th July 2011, 08:00
Is it then some sort of hybrid frame rate with pulldown flags?
Previously set DGIndex to ignore flags, and unless I use assumefps(24.13), the audio and video do not sync.

Edit (post above edited for clarity): I didn't know 1080i could use pulldown flags, but that's obviously the case here.
I'm assuming this is some poorly conceived telecining (since without flags the framerate is strange, there are duplicate frames ever several hundred or so, and infrequent combing artifacts).

I reran DGIndex set to honor flags.
My new script looks like this:
loadcplugin("yadif.dll")
mpeg2source("Source.d2v",cpu=2)
BT709ToBT601()
TFM(pp=2,clip2=yadif(mode=0),d2v="Source.d2v")
tdecimate()

spline36resize(720,480)
ConvertToYUY2()

I know Yadif isn't the best for quality, but I figure it's better than the default deinterlacer in TFM, and fast enough that my PC doesn't take forever to process.

Anyway, does this sound like a good idea?

manono
28th July 2011, 03:05
If this is a TV cap, many shows drop fields in order to speed up the video so they can fit in more advertising. I can very well believe it's really 24.13 but, not having the source, couldn't swear to it.

If it were an even 24fps I guess dgpulldown would work, but it's not even.
You can set the framerate in the script at 24.13fps, add an assumeFPS(23.976) at the bottom so your encoder will accept it, encode at 23.976fps, and then apply DGPulldown afterwards for 24.13->29.97. DGPulldown can be used for any 'base' framerate, just about (19.98fps up to 29.97fps for NTSC). If it's really 24.13fps, doing a standard IVTC will remove unique frames making it play slightly jerky.

If there are only a few interlaced frames every now and then, you could use something like Vinverse to clean them up, or some other conditional deinterlacer (TDeint(Full=False)).

Just out of curiosity, when you run the Preview in DGIndex, is it reported as Progressive?

MrVideo
28th July 2011, 05:07
If this is a TV cap, many shows drop fields in order to speed up the video so they can fit in more advertising. I can very well believe it's really 24.13 but, not having the source, couldn't swear to it.

The broadcast frame rate is 29.97 for 1080i and 59.94 for 720p. Period!

I only deal with the broadcast networks, no cable/DBS channels, though I've seen the results of many shows having inverse telecine being done on them and not being anything but 23.976 fps.

That said, the only network that I know that screws up the 2:3 pulldown cadence is ABC. Not on all shows, but a majority of them. I don't watch CBS, so I don't know. But, I've not heard that they do. Fox, NBC and The CW do not.

The AVIsynth inverse telecine filters do a great job on the ABC programming and produce a great looking 23.976 result.

I don't believe the 24.13 frame rate either.

There are two choices, because the result must be a a standard frame rate.

Use AVIsynth and inverse telecine to 23.976 and I'll bet that the results will be just fine.

Don't overthink it.

manono
28th July 2011, 05:33
The broadcast frame rate is 29.97 for 1080i and 59.94 for 720p. Period!.
Why are you stating the obvious? Of course I'm talking about the 'base' framerate, what's left after the removal of the dupe frames/fields.

DoctorM
28th July 2011, 18:20
The source was a made for TV flick on a basic cable channel.
Set to ignore flags, DGIndex reports 29.97fps and 96.86% film.

@MrVideo - Do you think my script in post 3 would be good then?

@manono - I'll try forcing it into 23.976 first. If the movement is jerky I'll try 24.13 with pulldown.
I suppose at 24.13, the correct thing to do would be to separate fields before resizing to keep from blurring any of the interlaced frames.

manono
28th July 2011, 19:03
I suppose at 24.13, the correct thing to do would be to separate fields before resizing to keep from blurring any of the interlaced frames.
No, the correct procedure is to make it progressive first before doing the resizing. Maybe it really is 23.976fps. Not having it there's no real way for me or anyone else to know. I'm only going by you saying using an AssumeFPS(24.13) in the script kept the audio and video in synch.

And you'll probably never want to actually make a D2V using 'Ignore Pulldown Flags' as that's a recipe for out-of-synch audio.

DoctorM
28th July 2011, 21:44
No, the correct procedure is to make it progressive first before doing the resizing. Maybe it really is 23.976fps. Not having it there's no real way for me or anyone else to know. I'm only going by you saying using an AssumeFPS(24.13) in the script kept the audio and video in synch.

And you'll probably never want to actually make a D2V using 'Ignore Pulldown Flags' as that's a recipe for out-of-synch audio.

True, I didn't think that through.

Ideally would be a way to actually export the flags, use separatefields().spline36resize().weave() and then after encoding re-add the flags. That would give an identical output.

I know DVDRebuilder uses that method, which is great, but I've never heard of a way to do that manually to something.

If the video is hybrid though, a simple decombing, resize and then pulldown from 24.13 to 29.97 could yield video that speeds up and slows down in places.

I'll just have to play around and see what happens at this point.