Hi all!
I have some problems with the mjpeg decoding that I'm hoping someone could help me with. I'm coding a web-camera capture and distribution application. I encode the raw video from the web-camera into mjpeg and distribute the video stream using the rtp-protocol to an OpenGL application that renders the stream. I use the JRTPLib rtp-implementation instead of the rtp in ffmpeg. I develop on Windows XP, using the default libavcodec (i.e. lgpl) and with shared libraries.

All is working fine on a wired LAN, but going over a network with packet loss I get into problems. To minimize the affect of packet loss I split each video frame into a set of fragments of MPU size (~1500k). The idea is that if I loose one fragment I would still be able to get most of the video frame data through the network and could decode and render this. If I don't fragment the video frame, all video frame data is lost if only one packet is lost in the IP layer. Missing parts of the video frame is set to the value 0xFF. Most of the time this works fine, with only some artefacts in the video frame now and then. But sometimes I get a crash in the mjpeg decoder (access violation) and the rendering client crashes. As I'm developing my apps in MS VC++, I cannot debug into the mjpeg-decoder to find exactly where it crashes.

My questions are:

1. Is mjpeg decoding supposed to be robust enough so I can expect it not to crash if I try to decode an incomplete frame?

2. In the svn-log for mjpegdec.c (rev 19344) I see that there have been made improvement to the decoder regarding incomplete frames, does this apply to my problem or is this something different? (My app still crashes with this fix into libavecodec.dll).

3. Is there a better way to fragment the video frame? As far as I can understand from the mjpeg-encoder, it does not provide any jpeg restart markers, thus there are no "natural places" to split the video frame. Is this correct or is there a way to enable restart markers in mjpeg-encoder?

Sincerely,
Endre



__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 4646 (20091129) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to