【问题标题】:ffmpeg with Axis P1347 returns 400 Bad Request, but Axis 1357 works带有 Axis P1347 的 ffmpeg 返回 400 Bad Request,但 Axis 1357 有效
【发布时间】:2016-08-27 23:34:47
【问题描述】:

我有两个摄像头:一个 Axis P1347 和一个 Axis P1357。 ffmpeg 在 P1347 上获得 400 Bad Request,但在 P1357 上一切正常。

我能够成功使用 vlcAxis P1347 相机 使用以下 URL 流式传输 rtsp 视频:

rtsp://10.8.3.85:554/axis-media/media.amp?videocodec=h264&audio=1 

但是,ffmpeg 中的相同 URL 为 Axis 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 命令非常适用于几乎相同的 Axis 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

如果 vlc 可以显示视频,显然rtsp 已打开并正常工作,对吗?那么为什么 VLC 可以与相机一起使用,而不是 ffmpeg 呢?注意 ffmpeg 已安装并与类似的相机正常工作。

【问题讨论】:

    标签: ffmpeg rtsp


    【解决方案1】:

    原来 P1347 正在输出 64 位编解码器,而 ffmpeg 没有编解码器可以摄取。 VLC 已安装 64 位编解码器。

    我将研究如何安装 64 位编解码器并将其用于 P1347 相机。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-31
      • 1970-01-01
      • 1970-01-01
      • 2020-04-17
      • 2020-11-01
      • 1970-01-01
      • 2017-11-30
      • 1970-01-01
      相关资源
      最近更新 更多