[FFmpeg-user] How to encode audio once for multiple ouput?

Damian Głodny damian at artnmedia.pl
Mon Sep 1 13:07:43 CEST 2014


Hi! I have following command to stream input in 3 different qualities:

 

ffmpeg -r 25 -i udp://239.239.4.100:1234 ^

                -strict -2 -c:v libx264 -crf 21 -c:a aac -b:a 128k -f flv
rtmp://192.168.1.104:1935/ttv_hls/live_720p ^

                -strict -2 -s 640x360 -c:v libx264 -crf 25 -c:a aac -b:a
128k -f flv rtmp://192.168.1.104:1935/ttv_hls/live_360p ^

                -strict -2 -s 480x270 -c:v libx264 -crf 30 -c:a aac -b:a
128k -f flv rtmp://192.168.1.104:1935/ttv_hls/live_270p

 

As you can see I am encoding audio 3 times with same settings (what a wast
of CPU!). How I can encode audio only one time and use it for all streams?

I know I have to use -tee option but I can not do make it work ;/ Can
someone give me some hints or solution?

 

---

Pozdrawiam,

Damian Głodny | artnmedia.pl

 



More information about the ffmpeg-user mailing list