Hi Remi,<br><br>Sorry for late response. <img goomoji="330" style="margin: 0pt 0.2ex; vertical-align: middle;" src="cid:330@goomoji.gmail"> <br><br>I saw some documents on <a href="http://videolan.org">videolan.org</a> and find this in the following address:<br>
<br><div style="margin-left: 40px;"><a href="http://wiki.videolan.org/Documentation:Hacker%27s_Guide/Core">http://wiki.videolan.org/Documentation:Hacker%27s_Guide/Core</a><br></div><br><div style="margin-left: 40px;">"Presentation Time Stamps located in the system layer of the <br>
stream are
passed to the decoders, and all resulting samples are <br>dated
accordingly. The output layers are supposed to play them at <br>the right
time. Dates are converted to microseconds ; an absolute <br>date is the
number of microseconds since Epoch (Jan 1st, 1970). <br>The mtime_t type is
a signed 64-bit integer.
"<br><br></div>Do you know how to comute PTS value? I see this modules/codec/theora.c : <br><br>
    p_sys->i_pts += ( INT64_C(1000000) *
p_sys->ti.fps_denominator /<br>
                      p_sys->ti.fps_numerator ); /* 1 frame per
packet */<br><br>But what PTS should be for variable frame rate stream?<br><br>Thanks,<br>Alex<br><br><div class="gmail_quote">On Sat, Mar 14, 2009 at 12:35 AM, Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net">remi@remlab.net</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;"><div class="im"><br>
On Fri, 13 Mar 2009 21:57:41 +0800, Alex Lee <<a href="mailto:alex.q.lee@gmail.com">alex.q.lee@gmail.com</a>> wrote:<br>
> I noticed that there are both decoder and encoder interface for theora<br>
in<br>
> modules/codec/theora.c.<br>
><br>
> Does it enough for me to write a module like this to complete the work of<br>
> transcoding?<br>
<br>
</div>Yes. The transcode module takes care of the decoder->encoder interfacing.<br>
<div class="im"><br>
> Do I need to worry about the A/V synchronization of the output stream? I<br>
> have no idea about how to transcode one stream to another format while<br>
keep<br>
> A/V synchronized int the output stream.<br>
<br>
</div>You need to maintain consistent PTS values.<br>
<br>
--<br>
<font color="#888888">Rémi Denis-Courmont<br>
<br>
</font></blockquote></div><br>