Login  Register

RTMP through proxy server

classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

RTMP through proxy server

orione1974
29 posts
I need to send a stream protocol "RTMP" to a Flash Media Server, named for example "my_server_fms". I need to go through a proxy. I tried with a pipeline like this: "gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmp://my_server_fms/live/gst_test".
In the component "rtmpsink" there is no parameter to indicate the proxy server. How can I do?

Kind regards

Fabrizio Ciavatta
------------------------


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RTMP through proxy server

Atish Nazir
6 posts
Hi Fabrizio,
I've not any experience of the rtmpsink element however I have two guesses that might help you along:

* RTMP cannot tunnel through HTTP, you need RTMPT variant.  A quick gander through the source of rtmpsink suggests it support this protocol variant
* rtmpsink uses mplayer library as a backend, so I would be unsurprised if it supported http_proxy environment variables

e.g.:

export http_proxy=http://proxy_server_name:proxy_server_port
gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmpt://my_server_fms/live/gst_
test


An easy way to test the efficiency of the environment variable here would be to configure netcat to listen and direct your proxy config that way

nc -l 1234
export http_proxy=http://localhost:1234
gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmpt://my_server_fms/live/gst_
test

If you see an HTTP request popping up on STDOUT of netcat then you're on your way.

HTH


On 3 October 2012 11:30, Orione1974 <[hidden email]> wrote:
I need to send a stream protocol "RTMP" to a Flash Media Server, named for example "my_server_fms". I need to go through a proxy. I tried with a pipeline like this: "gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmp://my_server_fms/live/gst_test".
In the component "rtmpsink" there is no parameter to indicate the proxy server. How can I do?

Kind regards

Fabrizio Ciavatta
------------------------


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RTMP through proxy server

orione1974
29 posts



Fabrizio Ciavatta
------------------------



2012/10/3 Fabrizio Ciavatta <[hidden email]>
Hi.
I thank you for your suggestions.
I tried as you described and I received the following messages:

sh-3.1$ export http_proxy=http://192.168.0.240:3128
sh-3.1$ gst-launch-0.10 ksvideosrc ! x264enc tune=zerolatency ! flvmux ! rtmpsink location=rtmpt://xx.yy.zz.ww/live/gst_test
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: RTMP_Connect0, failed to connect socket. 10060 (Unknown error)
ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not open resource for writing.
Additional debug info:
gstrtmpsink.c(228): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:
Could not connect to RTMP stream "rtmpt://xx.yy.zz.ww/live/gst_test" for writing
Execution ended after 26123047000 ns.
Setting pipeline to PAUSED ...
sh-3.1$

Fabrizio Ciavatta
------------------------



2012/10/3 Atish Nazir <[hidden email]>
Hi Fabrizio,
I've not any experience of the rtmpsink element however I have two guesses that might help you along:

* RTMP cannot tunnel through HTTP, you need RTMPT variant.  A quick gander through the source of rtmpsink suggests it support this protocol variant
* rtmpsink uses mplayer library as a backend, so I would be unsurprised if it supported http_proxy environment variables

e.g.:

export http_proxy=http://proxy_server_name:proxy_server_port
gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmpt://my_server_fms/live/gst_
test


An easy way to test the efficiency of the environment variable here would be to configure netcat to listen and direct your proxy config that way

nc -l 1234
export http_proxy=http://localhost:1234
gst-launch-0.10 ksvideosrc ! x264enc tune = zerolatency ! flvmux ! rtmpsink location = rtmpt://my_server_fms/live/gst_
test

If you see an HTTP request popping up on STDOUT of netcat then you're on your way.

HTH



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: RTMP through proxy server

orione1974
29 posts
I understand that the developer Howard Chu has only implemented the management only of the SOCKS proxy and not the HTTP proxy.
I found a patch to adds the ability to specify a HTTP proxy to be used for RTMPT in the libRTMP library.
The first patch add a new command line argument (--http).
The second patch uses the http_proxy environment variable instead of command line arguments to specify the
HTTP proxy.