I 'm trying to watch MJPEG stream from TRENDnet TV-IP312W, TV-IP400W and TV-IP422W network camera.
And I have the same problem with all cameras:
Code: Select all
[00025] access_http debug: protocol 'HTTP' answer code 200
[00026] access_http debug: Server: Camera Web Server/1.0
[00027] access_http debug: Content-Type: multipart/x-mixed-replace;boundary=--video boundary--
[00028] main debug: using access module "access_http"
...
[00041] mjpeg debug: Multipart MIME detected, using separator: video boundary--Content-length: 14139
...
[00059] main debug: `http://192.168.0.20/mjpeg.cgi' successfully opened
[00060] mjpeg debug: MIME boundary not found in 15360 bytes of data
...
The HTTP response gives a valid Content-Type boundary definition (line 27)
But the boundary detected is (line 41)
then it should bevideo boundary--Content-length: 14139
This is because TRENDnet don't insert a CRLF between the end of the boundary separator and the Content-Length definition.video boundary--
In demux/mjpeg.c I saw the boudary separator is the whole last line read:
Code: Select all
psz_line = GetLine( p_demux, &i_pos )
...
/* Read the separator and remember it if not yet stored */
if( p_sys->psz_separator == NULL )
{
p_sys->psz_separator = psz_line;
msg_Dbg( p_demux, "Multipart MIME detected, using separator: %s",
p_sys->psz_separator );
}
Code: Select all
else if( !strcasecmp( psz, "Content-Type" ) )
{
free( p_sys->psz_mime );
p_sys->psz_mime = strdup( p );
msg_Dbg( p_access, "Content-Type: %s", p_sys->psz_mime );
}
I write a program in C # which do like this and works very well.
But unfortunately I do not know enough about VLC structs to launch myself in modifications. (I'm a poor Windoze developer and I do not know the Linux environment )
If someone would help me I could give by mp a public address to one of my cams stream.
Many thanks in advance.
Molik