On Friday 21 March 2008 21:50:50 Clément wrote:
> Hello everybody.
>
> I'm sorry, I don't understand how to get the duration of a sound or a
> video file.
> I have looked at the API, ask to the irc channel but I don't have any
> clue about that.
>
> Someone has an idea, or can give me a link or some explanations ?
>
> Thanks in advance.
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user

there should be a field in formatcontext struct called 
pFormatCtx->streams[i]->duration 
it should express in 90000th of second the duration of the stream.
That's to say that for each
Vob file in a DVD you should divide 

(pFormatCtx->streams[i]->duration / 90000)/60

the result should be in seconds.
Luigi

-------------------------------------------------------
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to