I'm trying to send an rtmp stream to wowza with the tee muxer. Then I'm reading the stream from wowza in HLS. When running this command it works:

ffmpeg -re -i myVideo.mp4 -c copy -f flv 'rtmp://x.x.x.x/broadcast/myStream'

Then when I read the stream it works as expected.

But if I try with the tee muxer like this:

ffmpeg -re -i myVideo.mp4 -map 0:v -map 0:a -c:v libx264 -c:a aac -f tee '[f=flv]rtmp://x.x.x.x/broadcast/myStream'

I can read the rtmp stream received on wowza but when reading it from HLS, there is no video (even though ffprobe tells me that there is a video stream). I must be missing some parameters that are passed on automatically when using standard flv format. But looking at the documentation, the format should be engough. https://ffmpeg.org/ffmpeg-formats.html#tee-1

PS: I'm using version 4.2


Thanks to this post FFmpeg: tee muxer fails on multiple outputs HLS and .mp4 I realized I was missing a -flags +global_header option. It is mandatory when using TEE format and FLV output.

This command works:

ffmpeg -re -i myVideo.mp4 -map 0:v -map 0:a -c:v libx264 -c:a aac -flags +global_header -f tee '[f=flv]rtmp://x.x.x.x/broadcast/myStream'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.