nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Simple redirect (player)

Open zhxiaom5 opened this issue 8 years ago • 6 comments

could we have Simple redirect (player)?not on the publisher side,but on the player side? i know relay can achieve this,but is anyway could it work like simple redirect? thinks

zhxiaom5 avatar Apr 15 '16 08:04 zhxiaom5

Same magic like in on_publish handler with 30x return code?

sergey-dryabzhinsky avatar Apr 15 '16 19:04 sergey-dryabzhinsky

You can try add-player-redirect-support branch. In client code you need to catch NetConnection errors, or add callbacks onStatus & _error. And check for info.ex.redirect data.

sergey-dryabzhinsky avatar Apr 19 '16 04:04 sergey-dryabzhinsky

And enable notify_send_redirect on; in nginx-rtmp config.

sergey-dryabzhinsky avatar Apr 19 '16 04:04 sergey-dryabzhinsky

thinks,i will try it and report it here

zhxiaom5 avatar Apr 20 '16 15:04 zhxiaom5

Hi sergey thanks for your response i try it i make the changes in source code according to the following branch https://github.com/bashsiz/nginx-rtmp-module/commit/0bfbd6b39f5bc603bf58efb0f13595926b270ca6 add-player-redirect-support and recompile the nginx with the new changes i use on_publish in my application to refer to an existing location of my http and then in location i return 30x rtmp url but steel it is not working i even find an script in python tht redirect all tcp connections in the following link http://www.sivachandran.in/2009/12/simple-tcp-redirector-in-python.html this script redirects http very well but the rtmp does not redirect and the script works like proxy i dont know and there is no data for redirecting rtmp i do every thing but the redirection does not implement i use ffplay and vlc to play the video are you sure that rtmp can be redirected ?

MortezaBashsiz avatar Jun 05 '16 12:06 MortezaBashsiz

FFmpeg and vlc uses librtmp (rtmpdump project). It must support such redirects - via patches. As for other streamers/player - they need to be tested.

sergey-dryabzhinsky avatar Jun 19 '16 19:06 sergey-dryabzhinsky