[Live-devel] mpeg4 encoder

Jan Herling Jan.Herling at fit.fraunhofer.de
Wed Mar 9 17:03:18 PST 2005


Hallo Ross,

thank you for your tip.
I will try to tell my divx 5.2.1 encoder to include these headers.
Tank you!

I'm very sorry, but I have a new problem.
I don't know if you still remember that I'm using a DeviceSource class 
and the Mpeg4VideoStreamDiscreteFramer
to send a live captured video stream to a client.

I have a defective visible output on the client side, if the encoded 
frames are bigger than fMaxSize.
Currently I do the following in DeviceSource::deliverFrame:

If the delivered frame size is bigger than fMaxSize I only copy the 
first part of the frame to fTo (exactly fMaxSize bytes)
Then I set fNumTruncatedBytes = TotalFrameSize - fMaxSize               
(TotalFrameSize is the size of the encoded frame)
and fFrameSize = fMaxSize.
and TotalFrameSize = TotalFrameSize - fMaxSize

The next time the deliverFrame function is called I copy the remainder 
of the frame to fTo,
set fFrameSize = TotalFrameSize,
fNumTruncatedBytes = 0

(This example is for a encoded frame which is to big for one fTo buffer 
and small enough for two fTo buffers)

I have the visual problems with VLC and QuickTime so I don't think, that 
the problem can be on the client side.
Do you see a problem in my doing? Or have I forgotten to set a variable?

Thank you once more for your help

Jan




More information about the live-devel mailing list