Issue with streaming AVI files

你。 提交于 2020-01-14 05:36:09

问题


I am writing a video streaming server application. I have an AVI file and I have put it on IIS 7 for streaming. I found that client cannot jump to an arbitrary location of the media, if the media is not buffered already. I think some meta-data is missing during recording?

After searching, I think, Windows Media Player could not jump to any arbitrary location before buffered locally, since Index block of AVI (needed for seeking) is stored at the end of file.

Here is an example, if my recorded avi video is 10 mins, and now I am playing to the 4th mins, and the local buffered streaming media is buffered to the 5th mins, I cannot jump to any time after the 5th mins, like the 7th mins in Windows Media Player.

I did not face the same issue with other formats like asf/wmv. So I think it is an AVI issue rather than server or any other environmental issue.

My questions are,

  1. What is the actual reason for not being able to jump to arbitrary location for AVI file, before it is buffered?
  2. Any solutions or workarounds? Can I use other smarter players instead, which can handle this issue or can I add some code fix at the server side?

回答1:


As you already discovered yourself, index is written at the end of avi containers. That's why avi format is not good for streaming.

You should convert your video to some other format which has the indexing information at the beginning. For example, flv, wmv, ogg/theora, etc.



来源:https://stackoverflow.com/questions/743220/issue-with-streaming-avi-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!