웹캠에서 비디오를 스트리밍하기 위해 RPi에서 ffmpeg를 설정하려고했습니다.
이것은 내 시작 스크립트입니다.
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>
이 문제를 해결하는 방법에 대한 아이디어가 있습니까?
"바인드 (포트 272) : 이미 사용중인 주소"라고 표시되어 있습니다. 해당 포트에서 실행중인 다른 것이 없는지 확인하십시오.
—
slhck December
@slhck 업데이트 출력
—
RichusX