[FFmpeg-user] Multiple audio tracks and multiple output streams, avoiding re encoding
Aleksey Bragin
ab at alfabox.net
Wed Jan 11 03:16:37 EET 2017
Hello,
I'm trying to optimize my transcoding command.
So, I have multicast stream with 2 audio tracks and I encode video to 4 different profiles, all audio tracks have same settings:
ffmpeg -loglevel 40 -i 'udp://@239.1.1.1:1234?fifo_size=1000000&overrun_nonfatal=1' -filter_complex 'scale=1280x720,split=2[out0][out1];[0:v]scale=720x576[out2]' -map 0:v -strict experimental -vcodec libx264 -profile:v high -level 4 -b:v 6000k -bufsize 600k -minrate 6000k -maxrate 6000k -map 0:1 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -map 0:2 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -f mpegts -y 'udp://239.8.8.8:5555?pkt_size=1316' -map [out0] -strict experimental -vcodec libx264 -profile:v high -level 4 -b:v 4500k -bufsize 450k -minrate 4500k -maxrate 4500k -map 0:1 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -map 0:2 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -f mpegts -y 'udp://239.8.8.8:6666?pkt_size=1316' -map [out1] -strict experimental -vcodec libx264 -profile:v high -level 4 -b:v 3500k -bufsize 350k -minrate 3500k -maxrate 4500k -map 0:1 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -map 0:2 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -f mpegts -y 'udp://239.8.8.8:7777?pkt_size=1316' -map [out2] -strict experimental -vcodec libx264 -profile:v main -level 3 -b:v 2500k -bufsize 250k -minrate 2500k -maxrate 2500k -map 0:1 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -map 0:2 -acodec libfdk_aac -b:a 128k -ar 48000 -ac 2 -f mpegts -y 'udp://239.8.8.8:8888?pkt_size=1316'
Using this command - I'm encoding audio tracks 8 times while I only need 2.
Is there any way to rewrite this command to avoid unnecessary encoding of audio streams ?
Thank you.
More information about the ffmpeg-user
mailing list