Skip to main content
Known Participant
June 6, 2013
Question

How do I seek to a specific point in a mp4 (locally)

  • June 6, 2013
  • 1 reply
  • 2325 views

Hi,

I have an air destop project that displays local mp4 videos.

But Sometimes I want the video to play from a specific position for example 5seconds in.

Im just not getting anywhere trying to manipulate the the netstream.

I want to start an mp4 playing from a specific position.

so for example ive tried this...




stream.play(videoURL);



stream.pause();





stream.seek(30);



stream.resume();

This doesnt work though the playback just starts from 0 seconds like it normally would.

Any ideas?

Thanks

This topic has been closed for replies.

1 reply

sinious
Legend
June 6, 2013

You can just specify the seconds to start at with play(),

e.g.:

stream.play('mp4:videos/myvideo.mp4',30);

Playing locally you still do need to make sure the file is loaded to that second before you seek to it. Seeking progressive without a media server will also only seek to keyframes. It's an expensive operation.

In normal seek mode, you cannot start the video at a point between the keyframes.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#seek()

Known Participant
June 7, 2013

ahh ok so how do I check to see if its loaded up to that second... and if it isnt how do I make?

Thanks

Aidan

Known Participant
June 7, 2013

AHH SORTED!

Listen to net_status for "NetStream.Buffer.Full"

Thanks for your help sinious.