我有两个相机:一个 Axis P1347 和一个 Axis P1357。 ffmpeg
获得 400 Bad Request
在 P1347 上,但在 P1357 上一切正常。
我可以 成功使用 流式传输 rtsp 视频vlc 来自 轴P1347相机使用以下网址:
rtsp://10.8.3.85:554/axis-media/media.amp?videocodec=h264&audio=1
但是, 中的相同 url ffmpeg 为 提供以下信息轴P1347相机 :
root@ubuntu4-virtual-machine:/home/ubuntu4# ffmpeg -re -v verbose -i "rtsp://10.8.3.85:554/axis-media/media.amp?videocodec=h264&audio=1"
ffmpeg version git-2016-05-02-9fcb59c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
libavutil 55. 23.100 / 55. 23.100
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 35.100 / 57. 35.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
rtsp://10.8.3.85:554/axis-media/media.amp?videocodec=h264&audio=1: Server returned 400 Bad Request
一样的 ffmpeg 命令与几乎相同的 配合得很好轴P1357相机 :
root@ubuntu4-virtual-machine:/home/ubuntu4# ffmpeg -re -rtsp_transport tcp -i "rtsp://10.8.3.90:554/axis-media/media.amp?videocodec=h264&audio=1"
ffmpeg version git-2016-05-02-9fcb59c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
libavutil 55. 23.100 / 55. 23.100
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 35.100 / 57. 35.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, rtsp, from 'rtsp://10.8.3.90:554/axis-media/media.amp?videocodec=h264&audio=1':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.083300, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709), 2592x1944 [SAR 1:1 DAR 4:3], 12 tbr, 90k tbn
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
显然
rtsp
如果 vlc 可以显示视频,则已打开并正常工作,对吗?那么为什么 VLC 可以与相机一起使用,而不是 ffmpeg 呢?注意 ffmpeg 已安装并与类似的相机正常工作。
最佳答案
事实证明,P1347 正在输出一个 64 位编解码器,而 ffmpeg 没有可摄取的编解码器。 VLC 安装了 64 位编解码器。
我将研究如何安装 64 位编解码器并将它们用于 P1347 相机。
关于带有 Axis P1347 的 ffmpeg 返回 400 Bad Request,但 Axis 1357 有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36995388/