content_type option is not working with tee output
|Reported by:||animtim||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
When using ffmpeg to send a webm video stream to an icecast server, it needs the option -content_type video/webm . It works fine for a single output, but when using a tee output (to both send the stream to the server and save to disk for example), the -content_type option is lost and default value (audio/mpeg) is used instead, so the stream on the icecast server is not readable.
I could workaround the issue locally by editing libavformat/icecast.c to replace the default value to video/webm and rebuild ffmpeg, but of course this is not a solution for most users...
Also, I tried to pass the option to the corresponding tee output but it was not recognized/not working.
So I guess it is a bug to fix... Or maybe I missed something?
How to reproduce:
-install an icecast server, with a mountpoint for video.webm, and of course adapt the source, password and url in the command below:
ffmpeg -video_size 1920x1080 -thread_queue_size 512 -framerate 30 -f x11grab -i :0.0+0,0 \ -thread_queue_size 512 -f pulse -ac 2 -i default \ -f webm -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \ -vf scale=640:-1 \ -acodec libvorbis -aq 4 \ -vcodec libvpx -b:v 1000K -crf 40 -g 150 -deadline good -threads 2 \ -f tee -map 0:v -map 1:a "icecast://source:email@example.com:8000/video.webm|savedVideo.webm" ffmpeg version 4.1.5 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8.4.0 (Mageia 8.4.0-1.mga7)
Note: tested with several distribution packages (Debian stable and sid, Manjaro), issue is the same.