[ivtv-users] Finding out the length (in min) of saved encoder (MP2) file?
Andy Walls
awalls at radix.net
Tue Feb 23 15:41:30 CET 2010
On Tue, 2010-02-23 at 14:55 +0100, Johan Persson wrote:
> Since my knowledge of the details of the MP2 stream produced by a caputure card
> (+ ivtv) driver is rather vague so before I start to immerse myself in standards
> documents I was wondering if there is some "shortcut" to find out the overall
> length (in min or sec) for a saved MP2 file from the capture card without having
> to write a (semi-) complete MP2 decoder onseself?
>
> I'm thinking of using the libmpeg2 but before I start analysing the headers and
> example programs (there is no documentation) I thought I would ask.
In the ivtv-utils source, there is a ps-analyzer utility which dumps out
a lot of information (e.g. timestamps of every frame), but at the end
you get this:
Statistics:
video frames: 554
audio frames: 436
private packets: 554
total time: 18.35 seconds
> It doesn't have ot be precise on the second; +/- 1 min accuracy is good enough
> for my purposes.
A fellow on the linux-media list just provided a patch to correct some
time reference decoding problems in ps-analyzer, but I have not checked
it in yet.
Check the output of the current ps-analyzer against known sample mpegs
that you have timed yourself.
Regards,
Andy
> /Johan
More information about the ivtv-users
mailing list