ffmpeg 在使用 ffserver 時不斷崩潰。有人能解決這個問題嗎?

ffmpeg 在使用 ffserver 時不斷崩潰。有人能解決這個問題嗎?

所以這就是交易。我在 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)

所以。這是我的問題。有什麼修復建議嗎?如果有幫助的話,我可以貼上更詳細的日誌,或者運行您要求我進行的任何測試。如果有人能解決這個問題,我將永遠感激不已,如果/當這個專案啟動時,我會在螢幕上提到你。

謝謝!

相關內容