Ticket #886 (new Bug)
Recorded streams in 0.9.1 do not play back immediately
| Reported by: | azack | Owned by: | mondain |
|---|---|---|---|
| Priority: | Major | Component: | Streaming and Networking |
| Version: | Keywords: | recording delay | |
| Cc: | azack |
Description
In 0.9.1, playback of recorded audio does not occur until the amount of time between the NetConnection was established
and the publishing began. I believe this is closely related to, or a duplicate of, ticket #812. This does not occur with 0.8.0. This occurs in the publisher demo as well as my own client code.
To reproduce:
- Install the oflaDemo demo.
- Launch the Publisher demo client /demos/publisher.html
- Under Settings->Server, push the Connect button
- Switch to the Settings->Audio tab
- Select a input device (I chose Built-in Microphone on my macbook pro)
- Push the Start button
- If prompted by Flash Player Security, Allow microphone access.
- In the Monitor panel (top left), change the stream type to Record
- Click the Publish button
- Record some audio.
- When done, click the Stop button
- In the Settings panel, return to the Server tab
- In the Monitor panel, click Play.
Expected result: You should hear audio in a reasonable amount of time
Actual result: Playback of audio does not occur until the amount of time between the netconnection was established
and the publishing began. That is, if the netconnection were idle for 10 minutes and then a publish of 10 seconds took place,
playing back that stream would not produce audio until 10 minutes later.
17:53:41:250 - Using Adobe Windows Flash Player 10,1,53,64 17:54:23:703 - Connecting to rtmp://10.32.101.118/oflaDemo 17:54:23:859 - NetConnection.Connect.Success 17:58:15:843 - Started audio device SoundMAX Digital Audio -- Note: I waited 3 minutes 52 seconds before publishing 17:58:26:890 - Publish - NetStream.Publish.Start 17:58:26:890 - Publish - NetStream.Record.Start 17:58:38:620 - Publish - NetStream.Record.Stop 17:58:38:620 - Publish - NetStream.Unpublish.Success -- Note: Audio length is a little under 12 seconds -- 17:58:44:671 - Playback - NetStream.Play.Reset 17:58:44:671 - Playback - NetStream.Play.Start 17:58:44:671 - Metadata - duration: 244.665 -- Note: duration is incorrectly reported as 244 seconds -- 17:58:44:671 - Metadata - videocodecid: -1 17:58:44:671 - Metadata - canSeekToEnd: true 17:58:44:671 - Metadata - audiocodecid: 6 17:58:44:765 - Playback - NetStream.Buffer.Full 18:02:47:640 - Playback - NetStream.Play.Stop 18:02:47:640 - Playback - NetStream.Play.Complete 18:02:47:640 - Playback - NetStream.Buffer.Flush -- Note audio does not start playing until now, a little over 4 minutes later -- 18:02:56:765 - Playback - NetStream.Buffer.Empty
By comparison, here's what happens with red5 0.8:
17:09:48:218 - Using Adobe Windows Flash Player 10,1,53,64 17:10:02:843 - Connecting to rtmp://10.32.101.118/oflaDemo 17:10:14:218 - NetConnection.Connect.Success 17:10:27:500 - Started audio device SoundMAX Digital Audio 17:10:43:921 - Publish - NetStream.Publish.Start 17:10:43:921 - Publish - NetStream.Record.Start 17:10:55:343 - Publish - NetStream.Record.Stop 17:10:55:343 - Publish - NetStream.Unpublish.Success 17:11:10:234 - Playback - NetStream.Play.Reset 17:11:10:234 - Playback - NetStream.Play.Start 17:11:10:250 - Metadata - videocodecid: -1 17:11:10:250 - Metadata - canSeekToEnd: true 17:11:10:250 - Metadata - audiocodecid: 6 17:11:10:250 - Metadata - duration: 11.563 17:11:10:265 - Playback - NetStream.Buffer.Full -- Note: Now audio has started playing. Note it plays almost immediately. -- 17:11:17:765 - Playback - NetStream.Play.Stop 17:11:17:765 - Playback - NetStream.Buffer.Flush 17:11:21:859 - Playback - NetStream.Play.Complete 17:11:21:859 - Playback - NetStream.Buffer.Empty -- Note: Audio correctly stops playing in sync with the complete event @ 17:11:21. --
