views:

386

answers:

4

I'm using the netstream and video object to play a video in flash. Specifically a mp4 video.

What I'm trying to do is start playing the file from a specific position (Ex. 20seconds).

However with netstreamObject.seek(20) doesn't work unless the stream has been loaded past 20seconds. Is there a way to specify starting to load at 20s? Or any other way of accomplishing this?

+2  A: 

would it not be simpler to create a new version of the file starting at 20 seconds. this way there is less for the user to download.

try looking here http://www.winmend.com/file-splitter/

Josh

Josh
+1 for beating me to exactly what i was going to say, plus the file-splitter link
iandisme
Its actually for a player where the position is user specified. I used 20seconds as an example, however it could be any time the user specifies. The content is also aggregated from across the web, so the mp4 file is not owned or stored on any my servers. So I'd like to stay away from creating new files etc.
amonteiro
+2  A: 

Also if your client allows, you can use Streaming video RTMP and seek that way, instead of using Progressive video.

If sticking with Progressive check Josh's answer.

Leon
Unfortunately the content is scattered across the web, and the player just gets the file and plays it. So a media server is not possible.Are you implying that using media server is my only option (when using flash)?
amonteiro
Oh you don't have access to the videos? I was going to suggst like Josh to just edit the videos, but yeah I think this is now an impossibility, unless the target end users have near light-speed connections.
Leon
+1  A: 

You can use some sort of CDN cache server (so the actual file will be served via this cache server) which support lighttpd, then you can seek ahead in the video.

bhups
+2  A: 

The short answer is, "You cannot seek past the download point in a progressive video." However, Akamai and other CDNs (for example, YouTube) have technology to allow seeking on progressive videos. This does not solve your problem, because it is proprietary server technology. In your situation, using only client code with no control over the files or streaming server, there is no way to seek until the file loads.

Tim B.