Ticket #886 (new Bug)

Opened 18 months ago

Last modified 18 months ago

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:

  1. Install the oflaDemo demo.
  2. Launch the Publisher demo client /demos/publisher.html
  3. Under Settings->Server, push the Connect button
  4. Switch to the Settings->Audio tab
  5. Select a input device (I chose Built-in Microphone on my macbook pro)
  6. Push the Start button
  7. If prompted by Flash Player Security, Allow microphone access.
  8. In the Monitor panel (top left), change the stream type to Record
  9. Click the Publish button
  10. Record some audio.
  11. When done, click the Stop button
  12. In the Settings panel, return to the Server tab
  13. 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. --

Change History

Changed 18 months ago by azack

  • priority changed from Minor to Major
Note: See TracTickets for help on using tickets.