lua in nginx-rtmp context

156 views
Skip to first unread message

Alexander

unread,
Dec 23, 2020, 7:55:43 AM12/23/20
to openre...@googlegroups.com
So, the past years I've been playing around a lot with both openresty and nginx-rtmp and now I had the idea to combine the two.

However lua-nginx-module only operates in http context, whereas nginx-rtmp adds a new rtmp context where the lua-nginx directives are not applicable.

My main question would be: what would it take to be able to use certain lua-nginx directives in the nginx-rtmp context (and server + application paths)?
I'd mainly be interested to use access_by_lua_block, but others would also be handy.

Would this mean a complete rewrite of lua-nginx-module, or could we extend it to add a sort of ngix_rtmp_lua_* masking that allows these directives to be applied elsewhere?


regards,
Alexander

George Inggs

unread,
May 14, 2023, 6:15:51 PM5/14/23
to openresty-en
Hi Alexander,

Just wondering if you ever got / found an answer to this question? I also have a use case where I need to dynamically set a variable in an RTMP context with Lua and I can't seem to find any useful information as to whether it's even possible using the nginx-rtmp-module and OpenResty.

George

Jun Ouyang

unread,
May 14, 2023, 11:46:39 PM5/14/23
to openre...@googlegroups.com
I have been doing some development work in nginx-rtmp for 2 years, I want to say: nginx-rtmp is ancient software, it can not be sustainable because the leading developer can not maintain this project anymore,  I assume you do not waste more time doing this job,  you can just use the current existing function, but if you want to get more new features like lua dynamic language to extend, maybe you must do it by yourself.

George Inggs <g.i...@naoca.com.au> 于2023年5月15日周一 06:15写道:
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openresty-en/3fe406c5-1982-418c-a5d3-1a43e88cca17n%40googlegroups.com.


--
GPG public key: 4A6D297E6F74638E4D5F8E99152AC7B5F7608B26
Thanks,
Jun Ouyang

George Inggs

unread,
May 14, 2023, 11:51:23 PM5/14/23
to openresty-en
Hi Jun,

Thanks for your reply - since my last message I have managed to get my project working using the built-in directives. I agree the nginx-rtmp module is ancient and it's unfortunate that the lead developer is no longer maintaining the project, however we are using very simple workflows with a well-understood protocol, so in this case it will do the job for us I think.

Do you know of any other options, or projects we can look at as alternatives?

George

Jun Ouyang

unread,
May 15, 2023, 3:53:50 AM5/15/23
to openre...@googlegroups.com
I will recommend you use https://github.com/ossrs/srs, but it depends on which problem you want to resolve.

George Inggs <g.i...@naoca.com.au> 于2023年5月15日周一 11:51写道:
Reply all
Reply to author
Forward
0 new messages