事情是这样的。我在 ffmpeg 和 ffserver 之间遇到了多个错误。据我所知,视频状态很好,单独播放时播放效果也很好。但是当我使用列表时,事情就变得很奇怪了。
首先,ffserver的运行方式如下:
ffserver -f asfffserver.conf
asfffserver.conf 如下所示:
HTTPPort 8090
# bind to all IPs aliased or not
HTTPBindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 700M
</Feed>
# ASF output - for media player classic
<Stream test.asf>
# the source feed
Feed feed1.ffm
# the output stream format - ASF
Format asf
VideoCodec mpeg4
# this must match the ffmpeg -r argument
VideoFrameRate 30
# generally leave this is a large number
VideoBufferSize 100000
# another quality tweak
VideoBitRate 768
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 720x480
# this sets how many seconds in past to start
PreRoll 0
# Audio Codec
AudioCodec libmp3lame
AudioBitRate 56
AudioChannels 2
AudioSampleRate 24000
</Stream>
<Stream stat.html>
Format status
ACL allow 127.0.0.1
</Stream>
然后我像这样运行 ffmpeg:
ffmpeg -f concat -i dailylist.txt -c copy http://localhost:8090/feed1.ffm
dailylist.txt 文件包含(这两个的规格位于此处)
file /pathtomyvideo/shorts/0019.mp4
file /pathtomyvideo/shorts/0197.mp4
因此 ffmpeg 运行完美,直到播放第二个视频几秒钟后,ffmpeg 崩溃并显示以下消息:
av_interleaved_write_frame(): Connection reset by peer9.15 bitrate= 383.7kbits/s dup=5561 drop=11754 speed=10.8x
Error writing trailer of http://localhost:8090/feed1.ffm: Connection reset by peerframe= 9755 fps=182 q=2.0 Lsize= 27156kB time=00:09:42.51 bitrate= 381.9kbits/s dup=5561 drop=11847 speed=10.9x
video:22639kB audio:3962kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.088314%
Conversion failed!
ffserver 说:
Assertion asf->packet_timestamp_end >= asf->packet_timestamp_start failed at /build/ffmpeg-e0CgSU/ffmpeg-2.8.4+git1~trusty/ffmpeg/libavformat/asfenc.c:777
Aborted (core dumped)
所以。这就是我的问题。有什么建议可以解决它吗?如果它们有帮助,我可以将更详细的日志粘贴到 pastebin 中,或者运行您要求我进行的任何测试。如果有人能解决这个问题,我将不胜感激,如果/当这个项目启动时,我会在屏幕上提到你。
谢谢!