1

Я пытался настроить ffmpeg на RPi для потоковой передачи видео с веб-камеры.

Это мой скрипт запуска:

ffserver -f /etc/ffserver.conf & ffmpeg -v verbose -r 5 -s 640x480 -f video4linux2 -i /dev/video0 localhost/webcam.ffm:272

Это вывод, который я получаю:

ffmpeg version 2.5ffserver version 2.5 Copyright (c) 2000-2014 the FFmpeg developers Copyright (c) 2000-2014 the FFmpeg developers
  built on Dec  6 2014 01:33:53 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: 
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100

  built on Dec  6 2014 01:33:53 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: 
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
[video4linux2,v4l2 @ 0x1c52450] /etc/ffserver.conf:1: Port option is deprecated, use HTTPPort instead
/etc/ffserver.conf:1: Trying to use IETF assigned system port: 272
/etc/ffserver.conf:2: BindAddress option is deprecated, use HTTPBindAddress instead
/etc/ffserver.conf:5: NoDaemon option has no effect, you should remove it
fd:3 capabilities:84000001
/etc/ffserver.conf:20: Setting default value for video bit rate tolerance = 500000. Use NoDefaults to disable it.
/etc/ffserver.conf:20: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
/etc/ffserver.conf:20: Setting default value for video max rate = 4000000. Use NoDefaults to disable it.
/etc/ffserver.conf:20: Setting default value for video buffer size = 4000000. Use NoDefaults to disable it.
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 2710.265591, bitrate: 24576 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 24576 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
[tcp @ 0x1c51f20] Connection to tcp://localhost:80 failed (Connection refused), trying next address
http://localhost/webcam.ffm: Address family not supported by protocol

Это мой ffserver.conf

Port 272
BindAddress 127.0.0.1
MaxClients 15
MaxBandwidth 50000
NoDaemon

<Feed webcam.ffm>
file /tmp/webcam.ffm
FileMaxSize 10M
</Feed>

<Stream webcam.mjpeg>
Feed webcam.ffm
Format mjpeg
VideoSize 640x480
VideoFrameRate 10
VideoBitRate 2000
VideoQMin 1
VideoQMax 10
</Stream>

Есть идеи, как решить эту проблему?

0