<br><br><div class="gmail_quote">On Sat, Nov 8, 2008 at 5:05 AM, Conrad Parker <span dir="ltr"><<a href="mailto:conrad@metadecks.org">conrad@metadecks.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2008/11/6 salsaman <<a href="mailto:salsaman@gmail.com">salsaman@gmail.com</a>>:<br>
<div><div></div><div class="Wj3C7c">> Hi all,<br>
> I have been working on an ogg/theora demuxer/decoder plugin for LiVES<br>
> (<a href="http://lives.sourceforge.net" target="_blank">http://lives.sourceforge.net</a>). The decoder has a very simple interface, in<br>
> fact there are only two major functions: - a function to get details (frame<br>
> size, fps, palette, etc) from a URL; - a function to get a given frame from<br>
> a specified URL and copy the resulting frame into memory buffers.<br>
><br>
> The code can be seen here:<br>
><br>
> <a href="http://lives.cvs.sourceforge.net/viewvc/lives/lives-plugins/plugins/decoders/ogg_theora_decoder.c?view=log" target="_blank">http://lives.cvs.sourceforge.net/viewvc/lives/lives-plugins/plugins/decoders/ogg_theora_decoder.c?view=log</a><br>
><br>
> The function which is causing problems is get_frame(). Here the first pass<br>
> will seek to the keyframe before the target frame, then decode until we<br>
> reach the target frame, at which point the frame is output. The output is<br>
> done by way of ogg_data_process() which in turn calls ogg_theora_read().<br>
><br>
> So far so good. However, on the second and subsequent frames, assuming we<br>
> are playing forwards sequentially, a shortcut is taken - at line 960:<br>
><br>
> if<br>
> (tframe>last_frame&&((tframe-last_frame<=max_frame_diff||kframe==last_kframe)))<br>
> {<br>
><br>
> here, tframe is our target frame, (static) last_frame is the last frame<br>
> output, and max_frame_diff is the keyframe skip / 2<br>
> If we are playing sequentially, then this shortcut will be taken - it sets<br>
> cont(inue) to TRUE and drops back into ogg_data_process(), and processing<br>
> should continue exactly where we left off last time. However what I see is<br>
> this - I am using 3 test clips. On one of the clips, playbck works<br>
> perfectly; however, on the other two clips, it looks like frames are being<br>
> skipped - the clip plays back too fast, with distortion, and we reach EOF<br>
> too soon.<br>
><br>
> Maybe somebody can take a quick look at the code and tell me where I am<br>
> going wrong ?<br>
<br>
</div></div>can you post links to the 3 files? it might be easier to debug if we<br>
can reproduce the problem, or at least look at the file contents.<br>
Also, does this happen when viewing any frame offsets in those files,<br>
or for particular frames?<br>
<font color="#888888"><br>
Conrad.<br>
</font></blockquote></div><br><br>Hi Conrad,<br>thanks for your response. The file which does work is rather large (about 700MB) and exists only my local machine, given the file size and my slow connection it is a bit difficult to upload it. The two files which don`t work are a small test file with 17 frames (<a href="http://www.xs4all.nl/~salsaman/testogg.ogg">http://www.xs4all.nl/~salsaman/testogg.ogg</a>) and this file: <a href="http://upload.wikimedia.org/wikipedia/commons/0/0c/Experience_ubuntu.ogg">http://upload.wikimedia.org/wikipedia/commons/0/0c/Experience_ubuntu.ogg</a><br>
<br>If you have a Linux or BSD machine available, you can test out the player code yourself:<br>download and install the CVS version of LiVES (see <a href="http://lives.sf.net?do=cvs">http://lives.sf.net?do=cvs</a>) and then go to File/Open and select one of the files. The file will open up almost instantly (yay !) and clicking around randomly on the timeline shows the correct frame. The problem can be seen when playback is triggered.<br>
<br>To answer your question, the problem occurs no matter which frame is seeked to as the start frame. Note also that there is visible distortion (blockiness) during playback, indicating that frames are actually being omitted rather than the file simply being played back too fast (which of course I have checked for and eliminated the possibility of).<br>
<br>Regards,<br>Gabriel.<br><a href="http://live.sf.net">http://live.sf.net</a><br>