Reputation: 5968
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
How can I solve that?
Upvotes: 0
Views: 8327
Reputation: 133743
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
Upvotes: 2