No subject


Mon Nov 3 13:03:41 PST 2008


<br>
4) Subtract 1 from the keyframe, then repeat step 3).<br>
<br>
5) Begin reading from the frame discovered in step 4. Drop any packets<br>
which are output on the first page. Count down until we reach the<br>
keyframe, dropping packets until then.<br>
<br>
6) Continue counting down until we reach the target frame, we are now<br>
decoding each frame/packet. At the target frame produce the YUV<br>
output.<br><br>Steps 4 and 5 are necessary because ogg only tells you where=
 a frame ends, not where it starts.<br><br><br><br>My code has two further =
optimisations:<br>- if playing sequentially (current_frame - last_frame &lt=
; threshold), you don&#39;t need to seek again (from trial and error I foun=
d threshold is best if it is around 1/4 of the keyframe_granule_shift). Jus=
t continue decoding.<br>

<br>- I create a hash table of largest granule pos -&gt; keyframe as this i=
s discovered. Doing a binary tree search of this first can help narrow the =
initial search range for keyframes which have already been discovered<br>

<br>It&#39;s all in the code here:<br><a href=3D"http://lives.svn.sourcefor=
ge.net/viewvc/lives/trunk/lives-plugins/plugins/decoders/ogg_theora_decoder=
.c">http://lives.svn.sourceforge.net/viewvc/lives/trunk/lives-plugins/plugi=
ns/decoders/ogg_theora_decoder.c</a><br>

<br>The only function to really consider is get_frame() which takes a (cons=
t) char *URI (actually the current version really only takes a local file n=
ame), and an int64_t frame number and returns the output in void *pixel_dat=
a[3] which should be pre-allocated to take a correctly sized YUV420 frame. =
The rest is just internal functions or decoration, apart from get_clip_data=
() which returns a struct with all the details about (const) char *URI. I o=
nly implemented video (theora) decoding, but it should be fairly easy to im=
plement audio decoding from the same pages.<br>

<br>Yes, it is a bit complicated, but it really is the only way if you want=
 100% accurate seeking in an ogg container.<br><br><br><br>Salsaman.<br><br=
 clear=3D"all"><br><a href=3D"http://lives.sourceforge.net">http://lives.so=
urceforge.net</a><br>

<a href=3D"https://www.ohloh.net/accounts/salsaman">https://www.ohloh.net/a=
ccounts/salsaman</a><br><br>
<br><br><div class=3D"gmail_quote">On Mon, Mar 15, 2010 at 4:22 PM, Nigel S=
impson <span dir=3D"ltr">&lt;<a href=3D"mailto:nigel at matsuplace.com">nigel@=
matsuplace.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8e=
x; padding-left: 1ex;">

<div bgcolor=3D"#FFFFFF"><div>I know of a bunch of developers and students =
who might be available to help out. I figure this issue needs Cortado exper=
ts rather than lots of developers, though. If that&#39;s not the case and y=
ou need some help, I can send some people to the project.</div>

<div><br></div><font color=3D"#888888"><div>Nigel=A0</div></font><div><div>=
</div><div class=3D"h5"><div><br></div><div>On Mar 15, 2010, at 12:08 PM, &=
quot;<a href=3D"mailto:ozemale at ozemail.com.au" target=3D"_blank">ozemale at oz=
email.com.au</a>&quot; &lt;<a href=3D"mailto:ozemale at ozemail.com.au" target=
=3D"_blank">ozemale at ozemail.com.au</a>&gt; wrote:<br>

<br></div><div></div><blockquote type=3D"cite"><div><br>
I also have a pressing need to have the seeking/pausing issues in Cortado r=
esolved.<br>
<br>
What do we need to do to get these issues addressed and resolved?<br>
<br>
Thanks,<br>
<br>
John<br>
<br>
<span style=3D"font-weight: bold;">On Mon Mar 15 11:54 , Nigel Simpson  sen=
t:<br>
<br>
</span><blockquote style=3D"border-left: 2px solid rgb(245, 245, 245); marg=
in-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;">On=
 Mar 15, 2010, at 3:59 AM, &quot;<a></a><a href=3D"mailto:ogg.k.ogg.k at googl=
email.com" target=3D"_blank">ogg.k.ogg.k at googlemail.com</a>&quot; &lt;<a></=
a><a href=3D"mailto:ogg.k.ogg.k at googlemail.com" target=3D"_blank">ogg.k.ogg=
.k at googlemail.com</a> <br>



 &gt; wrote:<br>

<br>

&gt;&gt; When I play the converted video using cortado 0.5.2, seeking still=
  <br>

&gt;&gt; seems to<br>

&gt;&gt; be broken. For example: play a video, pause and then press play,  =
<br>

&gt;&gt; the player<br>

&gt;&gt; resumes several seconds after the paused position. Also, pause and=
  <br>

&gt;&gt; drag the<br>

&gt;&gt; time slider. The slider jumps to a new position after you release =
 <br>

&gt;&gt; the drag<br>

&gt;&gt; rather than where the slider was dragged.<br>

&gt;&gt;<br>

&gt;&gt; Does cortado support OggIndex?<br>

&gt;<br>

&gt; No. The index is a very new addition and is still being worked on.<br>

&gt; Support at the moment is limited to ffmpeg2theora and OggIndex (plus<b=
r>

&gt; patches for Firefox). It is expected that various players will be<br>

&gt; patched to support the index, however. Cortado would probably be one<b=
r>

&gt; of them.<br>

<br>

That would be great to see in Cortado.<br>

<br>

&gt;&gt; Are there any workarounds for reliably getting and setting the  <b=
r>

&gt;&gt; playback<br>

&gt;&gt; position?<br>

&gt;<br>

&gt; Seeking is known to have problems in Cortado. They&#39;re fixed as  <b=
r>

&gt; they&#39;re found.<br>

&gt; Also, a recently released version of Cortado had a non-working<br>

&gt; playback position access from Javascript, in case you&#39;re also seei=
ng<br>

&gt; this problem. I&#39;m unsure whether there was a release since this wa=
s<br>

&gt; found.<br>

<br>

I&#39;m using Cortado in a Java application, and have been trying to  <br>

figure out why Cortado can seek reliably (well, reproducibly perhaps)  <br>

but doesn&#39;t reliably report the current position, or resume from pause =
 <br>

properly. It sounds like these are known issues though. Is there any  <br>

way to raise the priority of these issues?<br>

<br>

Nigel<br>

_______________________________________________<br>

theora-dev mailing list<br>

<a></a><a href=3D"mailto:theora-dev at xiph.org" target=3D"_blank">theora-dev@=
xiph.org</a><br>

<a href=3D"http://parse.pl?redirect=3Dhttp%3A%2F%2Flists.xiph.org%2Fmailman=
%2Flistinfo%2Ftheora-dev" target=3D"_blank"><span style=3D"color: red;">htt=
p://lists.xiph.org/mailman/listinfo/theora-dev</span></a><br>

)<br>

</blockquote>
<br></div></blockquote></div></div></div><br>______________________________=
_________________<br>
theora-dev mailing list<br>
<a href=3D"mailto:theora-dev at xiph.org">theora-dev at xiph.org</a><br>
<a href=3D"http://lists.xiph.org/mailman/listinfo/theora-dev" target=3D"_bl=
ank">http://lists.xiph.org/mailman/listinfo/theora-dev</a><br>
<br></blockquote></div><br>

--00504502d3bcaab7500481dcf5d6--


More information about the theora-dev mailing list