Hi,
I have a video recorded for H.264 codec and a c program that extracts the details such as Video track, video duration, video frames,fps, video bytes,video bit rate etc. Now I want to include a switch statement that checks for an IDR frame of a GOP frame. It should keep on counting the number of p frames and b frames that appear until the next i frame is encountered and display the total count of p frames and b frames found when the next i frame is encountered.
Can anyone let me know how can I extract the p frames and b frames from a recorded video.
Thanks in Advance,
Pavithra
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 2 of 2
Thread
-
-
The "p" and "b" frames of a MPEG video don't stand alone, so there is no "extracting" them.
If all you want to do is count the frame types, then bits 3,4 and 5 of byte number 5 (zero based) in the "PICTURE HEADER" contains the frame type.
"001" is type I
"010" is type P
"011" is type B
"100" is type D (not sure what this is, but it is not used by DVDs)
This data is found by parsing your MPEG file for HEX "00 00 01 00" then examining the next 10 bits (which is the temporal sequence number), then the next three bits (which is the frame type).
If you don't know how to find the PICTURE HEADER and parse data bits, then maybe you are in way over your head.ICBM target coordinates:
26° 14' 10.16"N -- 80° 16' 0.91"W
Similar Threads
-
How to define I, P, B frames for GOP?
By Nologic in forum Video ConversionReplies: 2Last Post: 5th Apr 2012, 22:34 -
How do you print a frame to look as good as it does on screen?
By johnharlin in forum Newbie / General discussionsReplies: 3Last Post: 23rd Oct 2010, 07:14 -
batch detect and delete black frames
By boshreek in forum EditingReplies: 0Last Post: 25th Mar 2010, 15:47 -
Frame blended and duplicate frames
By loekverhees in forum Newbie / General discussionsReplies: 7Last Post: 2nd Jan 2010, 09:35 -
How do I edit the frame rate of a selection of frames in VirtualDubMod?
By manilow in forum RestorationReplies: 4Last Post: 21st Dec 2007, 22:12