Open jgmio opened 8 years ago
Create bash/python script and use exec_pull on this script. You can use arrays in Python, so it should be exactly same difficulty level :)
That is actually a very good idea!!! could I execute an API call to say NodeJS or even an external server?
I will open some time in a few hours to try this. I'll get back to you.
Sorry, I just learned Linux + nginx + nginx-rtmp module this month so thanks for understanding my level of ignorance
Didn't get time today :(
You should read more, ask less. You can.
You are right. Usually I do but this project is on a super tight schedule and I needed to focus on other tasks first.
Thanks for your help.
Sorry to say I can not get a bash to run from the exec command. Followed instructions in regards to the bash wrapper (1), tried the solution @arut provided (2). I've started using chmod to free log/, add execution permissions to scripts... I need more guidance in this because I don't have the linux skills or experience to know what to search for...
The test script:
#!/bin/bash
printf "%s" "teeest" >> ~/log/ffmpeg_wrapper.log
The intended script:
#!/bin/bash
on_die ()
{
# kill all children
pkill -KILL -P $$
}
now=$(date +"%b_%d_%Y_%H.%M.%S")
printf '%s\t%s\n' "$now" "$1" >> ~/log/ffmpeg_wrapper.log
trap 'on_die' TERM
ffmpeg -report -rtsp_transport tcp -r 15 -probesize 32 -analyzeduration 0 -i rtsp://###.###.###.###:$1/live2.sdp -threads 1 -c:v libx264 -g 250 -b:v 350k -profile:v baseline -preset:v ultrafast -tune zerolatency -an -f flv rtmp://localhost:1935/output/$1 &
wait
Both don't seem to run. I've tried (also to full path versions)
exec bash -x ~/scripts/scripts.sh
exec bash -c ~/scripts/scripts.sh
exec /bin/bash -x ~/scripts/scripts.sh
exec /bin/sh -x ~/scripts/scripts.sh
*bumb
hi @jgmio, Did you solved this issue? I'm dealing with the same
Before I start with my obstacle I want to say this module rocks!! I'm in the middle of a large tech. feasibility project and you really saved me lots of time!
I have a large set with sets of private rstp streams that i need to link with public keys.
The map $a $b{ } directive would solve it but is not allowed. Is there another way to use such a functionality? (http://nginx.org/en/docs/http/ngx_http_map_module.html)