0

I have an RTP stream coming from Kurento Media Server.

I would like to record this stream to a file using ffmpeg. I'm running the command

ffmpeg -protocol_whitelist file,crypto,udp,rtp -i a.sdp -c:v libx264 -analyzeduration 100M -probesize 100M -y output.mp4

The SDP File is :

v=0
o=- 3831930560 3831930560 IN IP4 127.0.0.1
s=Kurento Media Server
c=IN IP4 127.0.0.1
t=0 0
m=audio 20000 RTP/AVPF 96 0 97
a=setup:actpass
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=rtpmap:96 opus/48000/2
a=rtpmap:97 AMR/8000
a=rtcp:13001
a=sendrecv
a=mid:audio0
a=ssrc:2843019226 cname:user7547104516@host-14132be
m=video 20002 RTP/AVPF 102 103
a=setup:actpass
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=rtpmap:102 VP8/90000
a=rtpmap:103 H264/90000
a=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtcp:56917
a=sendrecv
a=mid:video0
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 ccm fir
a=rtcp-fb:103 nack
a=rtcp-fb:103 nack pli
a=rtcp-fb:103 ccm fir
a=ssrc:1320996934 cname:user7547104516@host-14132be

ffmpeg starts recording however it records only audio. No video recorded and I'm having the error : Could not find codec parameters for stream 1 (Video: vp8, yuv420p): unspecified size

Does anyone know how to solve that please ?

Thanks, Cheers.

enter image description here

1
  • did you find any solution for this? can you please share it as answer? Commented Aug 14, 2022 at 7:15

1 Answer 1

2

Option placement matters. -analyzeduration and -probesize are input options, but you are attempting to use them as output options. Order:

ffmpeg [input options] input [output options] output

So try:

ffmpeg -analyzeduration 100M -probesize 100M -protocol_whitelist file,crypto,udp,rtp -i a.sdp -c:v libx264 output.mp4
2
  • Thanks for your suggestion. I corrected that but I'm getting the same error : Could not find codec parameters for stream 1 (Video: vp8, yuv420p): unspecified size. Do you have any idea please ? Commented Jun 9, 2021 at 16:21
  • @ThomasCarlton I have a feeling it's not the fault of ffmpeg. Are you sure it's actually sending the video? Can anything else receive and decode the video? Does the Kurento debug log show anything informative? Commented Jun 9, 2021 at 16:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.