ffmpeg inject video to mediasoup only can play first frame

524 Views Asked by At

I’m trying to inject a video into mediasoup by following this demo https://github.com/versatica/mediasoup-demo/blob/v3/broadcasters/ffmpeg.sh

Command :

ffmpeg -re -v info -stream_loop -1 -i video-audio-stereo.mp4 -map 0:a:0 -acodec libopus -ab 128k -ac 2 -ar 48000 -map 0:v:0 -pix_fmt yuv420p -c:v libvpx -b:v 1000k -deadline realtime -cpu-used -5 -f tee "[select=a:f=rtp:ssrc=1111:payload_type=100]rtp://xxx.xxx.xxx.xxx:49695?rtcpport=43826|[select=v:f=rtp:ssrc=2222:payload_type=101]rtp://xxx.xxx.xxx.xxx:45991?rtcpport=45288

mp4 file here https://github.com/versatica/mediasoup-demo/tree/v3/app/resources/videos

Result : on the web page, I can hear the audio fine but only show the first frame of video, the video’s clock is not running.

https://i.stack.imgur.com/WcrGh.jpg

ffmpeg command seem fine, no error message, still sending video. The mediasoup log seem normal, too.

chrome debug, The framesReceived/s looks weird https://i.stack.imgur.com/tAWT7.jpg

0

There are 0 best solutions below