0
I'm really new on ffmpeg and have a question where I cannot find a solution. I really hope that somebody from you could help me with that.
On one server I receive a 1080p stream, with ffmpeg I create a new stream with multiple bitrates and resolution and send it afterwards to a rtmp destination on this server. Below CL the command that I use at the moment and it is working.
ffmpeg -i - -copyts -muxdelay 0 -c:a libfaac -ab 128k
-c:v libx264 -preset faster -profile:v main -level 3.1 -crf 20 -g 50 -b:v 1500k -s:v 1920x1080 -f flv rtmp://localhost/stream/output_stream
-c:a libfaac -ab 64k -c:v libx264 -preset faster -profile:v main -level 3.1 -crf 23 -g 50 -b:v 1000k -s:v 1280x720 -f flv rtmp://localhost/stream/output_stream
-c:a libfaac -ab 32k -c:v libx264 -preset faster -profile:v main -level 3.1 -crf 23 -g 50 -b:v 800k -s:v 960x540 -f flv rtmp://localhost/stream/output_stream
Now I have the challenge that I need to send it to multiple servers. Is there anyway to add multiple outputs?
At the end the incoming 1080p stream should get multiple bitrates and should be send to around 10 different RTMP server.
I really hope that somebody can help me with that.
Many thanks for your help and sorry for my late reply. When I use this command I get below warning, any clue?
Codec for stream 0 does not use global headers but container format requires global headers – Chris – 2019-03-14T09:04:26.787
@Chris Command updated. Forgot the
-flags +global_header
previously. – llogan – 2019-03-14T17:06:34.603I added it and it is gone now, but when I stop ffmpeg I get below error
Failed to update header with correct duration. Failed to update header with correct filesize.
Alsoonfail=ignore
is not working, get always error "Unknown option onfail" – Chris – 2019-03-15T07:43:50.723@Chris I'm guessing you're using an ancient ffmpeg. As I mentioned in the answer I strongly recommend you update to a recent version. You didn't mention your OS, so I can only recommend taking a look at the links to builds at FFmpeg Download.
– llogan – 2019-03-15T17:14:02.900