本帖最后由 fayfive 于 2017-1-22 13:01 编辑
我在linux里编译好ffmpeg所有问题件,用ffmpeg做服务器,在ffserver.conf里面加上[AppleScript] 纯文本查看 复制代码 <Stream test.mpg>
Feed feed1.ffm
VideoFrameRate 30
VideoSize 960x540
VideoBitRate 100
VideoGopSize 30
NoAudio
PreRoll 10
StartSendOnKey
MaxTime 100
</Stream>
<Stream test.h264>
Feed feed1.ffm
Fomate rtp
#VideoCodec libx264
VideoFrameRate 25
VideoSize 320*288
VideoBitRate 300
VideoGopSize 30
AVPresetVideo default
PixelFormat yuv420p
AVOptionVideo me_range 4
AVOptionVideo qdiff 4
AVOptionVideo qmin 20
AVOptionVideo qmax 500
NoAudio
</Stream>
用ffplay播放
[AppleScript] 纯文本查看 复制代码 ./ffplay http://localhost:9999/test.mpg
[AppleScript] 纯文本查看 复制代码 ./ffplay rtsp://localhost:9990/test.h264
发现http播放没有问题,但是rtsp播放报错
[AppleScript] 纯文本查看 复制代码 av_interleaved_write_frame(): Connection reset by peer
Error writing trailer of http://localhost:9999/feed1.ffm: Connection reset by peer
[1]+ Segmentation fault (core dumped) ./ffserver -f tests/ffserver.conf
ffserver运行命令是
[AppleScript] 纯文本查看 复制代码 ./ffserver -f tests/ffserver.conf &./ffmpeg -i /home/alfred/4in1.h264 http://localhost:9999/feed1.ffm
个人感觉是ffserver有问题,一连接就断
希望高手回答一下
|