Hi guys
Before I try to reinvent the wheel, I would like to know if someone has already done this:
Basically I am looking for a tool/library that can open a MPEG-2 ES/PS stream and output various information about the frames inside it :
e.g:
- How many GOPs are there ? How many Frames are there ?
- What are the characteristics of each GOP ? how many B/I/P frames are in each GOP ?
- what is the bit-rate ?
- resolution
- frame-rate
- MPEG2 profile used e.g. 4:2:0, 4:2:2 etc. is it one profile for all GOPs or different for each GOP ?
- Macroblock characteristics
- DCT parameters
- Quantisation params
- Any other information (on a GOP-by-GOP or frame-by-frame basis)
I'll be later using these data to build a application model for research.
Many thanks
+ Reply to Thread
Results 1 to 13 of 13
-
-
Hi
I've checked out the tools you've mentioned, the GSPOT tool is quite good.
Is there a way to find out how many GOPs a *.mpg movie has without parsing the whole MPEG file ? just by the mpeg file headers ??
also the I:P:B ratios are they fixed for every GOP ? or would they vary depending on the complexity of the video ?
thanks -
Not with any accuracy, because GOP size isn't always fixed
also the I:P:B ratios are they fixed for every GOP ? or would they vary depending on the complexity of the video ?
But sometimes GOP size and frametype placement is always fixed (e.g. hardware encoders for MPEG2 camcorders) , then you can deduce the information from the framecount -
You can estimate the total number of GOPs with:
running_time * fps / average_GOP_size -
You can estimate the total number of GOPs with:
running_time * fps / average_GOP_size -
estimations are okay as long as long as the error is relatively small. I actually need an upper bound value.
in terms of the following :
running_time * fps / average_GOP_size
so
1) how would I find the average_GOP_size by the mpeg2-header ?
2) similarly running_time is that from the GOP section (start code 0xB8) ?
3) @enim : why did you say +/- 1 ? that seems very low is it not ?
Thanks for the help guys.
Just out of curiosity, do you'll know how to calculate an upper bound for the memory requirements for mpeg-decoding as well ?
thanks -
GSPot tells you the average GOP size in the video section.
GSpot reports the video running time and frame rate in the video section.
It's worse than that with GSpot because GSpot reports the average GOP size as an integer. And we (at least I) don't know if that values is rounded, truncated, or a median.
That will depend on the decoder. The decoder will have to have at least enough memory to hold the first I/P frame, the subsequent P frame, and all the B frames in between. (The size of those uncompressed frames will vary depending on the colorspace used.) Plus enough memory for at least part of one encoded frame.
Mpeg Validator gives more detailed information. Including the total number of GOPs.Last edited by jagabo; 28th Jan 2014 at 09:42.
Similar Threads
-
Closed Caption Extraction from MPEG Stream problem
By sambat in forum SubtitleReplies: 10Last Post: 14th Oct 2013, 13:33 -
True-HD to ac3 extraction
By bldblu in forum AudioReplies: 10Last Post: 27th Jun 2013, 02:40 -
Convert to MXF file with closed GOP every GOP?
By Gobblor in forum Video ConversionReplies: 0Last Post: 17th May 2012, 04:27 -
extraction synchronized with video
By amandioc1 in forum Capturing and VCRReplies: 2Last Post: 29th May 2010, 04:38 -
header information of MPEG-4 and AVI
By firadayat in forum Newbie / General discussionsReplies: 2Last Post: 9th Mar 2009, 08:53