[FFmpeg-user] TEE muxer and missing mpegts_flags

Alex Molon alex.molon at vision247.com
Wed Jun 26 13:26:32 EEST 2019

Hi All,

I need to live encode a video and send it to two separate UDP outputs with different settings, since the only difference is  the audio track, I was thinking to use the TEE muxer but I don't know how to pass a mpegts_flag

At the moment I'm using two different processes, but I'm wasting CPU resources:
Process 1: ffmpeg -i input -c:v libx264 -c:a libfdk_aac -flags:a +global_header -latm 1 -profile:a aac_he -mpegts_flags latm -f mpegts udp://
Process 2: ffmpeg -i input -c:v libx264 -c:a libfdk_aac -f mpegts udp://

So I've tried with something like this:

ffmpeg -i input -map 0:v -map 0:a -map 0:a -c:v libx264 -c:a libfdk_aac -flags:a:0  +global_header -latm 1 -profile:a: aac_he -f tee "[f=mpegts:mpegts_flags=latm,select=\'0,1\']udp://|[f=mpegts,select=\'0,2\']udp://"

but it sems the option mpegts_flags=latm is totally ignored since I can see this error:

[LATM/LOAS muxer @ 0x55f4f9d038c0] Muxing MPEG-4 AOT 21 in LATM is not supported
[tee @ 0x55f4f6689600] Slave '[f=mpegts:mpegts_flags=latm:select='0,4']udp://': error writing header: Invalid data found when processing input

Where am I wrong?
Any suggestion?

Thanks in advance.

Alex Molon

More information about the ffmpeg-user mailing list