Re: question about time
Petri Hintukainen <[email protected]> Tue, 28 Aug 2012 22:20:04 +0300
| Newsgroups | gmane.comp.video.xine.user |
|---|---|
| Message-ID | <1346181604.2270.4.camel@ph-NF310> |
On pe, 2012-08-24 at 23:01 -0700, Waitman Gobble wrote: > Hi, > > using xine-lib-1.2.2 and xine (X11 gui) v0.99.7. > FreeBSD hunny.waitman.net 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Aug 11 13:25:18 PDT 2012 > [email protected]:/usr/obj/usr/src/sys/KEYSHIA amd64 > > > When I play an MPEG video I've notice that the time seems off. For example, > a video that's just over 6 minutes long - xine gui says has a 33 second duration. > > If I take a look at the values using the libxine, ie pos_stream, pos_time, > length_time, the length_time is '33639' (00:00:33.639) > > MVI_0087.mpeg|201|103|33639|00:00:00.103|00:00:33.639| > MVI_0087.mpeg|490|251|33639|00:00:00.251|00:00:33.639| > MVI_0087.mpeg|9335|4791|33639|00:00:04.791|00:00:33.639| > > > here's ffmpeg info for same video: > > Duration: 00:06:35.94, start: 1.000000, bitrate: 37423 kb/s > Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 104857 kb/s, 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc > Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s > > If there isn't a way around it, maybe I can use the ratio and calculate a time.. > for example, 4791/33639 ~ 14.24%, so about 56 seconds into the video. (instead of > reported "4.791 seconds"). > > Any idea why the reported time seem to be way off? It would be great for me to track this down. It is calculated from reported bitrate and file size. Looks like bitrate in that mpeg file is incorrect. Maybe ffmpeg reads first and last timestamp from the file and calculates time from those. - Petri ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/