Answer the question
In order to leave comments, you need to log in
ffmpeg nginx transcoding .bat not listening on port?
Greetings. I don't know if I chose the right thread or not. But the crux of the matter is this. There is Windows 10. Installed nginx+ffmpeg
The stream is sent to nginx and is divided into two streams. One stream goes to one stream site in a 25Mbit bitrate. The second stream is sent to ffmpeg for transcoding with a 7Mb post-transmission to another stream site. There is a .bat file to start transcoding. You run it and it picks up the stream and does what it needs with it. The problem is that you need to run .bat only when there is a thread. If there is no thread, after starting for 20 seconds, the thread waits and is cut down. It is necessary to make it always wait for the stream and start transcoding as soon as it waits.
Since there is no way to remotely enter and run the batch file manually every time
bin\ffmpeg -i rtmp://127.0.0.1/restreamdima/ -vcodec libx264 -g 60 -preset medium -b:v 6500k -maxrate 6500k -bufsize 6500k -s 1600x900 -x264opts nal-hrd=cbr:force-cfr= 1:keyint=60 -sws_flags lanczos -acodec copy -r 60 -f flv rtmp:
//127.0.0.1/transcodedima
Answer the question
In order to leave comments, you need to log in
"Flow" is too abstract. There are files, processes, open ports, and so on. - objects that can be checked whether they exist or not. You need to associate your stream with some object, the existence of which can be checked in the batch file. Then you can determine whether the object exists in a batch file in an eternal loop, then run your ffmpeg.
Another variant. What generates your initial flow should also start the batch file.
Another option: since ffmpeg crashes with an error, if there is no stream, then you can simply drive the launch of ffmpeg into an eternal loop and let it check for the existence of the stream itself. When it falls out again, the batch file will launch it again at the next iteration of the loop.
Decided to answer the question. If anyone is interested, here is -use_wallclock_as_timestamps 1
Or is it a new ffmpeg downloaded now it works like this) didn’t test without a command) did two actions at once) and left it like that
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question