No subject

Mon Nov 3 13:03:41 PST 2008

4) Subtract 1 from the keyframe, then repeat step 3).<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>
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=

<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""></a><br>

<a href=3D"">
<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">nigel@=</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" target=3D"_blank">ozemale at oz=</a>&quot; &lt;<a href=3D"mailto:ozemale at" target=
=3D"_blank">ozemale at</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=
What do we need to do to get these issues addressed and resolved?<br>
<span style=3D"font-weight: bold;">On Mon Mar 15 11:54 , Nigel Simpson  sen=
</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=" target=3D"_blank">ogg.k.ogg.k at</a>&quot; &lt;<a></=
a><a href=3D"mailto:ogg.k.ogg.k at" target=3D"_blank">ogg.k.ogg=
.k at</a> <br>

 &gt; wrote:<br>


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

&gt;&gt; seems to<br>

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

&gt;&gt; the player<br>

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

&gt;&gt; drag the<br>

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

&gt;&gt; the drag<br>

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


&gt;&gt; Does cortado support OggIndex?<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=

&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=

&gt; of them.<br>


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


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

&gt;&gt; playback<br>

&gt;&gt; position?<br>


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

&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=

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

&gt; found.<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 =

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

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




theora-dev mailing list<br>

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

<a href=3D"
%2Flistinfo%2Ftheora-dev" target=3D"_blank"><span style=3D"color: red;">htt=


theora-dev mailing list<br>
<a href=3D"mailto:theora-dev at">theora-dev at</a><br>
<a href=3D"" target=3D"_bl=


More information about the theora-dev mailing list