ffserver를 사용하여 카메라 모듈에서 비디오를 스트리밍하려고합니다. 아이디어는 raspivid
출력 h264 를 허용 하고 ffmpeg / ffserver가 다시 인코딩하지 않고 스트리밍하도록하는 것입니다.
내 서버 구성은
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 8
MaxClients 4
MaxBandwidth 1000
CustomLog -
#NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
ACL allow 127.0.0.1
</Feed>
<Stream live.flv>
Feed feed1.ffm
NoAudio
</Stream>
##################################################################
# Special streams
##################################################################
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
# Redirect index.html to the appropriate site
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>
##################################################################
난 달린다
ffserver -f server.conf &
그리고
raspivid -t 0 -w 640 -h 480 -b 1024000 -fps 5 -ih -n -o - | \
ffmpeg -i - -c:v copy -r 5 -an -f flv -override_ffserver \
http://localhost:8090/feed1.ffm
그러나 ffmpeg는 불평합니다
[flv @ 0x215e520] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
Thu Mar 3 02:58:36 2016 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 276
av_interleaved_write_frame(): Connection reset by peer
[flv @ 0x215e520] Failed to update header with correct duration.
[flv @ 0x215e520] Failed to update header with correct filesize.
Error writing trailer of http://localhost:8090/feed1.ffm: Connection reset by peer
그런 다음 종료하십시오.
이 문제를 어떻게 해결합니까?
BTW, 나는 시험 raspivid
과 ffmpeg
같은 뭔가
raspivid -t 0 -w 640 -h 480 -o - | ffmpeg -i - -c:v copy test.mkv
정상적으로 작동했습니다.