Page 1 of 1

Question about I-frames in h.264 files

Posted: Wed Mar 09, 2011 4:44 pm
by laserfan
While the DGDecNV toolset knows the two types of I-frames possible in h264 videos--regular I-frames, and IDR frames, when I use debug=true I only ever see "I" with "Frame Coding Type:", never "IDR". Is there a way to tell the difference using the debug info? Or (easily) cross-check the VDub screens with the .dgi data (is it within that number that appears after "IDR")?

If a way to match the .dgi's frame type with a frame number is in the manual, I was not able to find it, sorry. :oops:

Re: Question about I-frames in h.264 files

Posted: Thu Mar 10, 2011 8:59 am
by admin
Thank you for pointing out this deficiency. I will add two things:

1. A frame number on the FRM lines in the DGI file.

2. Show IDR and I instead of just I in the DGSource() debug output.

Re: Question about I-frames in h.264 files

Posted: Thu Mar 10, 2011 4:14 pm
by laserfan
neuron2 wrote:Thank you for pointing out this deficiency. I will add two things:

1. A frame number on the FRM lines in the DGI file.

2. Show IDR and I instead of just I in the DGSource() debug output.
Great, thanks a lot DG for your attention--your efforts, skills, and expertise are much appreciated.

Re: Question about I-frames in h.264 files

Posted: Fri Mar 11, 2011 7:07 am
by dtv_user
Hi Don:

I recently purchased a license to your DGAVCIndexDI program and am very pleased with it.

Thanks for all the hard work and support to the community.

I think me and laserfan have the same goal in mind - that is to find the most accurate entry point for a IDR frame when making chapter points in tsmuxer.

With your vast knowledge I thought you might be able to help.

I would like to know how to get the timecode from the tp_extra_header in m2ts files with 192 byte packet size.

I think this tp_extra_header is what the clpi file index table is using when jumping to chapter points.

The tp_extra_header looks to be the PCR from the video packet in the current frame.

I just don't know how to convert this to timecode. Looks like it might need to reference the time from the first packet in the file.

Any help you could provide would be greatly appreciated.

Long time admirer and user of your programs
Bob

Re: Question about I-frames in h.264 files

Posted: Fri Mar 11, 2011 8:39 am
by admin
The first 4 bytes before the packet sync 0x47 make a 32-bit word. Discard the first two MSB bits and you have an arrival timestamp. For more details you'll have to have a look at the bluray spec.

Re: Question about I-frames in h.264 files

Posted: Fri Mar 11, 2011 10:40 am
by dtv_user
Thanks Don.
I don't have access to the bluray spec. but I'll try to continue my online search for more information.

Bob

Re: Question about I-frames in h.264 files

Posted: Fri Mar 11, 2011 6:19 pm
by dtv_user
Don:

Indexing the same file I see different results in the index files.

With DGAVCDec109 my first IDR frame is located at offset 1422 in the .dga file.
With DGAVCDecDI the first IDR frame is located at offset 1421 in the .dgi file.

I have been using DGAVCDec109 for my encoding before purchasing a license for DGAVCDecDI.

Did you change to a zero based orgin on DGAVCDecDI ?

Thanks in advance.
Bob

Re: Question about I-frames in h.264 files

Posted: Fri Mar 11, 2011 10:06 pm
by admin
DGAVCDec109 was withdrawn = does not exist.

And it's off topic for this thread anyway.

Re: Question about I-frames in h.264 files

Posted: Sat Mar 12, 2011 6:40 pm
by dtv_user
@admin

Sorry Don if I was posting a off topic subject.

What I was trying to ask was does DGAVCDecDI .dgi index files start at 0 orgin or 1?
I was relating this to finding the position of IDR frames which I thought was on topic.

Thank you'
Bob

Re: Question about I-frames in h.264 files

Posted: Sat Mar 12, 2011 6:53 pm
by admin
Oh sorry, I missed your point. Frame numbering is always 0-based.