FFmpeg实时流错误:ffmpeg av_interleaved_write_frame损坏的管道。转换失败

时间:2017-02-26 06:42:08

标签: linux ffmpeg streaming ubuntu-server ffserver

我正在尝试使用ffmpeg直播视频。视频流来自网络上的摄像头,并且在执行此操作的初始阶段出现了一堆错误但是在这里我堆叠了一个错误来自ffmpeg,其中说av_interleaved_write_frame()破坏了管道,然后在最后我收到一条消息说转换失败了,当我想以任何格式捕获流时,它就像魅力一样,但是当涉及流媒体时,它会给出错误。为什么会发生这种情况?

我用于获取流媒体的命令在这里:

ffmpeg - i rtsp://10.63.191.250/aerostat http://10.20.1.142:8080/feed.ffm
or 
ffmpeg - i rtsp://10.63.191.250/aerostat -acodec copy -vcodec copy http://10.20.1.142:8080/feed.ffm
//with both the command i am getting the same error

ffmpeg out put在这里:

[h264 @ 0x3965b40] decode_slice_header error
[h264 @ 0x3965b40] no frame!
[h264 @ 0x3965b40] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3965b40] decode_slice_header error
[h264 @ 0x3965b40] no frame!
Input #0, rtsp, from 'rtsp://10.63.191.250/aerostat':
Metadata:
title : \Aerostat
Duration: N/A, start: 63184.792467, bitrate: N/A
Program 1
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 77 kb/s
Stream #0:1: Video: h264 (Baseline) ([27][0][0][0] / 0x001B),     yuv420p(progressive), 656x368 [SAR 1:1 DAR 41:23], 29.97 fps, 29.97 tbr, 90k  tbn, 59.94 tbc
[libvpx @ 0x397a360] v1.6.0
Output #0, ffm, to 'http://10.20.1.142:8080/feed.ffm':
Metadata:
title : \Aerostat
creation_time : now
encoder : Lavf57.56.100
Stream #0:0: Audio: vorbis (libvorbis), 22050 Hz, mono, fltp, 64 kb/s
Metadata:
encoder : Lavc57.64.101 libvorbis
Stream #0:1: Video: vp8 (libvpx), yuv420p, 720x576 [SAR 164:115 DAR   41:23], q=10-42, 400 kb/s, 29.97 fps, 1000k tbn, 25 tbc
Metadata:
encoder : Lavc57.64.101 libvpx
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 800000 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> vorbis (libvorbis))
Stream #0:1 -> #0:1 (h264 (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Broken pipe
Last message repeated 6 times
Error writing trailer of http://10.20.1.142:8080/feed.ffm: Broken pipeframe= 6 fps=0.0 q=0.0 Lsize= 52kB time=00:00:00.43 bitrate=  972.0kbits/s dup=5 drop=0 speed=0.778x
video:43kB audio:3kB subtitle:0kB other streams:0kB global headers:4kB  muxing overhead: 13.661202%
Conversion failed!

这是我的FFserver.conf文件:

HTTPPort 8080 # Port to bind the server to
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000 # Maximum bandwidth per client
# set this high enough to exceed stream bitrate
CustomLog -
<Feed feed.ffm> # This is the input feed where FFmpeg will send
File ./feed.ffm # video stream.
FileMaxSize 1G # Maximum file size for buffering video
ACL allow 10.20.0.0 10.20.255.255 # Allowed IPs
ACL allow 127.0.0.1
ACL allow localhost
</Feed>
<Stream live.webm> # Output stream URL definition
Feed feed.ffm # Feed from which to receive video
Format webm
# Audio settings
AudioCodec vorbis
Audi0oBitRate 64 # Audio bitrate
# Video settings
VideoCodec libvpx
VideoSize 720x576 # Video resolution
VideoFrameRate 25 # Video FPS
AVOptionVideo flags +global_header # Parameters passed to encoder
# (same as ffmpeg command-line parameters)
AVOptionVideo cpu-used 0
AVOptionVideo qmin 10
AVOptionVideo qmax 42
AVOptionVideo quality good
AVOptionAudio flags +global_header
PreRoll 15
StartSendOnKey
VideoBitRate 400 # Video bitrate
</Stream>
<Stream status.html> # Server status URL
Format status
# Only allow local people to get the status
ACL allow 127.0.0.1
ACL allow 10.20.0.0 10.20.255.255
</Stream>
<Redirect index.html> # Just an URL redirect for index
# Redirect index.html to the appropriate site
URL http://www.ffmpeg.org/
</Redirect>

0 个答案:

没有答案