FORUMS: list search recent posts

Getting Tunneled RTSP from IP camera behind a Proxy

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
adeel Zahid
Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 10, 2012 at 12:22:26 pm

Hi,
We have some axis cameras that we can interact only through an http proxy. So, we are only left with tunneled rtsp option for getting the h.264 stream. Can I do it in ffmpeg i.e read stream (tunneled over http) from camera by setting proxy settings in ffmpeg and the restream it from our own server.

Is it possible with ffmpeg? if yes please give me something to start with (reading, code snippet anything).


Return to posts index

Reuben Martin
Re: Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 11, 2012 at 1:00:28 am

Try using something like the httptunnel client to bind a local port to the tunnel, and then connect ffmepg to the local port. http://www.nocrew.org/software/httptunnel.html


Return to posts index

adeel Zahid
Re: Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 11, 2012 at 5:07:04 am

Hi Reuben

I have read http://sebsauvage.net/punching/ which is a tutorial to show how httptunnel works. It makes me feel that i'll have to setup http tunnel and ssh server on each of our cameras that are behind proxy. Only then I would be able to tunnel the rtsp traffic through http from client computers (of course i'll have to setup ssh and httptunnel client on client machines). This is not desirable. The axis cameras support Tunneled rtsp out of the box and we are able to run this on Windows media player with proxy enabled in IE. But, we would want to read the stream in ffmpeg so it could be stored and later showed to the user on demand. To see the detailed description of our problem please visit https://docs.google.com/document/d/1BU2qfcnazlDbu6q09-iurWhymzQlwd4-UckUrSb...

thanks


Return to posts index


Reuben Martin
Re: Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 12, 2012 at 4:48:14 am

That tutorial you linked to is for routing an ssh connection through an http tunnel. That really has nothing to do with what you're trying to do, you wouldn't need an ssh server.

But, more to the point, I mis-understood what you meant by "tunneling". People do use the term tunneling to describe what you're talking about, but I think that is a misleading term for it. "RTSP over HTTP" or "RTSP using HTTP transport" would be a more accurate description.

ffmpeg can pull down rtsp over http with a similar command to normal rtsp streams, it's just that you need to the rtsp_transport flag.

ffmpeg -rtsp_transport http -i rtsp://server:8080/video.mp4 .....

See the man pages for more info.


Return to posts index

adeel Zahid
Re: Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 12, 2012 at 9:49:04 am

He Reuben,
Thanks a lot for your interest. When i trid

ffmpeg -rtsp_transport http -i rtsp://149.5.42.8:554/axis-media/media.amp?videocodec=h264

it gave me following error

rtsp://149.5.42.8:554/axis-media/media.amp?videocodec=h264: Input/output error

I thought, I should first check "Rtsp over HTTP" for camera with direct link then i can step forward to include proxy but it failed at first step. I am attaching the wireshark trace for this command http://f1.creativecow.net/4392/ffmpegrequesttrace


Return to posts index

Reuben Martin
Re: Getting Tunneled RTSP from IP camera behind a Proxy
on Jul 12, 2012 at 1:21:47 pm

It looks like your connection is getting reset each time you try to connect.

You might try to see if port 80 or 8080 or something similar is open. Given that it's being sent on an http transport, it might be serving that up on a standard http port.

Also, I forgot to mention in the previous post, I don't think ffmpeg supports accessing via a remote http proxy. (If it does I've never used it) However, I'm fairly certain that VLC can do that. And you can call vlc from the command line (cvlc) and dump the output similar to what you are trying to do with ffmpeg.

You can configure all that in the GUI interface first to make sure it can access it correctly. (HTTP proxy settings are in the advanced settings)

Hope that helps.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]