【问题标题】:ffmpeg : Could not find codec parameters for stream 1 (Video: vp8, yuv420p): unspecified size?ffmpeg:找不到流 1 的编解码器参数(视频:vp8,yuv420p):未指定大小?
【发布时间】:2021-06-06 02:29:55
【问题描述】:

我有一个来自 Kurento 媒体服务器的 RTP 流。

我想使用 ffmpeg 将此流录制到文件中。我正在运行命令

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

SDP 文件是:

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 开始录制,但它只录制音频。没有录制视频,我遇到错误:找不到流 1 的编解码器参数(视频:vp8,yuv420p):未指定大小

请问有人知道怎么解决吗?

谢谢, 干杯。

【问题讨论】:

  • 总是建议使用最新版本的ffmpeg来丢弃旧版本的问题。 4.4 是最新版本,但您使用的是 3.4.8。
  • 感谢您的建议@HernánAlarcón。我将它更新到 4.4 但仍然有同样的问题。请问你有什么想法吗?

标签: ffmpeg


【解决方案1】:

选项放置很重要。 -analyzeduration-probesize 是输入选项,但您正试图将它们用作输出选项。顺序:

ffmpeg [input options] input [output options] output

那就试试吧:

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

【讨论】:

    猜你喜欢
    • 2017-08-24
    • 2020-07-16
    • 2017-07-16
    • 2022-01-17
    • 2011-04-13
    • 2021-07-07
    • 1970-01-01
    • 2020-08-01
    • 2012-07-24
    相关资源
    最近更新 更多