Page 1 of 1
.ogg file shows wrong timer
Posted: 10 May 2007 09:17
by shirish
Hi all,
First of all I tried to take a snapshot with the inbuilt picture-taker which didn't work. Then I tried to take it through the windows print screen button which showed the following pic.
Now this is in version 0.9b
The same file can be played with media player classic, zoom player or any other player without an issue. The file being played, tested is this
http://ftp.belnet.be/mirrors/FOSDEM/200 ... uxBios.ogg
Posted: 10 May 2007 10:39
by DJ
Reference VLC 0.8.6b, Theora with Vorbis audio in a OGG/OGM container is not an problem. The file plays fine and using ctrl alt s in full screen produced a picture in My Pictures using all the defaults.
Posted: 10 May 2007 13:37
by shirish
DJ,
I never said that the picture doesn't play fine. What I said were two things:-
1. See the counter that being displayed it shows 28 minutes passed out of 7:46 minute file which the file itself is just 46 minutes. I played this file in three other players & there the counter is good.
2. I haven't tried the ctrl+alt+s but you are right, the snapshot did get saved in My Pictures. I didn't know that.
Posted: 10 May 2007 14:00
by Jean-Baptiste Kempf
DJ,
I never said that the picture doesn't play fine. What I said were two things:-
1. See the counter that being displayed it shows 28 minutes passed out of 7:46 minute file which the file itself is just 46 minutes. I played this file in three other players & there the counter is good.
2. I haven't tried the ctrl+alt+s but you are right, the snapshot did get saved in My Pictures. I didn't know that.
1. Fix it
Posted: 10 May 2007 14:03
by shirish
sorry meant 7:46: and some seconds as shown in the picture. I don't think I can fix this
timer bug
Posted: 09 Jun 2007 09:55
by asdufisn
Post subject: .ogg file shows wrong timer
YES I also have this BUG. In VLC 0.8.6.
The timer is wrong, the movie plays (well only on CPU's above 1 GHz
).
Posted: 09 Jun 2007 12:28
by DJ
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 15:29
by maxpain
Hello,
I think this happens because VLC calculates the time with the "Target bitrate" not with the "Average bitrate".
I`m not able to fix this. So if anyone knows how to do this .......
Example:
Target bitrate: 640 kbps
Total data length: 4663651 bytes
Average bitrate: 381,017239 kb/s
4663651 bytes / 1024 = 4554,346679687 kB
381,017239 kbits/s / 8 = 47,627154875 kB/s
95,62499989 seconds this should be correct
4663651 bytes / 1024 = 4554,346679687 kB
640kbits/s / 8 = 80 kB/s
56,929333496 seconds this is what vlc shows
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 16:04
by Jean-Baptiste Kempf
Is the average bitrate information in the ogg headers ?
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 17:05
by maxpain
I don`t know. I could not find any documentation about the header.
I can read out the average bitrate with ogginfo, but i don`t know if it`s in the header or is calculated somehow.
I`m very new to this......
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 17:15
by maxpain
OK. No it`s not in the header. It`s calculated:
bitrate = inf->bytes*8 / time / 1000.0;
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 18:25
by Jean-Baptiste Kempf
So now, you should now how to fix it for VLC
Re: .ogg file shows wrong timer
Posted: 11 Jul 2007 18:37
by maxpain
I wish i would know
But Time insn`t in the header too. With time in the header i would be easy.....
I think i have to understand how ogginfo gets the time.....then a little C-crashcourse
I hope anyone can help me a little......
Re: .ogg file shows wrong timer
Posted: 12 Jul 2007 10:53
by ssbssa
i think one of those files is responsible (is this correct?):
modules/demux/ogg.c
modules/codec/theora.c
additionally, this is the way ogginfo calculates the time and bitrate (ogginfo.c):
static void theora_end(stream_processor *stream)
{
misc_theora_info *inf = stream->data;
long minutes, seconds, milliseconds;
double bitrate, time;
/* This should be lastgranulepos - startgranulepos, or something like that*/
ogg_int64_t iframe=inf->lastgranulepos>>inf->ti.granule_shift;
ogg_int64_t pframe=inf->lastgranulepos-(iframe<<inf->ti.granule_shift);
time = (double)(iframe+pframe) /
((float)inf->ti.fps_numerator/(float)inf->ti.fps_denominator);
minutes = (long)time / 60;
seconds = (long)time - minutes*60;
milliseconds = (long)((time - minutes*60 - seconds)*1000);
bitrate = inf->bytes*8 / time / 1000.0;
lastgranulepos was returned from ogg_page_granulepos(page),
the ti-struct was set from theora_decode_header().
so, where (in which file) is the shown time calculated?
Re: .ogg file shows wrong timer
Posted: 12 Jul 2007 12:03
by Jean-Baptiste Kempf