Any time I want to process (forward, analyze, copy, ...) RTP video stream from FF browser or python based scripts by FFMPEG, it "chucks" and can't work with it. Seems to be stream encoding issue. I have a Janus server where clients join from browsers or anothers services, like Python, then I forward the stream to the URL, where FFMPEG is listening on. There is no issue when I try to process any forwarded stream coming from Chrome based browsers, but the problem occurs when I join from FF or Python.
I run ffmpeg in Ubuntu container.
The command I use:
-loglevel trace -analyzeduration 300M -probesize 300M -protocol_whitelist file,udp,rtp -i port4000.sdp -vf scale=1280:720 -vcodec libx264 -profile:v baseline -preset:v ultrafast -acodec aac -f flv -flvflags no_duration_filesize {{rtmpUrl}}
I used also very simple commands like the following but the result is the same:
ffmpeg -protocol_whitelist file,udp,rtp -i ./SDP/port4000.sdp -c copy -t 10 -y test.mkv
The SDP file I use:
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 4000 RTP/AVP 96
b=AS:200
a=rtpmap:96 VP8/90000
The screens below depicts how FFMPEG behaves in case of FF and Chrome (loglevel of ffmpeg set to trace).
Firefox: enter image description here
Chrome: enter image description here
It looks like it brokes after the following log: Before avformat_find_stream_info() pos: xxx
(Same problem is if I try to run ffprobe) Thank you for any suggestion.
As described above, I tried quite a lot of of arguments running ffmpeg, different SDP files but seems to be not enough. I want the stream to be procced properly by FFMEPG.