Comments (10)
I solved this problem by adding below in first line of nginx.conf.
user root
It's Ridha Ben Njima's answer.
from nginx-rtmp-module.
I got this issue too. I wrote a workaround: start the ffmpeg a bit later:
Elbandi/nginx-rtmp-module@4abde8a
from nginx-rtmp-module.
Exec is currently disabled on freebsd. If you help me to test it I'll enable it. I cannot do it right now since I'm away from city. You can comment ifdef linux in exec_module file and report what happens. ------ Первонач. сообщение ------От: [email protected]Дата: 02.08.2012 13:11:39Кому: Roman ArutyunyanТема: [nginx-rtmp-module] Exec not working in master ? (#37) Here is my simple config for current master branch on FreeBSD 9.x :
I have tried to mimic the "big & small" setup but without luck.
rtmp {
server {
listen 1.2.3.4:1935;
chunk_size 128;
publish_time_fix off;
application proxy {
live on;
exec /usr/local/bin/ffmpeg -re -i rtmp://1.2.3.4:1935/$app/$name -vcodec flv -acodec copy -s 32x32 -f flv rtmp://1.2.3.4:1935/720p/$name;
hls on;
hls_path /home/stream/hls;
hls_fragment 15s;
}
application 720p {
live on;
}
application 480p {
live on;
}
application 360p {
live on;
}
application 240p {
live on;
}
}
}
If I run the following command outside nginx in a shell ..:
/usr/local/bin/ffmpeg -re -i rtmp://1.2.3.4:1935/proxy/test -vcodec flv -acodec copy -s 32x32 -f flv rtmp://1.2.3.4:1935/720p/test;
It works as expected
What would you advise checking ?
(Note HLS works fine)
Reply to this email directly or view it on GitHub:
#37
from nginx-rtmp-module.
I'ld be glad to help
Recompiling right now.
Is there an event I could use to only filter from debug logs the rtmp_exec part ?
from nginx-rtmp-module.
Got the linux part commented, and nginx running.
I have error_log set to debug.
Doing a simple
tail -f error.log | grep -B 40 -A 40 exec
I only see the following
2012/08/02 11:21:07 [debug] 90027#0: *1 exec: run 1 command(s)
But no other log that seems to me related to exec in the 40 lines before and after that one..
Again, I do not know how to filter exec specific log infos .. Maybe there is a more appropriate way to do so ?
Ps: also tried adding "sleep 3 && " at the beginning of the exec, but no luck
from nginx-rtmp-module.
Was command executed actually? If not then I should debug that code. I'll do that when I come back to Moscow. ------ Первонач. сообщение ------От: [email protected]Дата: 02.08.2012 15:22:46Кому: Roman ArutyunyanТема: Re: [nginx-rtmp-module] Exec not working in master ? (#37) Got the linux part commented, and nginx running.
I have error_log set to debug.
Doing a simple
tail -f error.log | grep -B 40 -A 40 exec
I only see the following
2012/08/02 11:21:07 [debug] 90027#0: *1 exec: run 1 command(s)
But no other log that seems to me related to exec in the 40 lines before and after that one..
Again, I do not know how to filter exec specific log infos .. Maybe there is a more appropriate way to do so ?
Ps: also tried adding "sleep 3 && " at the beginning of the exec, but no luck
Reply to this email directly or view it on GitHub:
#37 (comment)
from nginx-rtmp-module.
I used a simple
exec echo foo > /home/stream/logs/test;
but the file /home/stream/logs/test is not created, so I assume the command is not run by nginx.
sure no problem, hope you're enjoying a vacation ;)
Ps: when you have time pls check the Wirecast related ticket too - I'm dying for that one ;)
from nginx-rtmp-module.
You use shell syntax which is obviously not supported. Run bash or use another command like touch. ------ Первонач. сообщение ------От: [email protected]Дата: 02.08.2012 16:12:27Кому: Roman ArutyunyanТема: Re: [nginx-rtmp-module] Exec not working in master ? (#37) I used a simple
exec echo foo > /home/stream/logs/test;
but the file /home/stream/logs/test is not created, so I assume the command is not run by nginx.
sure no problem, hope you're enjoying a vacation ;)
Reply to this email directly or view it on GitHub:
#37 (comment)
from nginx-rtmp-module.
Woops, I'm sorry, I was so eager to provide feedback that I did not think clearly.
I was previously using my .sh script that invokes ffmpeg, and bluntly tried to susbsitute it with a few shell commands, this was wrong.
So, I remade the tests, this time using a dead-simple shell script:
/home/stream/test.sh
#!/bin/sh
echo "foo" > /home/stream/logs/test
and in nginx:
exec /home/stream/test.sh;
but same result... no "/home/stream/logs/test" file .. so I'm assuming the exec command is not triggered..
from nginx-rtmp-module.
I've tested & committed exec feature on FreeBSD 6.3. Everything works perfectly. ffmpeg starts normally. Closing the issue.
from nginx-rtmp-module.
Related Issues (20)
- Control Module returns error 500
- [Windows] Trouble compiling the module on Windows
- aung2 HOT 1
- rtmp模块支持lua吗?
- on_publish, connection refuses no matter what I put in it. HOT 1
- How to convert RTMP to HTTP-FLV?
- No env available to exec
- Unused variables
- Failed to relay on_publish HOT 1
- Multiple streams on the same app HOT 1
- streaming in a high latency environment?
- RTMP stream not accepted by NGNIX
- Docker image HOT 2
- exec_publish scripts access
- Streaming panel - accounting HOT 1
- [Question] How to consume the rtmp stream HOT 1
- Error: already publishing HOT 2
- Does not compile with default options on Apple clang 14.0.3
- libnginx-mod-rtmp : Depends: nginx-abi-1.24.0-1 on Ubuntu 24.04
- [Question]Problem authtenticating in a few devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-rtmp-module.