MIME boundary not found with TRENDnet IpCams

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Molik
New Cone
New Cone
Posts: 2
Joined: 13 Feb 2008 11:37
VLC version: 1.0.3
Operating System: Win7
Location: Toulouse (France)

MIME boundary not found with TRENDnet IpCams

Postby Molik » 21 Jan 2010 19:30

Hi alls,

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 problem comes from the boundary definition.
The HTTP response gives a valid Content-Type boundary definition (line 27)
But the boundary detected is (line 41)
video boundary--Content-length: 14139
then it should be
video boundary--
This is because TRENDnet don't insert a CRLF between the end of the boundary separator and the Content-Length definition.
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 ); }
In modules/access/http.c I think we could extract a valid boudary 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 wonder if it would be difficult to take the boundary in the HTTP response, rather than take the whole line at this step.

I write a program in C # which do like this and works very well. :D
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 :oops: )
If someone would help me I could give by mp a public address to one of my cams stream.

Many thanks in advance.
Molik

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MIME boundary not found with TRENDnet IpCams

Postby Jean-Baptiste Kempf » 13 Aug 2012 00:32

Try vlc 2.1.0
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

owll
New Cone
New Cone
Posts: 1
Joined: 23 Aug 2012 09:11

Re: MIME boundary not found with TRENDnet IpCams

Postby owll » 23 Aug 2012 09:34

Не пофиксили еще ?
Я вот думаю, может перед вызовом ф-ии GetLine попробовать найти подстроку "Content-length:" и перед ней поставить символы "/r/n" ?
Тогда по идее сепаратор должен корректно вычислиться.
Мне было бы интересно поковырять коды с Вашей поддержкой, так что я готов поучавствовать в эксперименте .

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MIME boundary not found with TRENDnet IpCams

Postby RSATom » 23 Aug 2012 12:06

Боюсь это англоязычный форум, и народ скоро начнет возмущаться...

I'm afraid it's english language forum...

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MIME boundary not found with TRENDnet IpCams

Postby RSATom » 24 Aug 2012 19:16

patch: http://mailman.videolan.org/pipermail/v ... 89816.html
but review by more experienced members is needed

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: MIME boundary not found with TRENDnet IpCams

Postby RSATom » 26 Aug 2012 12:10



Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 92 guests