Hello, I'm just totally confused. In my theora streams encoded using ffmpeg2theora (but also when using my own encoder) I have packets with a granulepos of -1 so I can't identify the packet during a seeking operation correctly. I can also see those strange value when I just print the packet granulepos before sending it to the Theora decoder. I know why there are PAGES with granularpos of -1 (because no packet ends in the page) but why would PACKETS have a granularpos of -1 ? It seems arbitrary so it's independent from keyframes. In the Theora specs you can read: "In this way the granulepos field increased monotonically as required by the Ogg format, but contains information necessary to efficiently find the previous keyframe to continue decoding after a seek." This means having anything other than a monotonically increasing granulepos would break the specification. So related to the the values I get the spec is broken, isn't it? Or what's wrong here? Sincerely, Robin Siegemund, dp -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20090216/6dd4ab9f/attachment.htm
ogg.k.ogg.k at googlemail.com
2009-Feb-16 11:11 UTC
[theora-dev] Theora packets with granulepos of -1
> I'm just totally confused. In my theora streams encoded using ffmpeg2theora > (but also when using my own encoder) I have packets with a granulepos of -1Are you sure that there really are packets with -1 granpos ? ogginfo or oggz info should report those if there really are. Could it be possible that the code that pulls packets after feeding pages doesn't properly check return codes, and *thinks* there is a packet available when more data would be needed for a full packet ?
On Tue, Feb 24, 2009 at 10:20 AM, Timothy B. Terriberry <tterribe at email.unc.edu> wrote:> salsaman wrote: >> I check the first positive granulepos, not the first page. So it will >> always come out with the correct value. > > Really? What happens when the first positive granpos is for frame 2897 > and says the previous keyframe was at frame 2980? Does that mean the > stream starts from 0 or 1?It means the stream starts at 2980. Gabriel.