[RESOLVED] Amount of coded frames different than playback

Support forum for DGDecNV
Post Reply
DAE avatar
shortkud
Posts: 2
Joined: Mon May 30, 2011 3:17 am

[RESOLVED] Amount of coded frames different than playback

Post by shortkud »

DGDecNV shows a different amount of coded frames against playback frames for most HBO/Showtime shows. This causes issues when trying to encode back to 23.976 fps from 29.970 as DGDecNV has removed needed frames. I believe this issue is avoided in DGIndex by choosing No to the fix d2v prompt.

I'm using version 2039.

Source Sample:
http://shortnet.biz/dgnv/bloodtest.mpg

Code: Select all

Stream Type: Program
Video Type: MPEG2
Profile: main@high
Coded Size: 1920x1088
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 29.970030 fps
Colorimetry: BT.709 [1]*
Frame Structure: 
Frame Type: 
Coded Number: 2009
Playback Number: 2399
Frame Repeats: 0
Field Repeats: 780
Bitrate: 
Bitrate (Avg): 
Bitrate (Max): 
Audio Stream: 80: AC3 2/0 48 384
Elapsed: 0:00:00
Remain: 0:00:00
FPS: 
Info: Finished!
http://shortnet.biz/dgnv/weedstest.mpg

Code: Select all

Stream Type: Program
Video Type: MPEG2
Profile: main@high
Coded Size: 1920x1088
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 29.970030 fps
Colorimetry: BT.709 [1]*
Frame Structure: 
Frame Type: 
Coded Number: 2218
Playback Number: 2549
Frame Repeats: 0
Field Repeats: 663
Bitrate: 
Bitrate (Avg): 
Bitrate (Max): 
Audio Stream: 80: AC3 3/2 48 384
Elapsed: 0:00:00
Remain: 0:00:00
FPS: 
Info: Finished!
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Amount of coded frames different than playback

Post by admin »

You have pulldown flags. See the count in the field repeats box? Do you know what pulldown is?

For the first one:

2009 + 780/2 => 2399

Technically it's a mix of hard and soft pulldown. You need to honor pulldown flags in DGSource() and use IVTC in your script. You cannot force film this because the soft pulldown is not steady 3:2.
DAE avatar
shortkud
Posts: 2
Joined: Mon May 30, 2011 3:17 am

Re: [RESOLVED] Amount of coded frames different than playbac

Post by shortkud »

I do understand pulldown and IVTC, that is what I was trying to accomplish.

What I didn't know was that deinterlace=1 forces fieldop=2 (as per the manual). Is there a technical reason for this?

Also I understand the descriptions of Honor and Ignore Pulldown Flags as written, but if you are honoring the pulldown flags shouldn't the frames be repeated and vice versa?

Thanks in advance for your time.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] Amount of coded frames different than playbac

Post by admin »

shortkud wrote:What I didn't know was that deinterlace=1 forces fieldop=2 (as per the manual). Is there a technical reason for this?
Yes, but I can't remember right now what it was. If you search you'll find an explanation because I remember writing about it several times.
Also I understand the descriptions of Honor and Ignore Pulldown Flags as written, but if you are honoring the pulldown flags shouldn't the frames be repeated and vice versa?
You mean with deinterlacing enabled? If you are not deinterlacing on the GPU, then you can enable fieldop=0 to honor pulldown.

It seems pretty clear to me, so I suppose I am missing the point of your question.
DAE avatar
Nick007
Posts: 38
Joined: Wed Sep 29, 2010 12:20 pm

Re: [RESOLVED] Amount of coded frames different than playbac

Post by Nick007 »

Make sure you understand what telecine (3:2 pulldown is) and how to remove it to make the video fully progressive without dupe frames (causing jerky playback).

3:2 pulldown that is used on most 29.97 fps 1080i HDTV caps means, that there always are 3 unique progressive frames followed by two interlaced frames. When the two interlaced frames are deinterlaced together with 3 progressive you get 5 frames where 2 frames are same.

Best way to do inverse telecine (IVTC) is to honor pulldown flags in DGDecNV (video remains at 29.97 fps) and then you use TFM().TDecimate() in your Avisynth script (you need to have TIVTC.dll library in your Avisynth's plugins folder). If you step the 29.97 fps video in AvsP you'll clearly see how progressive and interlaced frames switch. Study it and it'll be clear to you. (note for completeness: when using FFMS2, you must use rffmode=1 parameter for honoring pulldown)
Post Reply