Re: Fw: libxvidcore compiling

Stephan Assmus <[email protected]>
Newsgroups gmane.comp.video.xvid.devel
Message-ID <[email protected]>
reno reballos wrote:
> Master Dark Sylinc,
> 
> sorry for this question...i cant help myself anymore...
> 
> just wanna ask,  i have encoded the stream already into file using xvid 
> and when i try to play it backi got play back but the problem is so 
> fast... maybe my encoding settings affects this here is my settings for 
> encoding:
> 
> 1. i use single pass plugin control.
> 2. profile = XVID_PROFILE_AS_L0
> 3. frame rate @30 fps
> 4. bit rate = 900kB
> 5. reaction_delay_factor = 16 
> 6. averaging_period = 100
> 7. min_quant = 2
> 8. max_quant = 31
> 9. max_key_interval = frame rate*10 (30*10)
> 10.max_bframes = 2
> 11.bquant_ratio = 150
> 12.bquant_offset = 75
> 13.frame_drop_ratio = 0
> 14. global flag = XVID_GLOBAL_PACKED
> 15. bframe_threshold = 255
> 16.aspect ratio = XVID_PAR_43_PAL
> 17. vol_flags = XVID_VOL_MPEGQUANT
> 
> i hope you can help me work this out, i just wanted to have normal play 
> back coz my playback right now is so fast... and i think by having 
> correct values on the above field will have me correct/normal playback...

From what I recall, you plaback in your own application. That should not 
have anything to do with xvid at all. You use xvid for decoding, but then 
it is the job of your application to display the decoded frames at the rate 
you desire, ie 30fps. If you don't do any timing/waiting, then you are 
obviously displaying at the same rate as your computer is able to decode 
the frames.

I would approach the problem as follows: Make a thread that decodes frames 
and puts them into a blocking queue that accepts only so many buffers (for 
example 3, but it depends on the latency you want to achieve). Make another 
thread that pulls buffers out of the queue and displays them, this thread 
would be locked to a certain timing (30 fps). This setup will result in the 
decoding thread blocking at the queue, being locked to the rate at which 
the display thread pulls buffers from the queue. Should anything result in 
the overall system needing too much time to decode a particular frame, you 
have a short bridge of three frames to smooth it out.

Best regards,
-Stephan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.