RTSP client with high resolution jpeg stream

Topics: Question
Apr 13, 2015 at 6:43 AM
Dear Sir,

I'm using your library to received video jpeg stream from ip camera. It's work well when resolution of video stream is lower than 1920x1080. With 5 MP ip camera (2592x1944) the image is broken.
After change MaxWidth & MaxHeight (default 2040) In Media.Rtsp.Server.MediaTypes.RFC2435Media to 1592 & 1944, it's work well, change to 4096 or 8912 or higher not work.

My question is: How to set these property of RFC2435Media to accept all resolution of camera ?
If you need camera stream to test, please follow the link: rtsp://admin:admin@ PS; VLC also have this problem
Apr 13, 2015 at 12:39 PM
Edited Apr 13, 2015 at 12:43 PM
Hey, long time! Glad to see your still around and using the library.

Rfc2035 and 2435 were quite possibly the worst request for comments ever issued.

They place many restrictions and enforce semantics in which the jpeg spec didn't require e.g. two Huffman tables And a resolution which is congruent to 8.

It's beyond stupidity, rfc2035 and 2435 break each other and even ignore further standard expansion And provide terribly poor security mechanisms.

I don't wanna go to far off track but this is a great question and the answer is as follows:

In short what your trying to do can be done ONLY in a special session description which can then be used to decode properly if receivers decided they would like to honor your specific description of that session.

With that being said it can be done and you actually can even trick vlc into displaying them correctly...

You just have to change the format slightly when sending and overflow the client gracefully enough that you can end the previously required header and image write the correct header required for the image along with its data into the correct place.

This does work with vlc, QuickTime has other mechanisms you may have to work around.

As for a properly done way, You must use a type 96 or 97 which specifically defined the Huffman and quantization tables you require.

You can then take in the stream and transcode it on the fly to a compliant format and host that for use with vlc etc where required if the hacking solution isn't preferred.

If you need further examples or info let me know!
Marked as answer by juliusfriedman on 4/13/2015 at 5:39 AM