[theora-dev] Video encoded using libtheora-1.1.1 and libogg-1.1.4 plays too fast...

Id Kong spam_receptacle_ at hotmail.com
Thu Feb 11 01:39:47 PST 2010



I'm moving this private correspondence to the mailing list since it was only accidentally made private by me...

> Date: Thu, 11 Feb 2010 03:53:25 -0500
> From: tterribe at email.unc.edu
> 
> Id Kong wrote:
> >>> times, as most of these frames will be very small). You need to write
> >>> out pages in a loop so long as there are pages ready to be written,
> >>> instead of just writing 0 or 1 pages after each packet.> 
> 
> > I based my code off of encoder_example.c !  This is why I need you to be
> > specific.  The problem with the example code is that it's enormously
> 
> I thought the above was specific. You need to put WriteOggPage in a loop
> instead of calling it once per frame. This applies to the headers as well.

	I'm sorry, I didn't read your post carefully enough.  So, what you're saying is that not only do th_encode_packetout() and ogg_stream_packetin() need to be called in a loop but ogg_stream_pageout() needs to be called in a (different) loop as well, right?	Incidentally, encoder_example.c does not do this.  If I'm reading the code right, there is only one call to ogg_stream_pageout() for every loop of th_encode_packetout() and ogg_stream_packetin() calls.	I tried changing WriteOggPacket() like so:

void WriteOggPage(FILE *file, ogg_stream_state *state, bool flush = false) {	ogg_page page;	while(true) {		int rc;		if( flush ) rc = ogg_stream_flush(  state, &page);		else        rc = ogg_stream_pageout(state, &page);
		if( rc == 0 ) {			break;
		} else {			fwrite(page.header, 1, page.header_len, file);			fwrite(page.body, 1, page.body_len, file);		}	}}

	This resulted in a slight larger file but no discernible difference in the movie play length.  It's certainly not playing the expected duration.	What do you think?

> > Hey, is this a private e-mail correspondence?  How do I reply to the group?
> 
> Reply to theora-dev at xiph.org. The list is not configured to do this by
> default (don't ask me why).

	Okay, so I won't ask you but someone should have some reason for doing this.  How often do you want to respond to the group rather than responding privately to another member of the group?

 		 	   		  
_________________________________________________________________
Introducing Windows® phone.
http://go.microsoft.com/?linkid=9708122
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20100211/b26a28ee/attachment.htm 


More information about the theora-dev mailing list