开发者

Netstream.seek() not working for MP4 videos in Flash

开发者 https://www.devze.com 2023-02-16 02:55 出处:网络
I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player st

I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player starts playing the video from the beginnin开发者_运维技巧g). Anyone knows what might be the problem?

(I am using Netstream for this instead of adding a parameter with the starting time when I call the Netstream.play method because I don't have Flash Media Server).


Flash does not support sending bytes header, so you will always get byte 0-. You can accomplish seek by utilizing pseudo streaming ( http://h264.code-shop.com/trac ). Basicly, you supply a get param ?start=1234, then the server backend patch the moov header, move it to the front of the file, and start serving it at the start position. (Essentially, splitting the file on the fly, with start position at 1234, and serving up the new generated file)


I know for a fact that this works with the latest Red5 1.0 builds, I cannot speak for FMS or Wowza.

0

精彩评论

暂无评论...
验证码 换一张
取 消