[Live-devel] Re: erratic MJPEG streaming

xavier nikoxan at mixmail.com
Fri Jul 30 15:26:03 PDT 2004


Hi, Ross

>I'm not sure what the problem is here, but perhaps the problem is with
>VLC. I suggest trying QuickTime Player instead (and/or "MPlayer"). You
>may have better luck with those players.

I've tested it with all these players, and the problem is the same. They all work fine
with the testProgs examples.
openRTSP -m "rtspurl" outputs sequences of 4 different jpegs (now I can open them) at the
correct framerate corresponding to my 4 jpeg images, but the content is a grey background
with a 'collage' of squares distributed randomly. Seems that every player decoder is
receiving an incorrect MJPEG RTP payload.

So, I searched for an example of JPEGVideoSource working and found the emmbedded streamer
code for the "Elphel network camera". As far as I understand (tell me if I'm wrong), this
code gathers JPEG images from a certain device (i.e camera) using ioctl commands, reads
its header, fills the JPEGVideoSource parameters (with 8-multiple, height 8-multiple,
quality factor (0-99), type 1), and delivers the data (without the header )of the JPEG
image in the "deliverFrame" function, so as to stream a  SSM RTP with MJPEG payload. 

My code reads a sequence of 4 JPEG images from disk, instead of a camera device, but has
the same purpuse.
Thus, I reach the conclusion that my code has to avoid delivering a (char *) with the JPEG
header included: only the JPEG data has to be delivered, and I have to read the file
headers to fill the JPEGVideoSource parameters. The quality factor must be guessed, as it
is not in the header, but an incorrect value wouldn't mess all the MJPEG payload decoding.

Questions:
	-is this correct?
	 
Thanks for your help, even though it is 'low priority' I appreciate it. ;-)

Xavier
---------------------------------------------------------

Busques lo que busques, lo encontrarás en http://buscador.ya.com
Ya.com ADSL Router Wi-Fi: Sólo 29,90 €/mes + IVA*. Router + Antivirus y firewall ¡Gratis! http://acceso.ya.com/adsl/256router



More information about the live-devel mailing list