Hi,
I'm trying to understand how to scale FFmpeg so that it can stream to different sources from one machine. During my experiments in order to understand the single machine capacity I'm trying to run the following command: ffmpeg -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset slow -tune zerolatency -pix_fmt yuv420p -f mpegts - > out1.mp4 Then again the same command but output to different file, and so on: ffmpeg -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset slow -tune zerolatency -pix_fmt yuv420p -f mpegts - > outN.mp4 And I'm seeing that even the first command produces less FPS then I requested: When I'm starting the second process it drops even lower: At the same time I have a pretty capable machine with Intel Core i7-10610U CPU unit and RAM is not an issue. Am I right to understand that the lower than expected FPS means I have issues and if I want to spawn multiple FFmpeg processes I will have issues? Thanks _______________________________________________ ffmpeg-user mailing list [hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe". |
> Am 12.03.2021 um 08:27 schrieb <[hidden email]> <[hidden email]>: > > I'm trying to run the following command: When asking questions on this mailing list, please do not attach screenshots of your console output, instead post the command line you tested (without using the hidebanner option!) together with the complete, uncut console output. A few random comments: mpegts and mp4 are not the same things. You generally cannot request an FPS rate. When you use the x264 preset „slow“ do not expect it to work in real-time. There is a tee muxer and it is mentioned in the documentation. Carl Eugen _______________________________________________ ffmpeg-user mailing list [hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe". |
Hi,
Here are the three commands used: ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL1 ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL2 ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL3 All the presets are 'medium' now. And here are the outputs: [info] frame= 2222 fps= 25 q=17.0 size= 124402kB time=00:01:14.03 bitrate=13765.4kbits/s speed=0.835x [info] frame= 3441 fps= 19 q=18.0 size= 192778kB time=00:01:54.68 bitrate=13769.8kbits/s speed=0.631x [info] frame= 2632 fps= 17 q=18.0 size= 147456kB time=00:01:27.70 bitrate=13773.6kbits/s speed=0.582x Thanks for the note about tee muxer, I read that it can send output to multiple locations, but in my particular example I'm trying leverage a case when I have multiple sources to be streamed to different locations. The main question I have is - what if I want to stream to N different locations from one machine? If the quality of the output will be decreasing when each next process is starting, then it leaves me with running only one process on a machine? Sorry in case I'm missing something. Thanks -----Original Message----- From: ffmpeg-user <[hidden email]> On Behalf Of Carl Eugen Hoyos Sent: Friday, March 12, 2021 9:59 AM To: FFmpeg user questions <[hidden email]> Subject: Re: [FFmpeg-user] How to scale FFmpeg > Am 12.03.2021 um 08:27 schrieb <[hidden email]> <[hidden email]>: > > I'm trying to run the following command: When asking questions on this mailing list, please do not attach screenshots of your console output, instead post the command line you tested (without using the hidebanner option!) together with the complete, uncut console output. A few random comments: mpegts and mp4 are not the same things. You generally cannot request an FPS rate. When you use the x264 preset „slow“ do not expect it to work in real-time. There is a tee muxer and it is mentioned in the documentation. Carl Eugen _______________________________________________ ffmpeg-user mailing list [hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list [hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe". |
First off, please do not top-post here.
On Fri, Mar 12, 2021 at 10:50:51AM +0200, [hidden email] wrote: > Hi, > > Here are the three commands used: > ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL1 > ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL2 > ffmpeg -threads 0 -loglevel repeat+level+verbose -f lavfi -i testsrc2=s=1920x1080:r=30 -f lavfi -i sine -c:a aac -ar 48000 -b:a 64k -c:v libx264 -crf 18 -preset medium -tune zerolatency -pix_fmt yuv420p -f mpegts - > NUL3 > > All the presets are 'medium' now. > > And here are the outputs: > [info] frame= 2222 fps= 25 q=17.0 size= 124402kB time=00:01:14.03 bitrate=13765.4kbits/s speed=0.835x > [info] frame= 3441 fps= 19 q=18.0 size= 192778kB time=00:01:54.68 bitrate=13769.8kbits/s speed=0.631x > [info] frame= 2632 fps= 17 q=18.0 size= 147456kB time=00:01:27.70 bitrate=13773.6kbits/s speed=0.582x > > Thanks for the note about tee muxer, I read that it can send output to multiple locations, but in my particular example I'm trying leverage a case when I have multiple sources to be streamed to different locations. > > The main question I have is - what if I want to stream to N different locations from one machine? If the quality of the output will be decreasing when each next process is starting, then it leaves me with running only one process on a machine? You are using a rather resource hungry codec (x264), so the more instances you run simultaneously the slower *all* of them get. What are those sources you talk about? If they are already encoded material then transcoding way be unnecessary and the copy codec, which requires hardly any CPU power can be used. Or do you want to stream *one* source to multiple outputs? If so, the mentioned tee muxer can be used in a single instance of ffmpeg. > -----Original Message----- > From: ffmpeg-user <[hidden email]> On Behalf Of Carl Eugen Hoyos > Sent: Friday, March 12, 2021 9:59 AM > To: FFmpeg user questions <[hidden email]> > Subject: Re: [FFmpeg-user] How to scale FFmpeg > > > > > Am 12.03.2021 um 08:27 schrieb <[hidden email]> <[hidden email]>: > > > > I'm trying to run the following command: > > When asking questions on this mailing list, please do not attach screenshots of your console output, instead post the command line you tested (without using the hidebanner option!) together with the complete, uncut console output. > > A few random comments: > mpegts and mp4 are not the same things. > You generally cannot request an FPS rate. > When you use the x264 preset „slow“ do not expect it to work in real-time. > There is a tee muxer and it is mentioned in the documentation. ffmpeg-user mailing list [hidden email] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe". |
Free forum by Nabble | Edit this page |