0

Hello friends, I have some problems as following:

Problem 1: I use appendBytes() to add FLV tags(about 60 seconds flv tags) to netstream, when I seek (seek targe is in 60s), I found the video cannot be played.

Problem 2: I use appendBytesAction(NetStreamAppendBytesAction.RESET_SEEK) and appendBytes() when seeking, however, I found Flash Player can play but empty buffer, and I have to request new FLV tags.

Problem 3: if I use appendBytes() to add FLV tags(abount 60 seconds flv tags) to netstream, when I seek(seek target is in 60s), I will not request new FlV Tags and play video correctly, who can give me a demo and explain the mechanism of it?

MZaragoza
  • 10,108
  • 9
  • 71
  • 116
tomas
  • 1
  • 2
  • You will get faster answers if your question made more sense.. **Problem 1)** Well what do you expect to happen? if you have 60sec data and you jump (seek) to 60secs then there is no more data to play ahead. To quote "...I found the video cannot be played" What do you want to achieve? **Problem 2)** Thats is normal behaviour. `RESET_SEEK` will empty the current buffer (of frames to play) and expect a new queue of frames starting from new seek position (remember you are feeding in bytes so the next `appendBytes` must be FLV tag of either Video or Audio type with bytes beginning `x09` or `x08` – VC.One Aug 11 '15 at 10:33
  • **Problem 3)** If you "do not request new FLV tags" then how does the video play correctly?? I can only imagine you do some `RESET_BEGIN` and just re-append the bytes all over again? To seek properly you must understand how to separate your data, first find FLV Tag bytes and check if they are audio or video, if video then is it keyframe? if so copy bytes from this position to some **temp_BA** and append that to watch from the new position. Re-use **temp_BA** with a `temp_BA.clear()` to empty and fill with new byes data. – VC.One Aug 11 '15 at 10:59

0 Answers0