FFmpeg (avconv) rtp 流,如何附加 sdp 文件?
FFmpeg (avconv) rtp stream, how to attach sdp file?
我有一个带有 h.254 视频的 rtp 直播流,我想将它复制到我使用的文件中:
avconv -i rtp://@192.168.0.34:60005 -an -acodec copy -vcodec copy abc.mp4
但是我有一个错误:
[rtp @ 0x1f6cfe0] Unable to receive RTP payload type 96 without an SDP file describing it
没关系,因为avconv不知道里面是什么
我的sdp文件:
v=0
o=- 20966096445 1 IN IP4 0.0.0.0
t=0 0
a=type:broadcast
a=control:*
a=x-qt-text-nam:brovotech
a=x-qt-text-inf:live/sub
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d001e;sprop-parameter-sets=Z00AHpWoLASZ,aO48gA==
如何附加 FFmpeg 的 sdp 文件?或者设置一些参数来描述流?
只需使用 avconv -i camera.sdp
camera.sdp:
...
o=- 20966096445 1 IN IP4 my_ip
...
m=video my_port RTP/AVP 96
我有一个带有 h.254 视频的 rtp 直播流,我想将它复制到我使用的文件中:
avconv -i rtp://@192.168.0.34:60005 -an -acodec copy -vcodec copy abc.mp4
但是我有一个错误:
[rtp @ 0x1f6cfe0] Unable to receive RTP payload type 96 without an SDP file describing it
没关系,因为avconv不知道里面是什么
我的sdp文件:
v=0
o=- 20966096445 1 IN IP4 0.0.0.0
t=0 0
a=type:broadcast
a=control:*
a=x-qt-text-nam:brovotech
a=x-qt-text-inf:live/sub
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:8
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d001e;sprop-parameter-sets=Z00AHpWoLASZ,aO48gA==
如何附加 FFmpeg 的 sdp 文件?或者设置一些参数来描述流?
只需使用 avconv -i camera.sdp
camera.sdp:
...
o=- 20966096445 1 IN IP4 my_ip
...
m=video my_port RTP/AVP 96