# AS3 AIR FFMPEG netStream.seek issue

**URL:** https://forum.kirupa.com/t/as3-air-ffmpeg-netstream-seek-issue/633686
**Category:** flash
**Created:** [August 27, 2015, 9:02am UTC](https://forum.kirupa.com/t/as3-air-ffmpeg-netstream-seek-issue/633686 "2015-08-27T09:02:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AntBirch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/antbirch/32/7197_2.png) [@AntBirch](https://forum.kirupa.com/u/AntBirch)
#### Post date: [August 27, 2015, 9:02am UTC](https://forum.kirupa.com/t/as3-air-ffmpeg-netstream-seek-issue/633686/1 "2015-08-27T09:02:49Z")

</div>

I’m having trouble with NetStream in AS3. The project I am working on allows users to browse a video (locally) and play it back. The issue I am having is that `netStream.seek(0);` from what I can tell it doesn’t do anything, although I get inside a NetStatusEvent function and `NetStream.Seek.Notify` is triggered. I’m using NativeProcess and the following function is this makes any difference.

```
public function ProgressEventOutputHandler(e:ProgressEvent):void {
    videoByteArray = new ByteArray();
    nativeProcess.standardOutput.readBytes(videoByteArray, 0, nativeProcess.standardOutput.bytesAvailable);
    netStream.appendBytes(videoByteArray);
}

```

Am I missing something here? I am pausing netStream before using `netStream.seek(0);`.

**EDIT:**

In an attempt to fix this issue I’ve tried the following (following advise of using 2 byte arrays):

- Moved videoByteArray = new ByteArray(); to my init function and also created tempVideoByteArray = new ByteArray(); in this function.

- Update my ProgressEventOutputHandler function so that it no longer  
created a new ByteArray for videoByteArray and changed this line -

I have changed nothing else and now the video will not load. If I allow a new ByteArray to be created inside the ProgressEventOutputHandler function the video does load again.
