IP 摄像头的 FFmpeg RTSP 问题
我下载了 FFmpeg Windows 二进制文件,并成功地将 ffplay.exe 用于媒体文件和一些支持 RTSP 的 Ip 摄像机(例如 Acti)。
我在 Bosch( h264) NDC 265 P 相机上尝试 ffplay ,但不起作用。当我使用调试选项启动 ffplay 时,我得到以下信息:
D:\Test>ffplay -debug 1 rtsp:/XXXXXXXXXX/video
FFplay version SVN-r26400, Copyright (c) 2003-2011 the FFmpeg developers
built on Jan 18 2011 04:09:28 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
--enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
--enable-shared --disable-static
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
[rtsp @ 006db540] SDP:
v=0
o=- 0 0 IN IP4 XXXXXXXXXX
s=LIVE VIEW
t=0 0
c=IN IP4 0.0.0.0
m=video 0 RTP/AVP 35
a=rtpmap:35 H264/90000
a=control:rtsp://XXXXXXXXXX/video
a=recvonly
a=fmtp:35 packetization-mode=1;profile-level-id=4d0028;sprop-parameter-sets=Z00A
KI2NKAoAt2AgEA==,aO48gA==
[rtsp @ 006db540] video codec set to: (null)
[rtsp @ 006db540] hello state=0
[rtsp @ 006db540] Probe buffer size limit 5000000 reached
[rtsp @ 006db540] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp:/XXXXXXXXXX/video':
Metadata:
title : LIVE VIEW
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0, 4035, 1/90000: Video: [0][0][0][0] / 0x0000, 90k tbr, 90k tbn,
90k tbc
rtsp:/XXXXXXXXXX/video: c1o3u0l1d7 3n2o1t5 2o.p2e1n Ac-oVd:e c s0
.000 s:0.0 aq= 0KB vq= 0KB sq= 0B f=0/0
我可以使用 VLC 播放器播放博世 IP 摄像机...但不能使用 FFmpeg...
那么
- ffmpeg 不支持 H264 吗?
I download FFmpeg windows binary and use ffplay.exe successfully for media files and some Ip Cameras with RTSP support (eg Acti).
I try ffplay on a Bosch( h264) NDC 265 P camera it does not work. When i start ffplay with debug option i get folllowing
D:\Test>ffplay -debug 1 rtsp:/XXXXXXXXXX/video
FFplay version SVN-r26400, Copyright (c) 2003-2011 the FFmpeg developers
built on Jan 18 2011 04:09:28 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
--enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
--enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
-enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
--enable-shared --disable-static
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
[rtsp @ 006db540] SDP:
v=0
o=- 0 0 IN IP4 XXXXXXXXXX
s=LIVE VIEW
t=0 0
c=IN IP4 0.0.0.0
m=video 0 RTP/AVP 35
a=rtpmap:35 H264/90000
a=control:rtsp://XXXXXXXXXX/video
a=recvonly
a=fmtp:35 packetization-mode=1;profile-level-id=4d0028;sprop-parameter-sets=Z00A
KI2NKAoAt2AgEA==,aO48gA==
[rtsp @ 006db540] video codec set to: (null)
[rtsp @ 006db540] hello state=0
[rtsp @ 006db540] Probe buffer size limit 5000000 reached
[rtsp @ 006db540] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp:/XXXXXXXXXX/video':
Metadata:
title : LIVE VIEW
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0, 4035, 1/90000: Video: [0][0][0][0] / 0x0000, 90k tbr, 90k tbn,
90k tbc
rtsp:/XXXXXXXXXX/video: c1o3u0l1d7 3n2o1t5 2o.p2e1n Ac-oVd:e c s0
.000 s:0.0 aq= 0KB vq= 0KB sq= 0B f=0/0
I can play Bosch IP camera with VLC Player...But can not with FFmpeg...
So
- Does ffmpeg not support H264?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在尝试使用 ffplay(版本 0.10)播放来自 Bosch DINION HD 摄像机的 H.264 流时,遇到了同样的问题。
问题的根本原因在于 SDP 中的有效负载类型不正确:
博世设备在
pt
值 35 而不是正常的动态范围上发送数据是常见情况。只需删除 h264/mpeg4 和 h263 (de)payloader 中的
pt
即可获得对博世的支持。还有与此问题相关的几个相关问题:
另一组博世设备也发现了同样的情况:博世 DINION HD 720p IVA、博世 DINION NBN-498-P IVA、博世 NTC-255-PI、博世 VIP X1600 XFM4。
Got the same issue with H.264 stream from Bosch DINION HD camera on attempt to play it with ffplay (version 0.10).
The root cause of your problem is in the incorrect payload type in SDP:
Looks like that's common case for Bosch devices to send out their data on
pt
value 35 instead of the normal dynamic range.Just remove the
pt
in the h264/mpeg4 and h263 (de)payloaders and you will have support for Bosch.As well several related issues for this problem:
Same was found for set of another Bosch devices: Bosch DINION HD 720p IVA, Bosch DINION NBN-498-P IVA, Bosch NTC-255-PI, Bosch VIP X1600 XFM4.