Wowza Community

Play stream that has finished recording

Hello!

I have an IP camera from which I successfully pull the stream on startup of WMS. The stream is recorded via nDVR, and I can subscribe to it with an OSMF Flash player (particularly the one that ships with Wowza 3.1.2 and can be found at examples/SimpleVideoStreaming/clientOSMF), but once I stop recording the stream from the camera, I can’t seem to play the record. I use stream manager web interface to turn off the recording by clicking “stop receiving stream”.

The interesting part is that right after I turn off the camera stream, I go back to the OSMF player that is still playing back the stream (shifted several seconds before the camera stream), and it plays smoothly until the time that I stopped recording. If I reconnect to the same stream and play it, there is no video. The button goes from “Play” back to “Stop”, but no error is shown.

I play a URL like this: http://host:1935/appName/streamName/manifest.f4m?DVR

I have verified that all the right files are created at [install-dir]/dvr/appName/definst/streamName.0/…

Is there something I am doing wrong? I only wish to play what nDVR has recorded.

(The beginning of the following thread seems to be about a similar problem: http://www.wowza.com/forums/showthread.php?16040-No-access-to-dvr-content-unless-stream-is-actively-playing!-…What)

There’s another thing about the nDVR addon that I would like to know. It is said in the tutorials that it is possible make several short recordings instead of a long continuous one. How can that be accomplished? Is it possible to make several consequent recordings and then, leveraging the Playlist Request API, playback the playlist that covers a short period of time beginning in one actual recording and continuing for some time in the next one, seamlessly? Or perhaps it would be okay to make a looong recording that will only be played by small sections, via custom playlists?

Thank you

First, follow this guide to configure for nDVR:

https://www.wowza.com/docs/how-to-set-up-and-run-wowza-ndvr-for-live-streaming

And use the player in /examples/LiveDvrStreaming to test DVR functionality.

Richard

I get similar results. I will have to get back to you, on the 2nd question too

Richard

I am further investigating the playback report with Strobe.

-Lisa

The proper way to stop the recording is not through Stream Manager, but instead stop the recording using the nDVR Recording API. When you stop the stream using Stream Manager it completely unloads the stream. The player may or may not be able to resume playing. Behavior varies between players, but you can’t rely on the player being able to resume playing when the stream is stopped with Stream Manager.

-Lisa

Is there a pattern to when the you can start playing back/seeking successfully and when not? I suspect the freezing is due to buffering from the Strobe player. Does the playback continue?

Which version of Wowza Server are you using? For nDVR workflows, I recommend upgrading to the latest patch, 3.1.2 patch 16 which includes recent fixes for nDVR adaptive bitrate and HLS workflows.

-Lisa

I tested with a wowzadvrplayliststarttime=3000 and wowzadvrplaylistduration=300000 in the URL. After I stopped the live stream, I was able to play back from seeking at about the half way point using Wowza Media Server 3.5 and the sample player in [install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html (slightly differernt path and name in version 3.5). I will investigate the 1193 hours further.

-Lisa

Thank you for the additional information. In my case, I was able to play straight away. I am continuing to investigate to narrow down the behavior patterns. I will let you know when I have more results.

-Lisa

I have been able to successfully play back with wowzadvrplayliststart values set between 3000 and 300000 with the sample nDVR player. If I can get a reproducible case, we can debug. I’ll continue to see if I can reproduce what you are seeing and I am still investigating the 1193 hour issue.

-Lisa

The saw the 1193 hour issue once, but am not able to get a reproducible case. If you can help me identify steps to reproduce, I can have Engineering debug further. I suspect it is an issue with the OSMF player. When you see this problem, also report if you see the same behavior when playing back with Silverlight.

-Lisa

Are you able to successfully play back a previously recorded stream after the live event is over? Or, are you only having a problem when the live stream is stopped mid-way through recording? I have been able to play back with a variety of wowzadvrplayliststart values with the sample nDVR Strobe player. I think what you are seeing could player specific behavior if it only occurs with OSMF player in certain situations. Please confirm if you are able to play back nDVR stores while the stream is live and uninterrupted and also when you start playback of a previously recorded stream after the live event is over using wowzadvrplayliststart.

-Lisa

Please send a zip of [install-dir]/conf and logs directories and details about your live stream source and setup if it has changed from your previous description. Our QA will look into this further. Please reference this post.

-Lisa

Thanks for the reply, Richard.

I had followed the guide before, so I did the troubleshooting test now, and I was able to play (using Strobe player) both live and recorded DVR stream from a test Flex application that sent video from my webcam over RTMP. However, with Strobe or other OSMF player I still cannot play the stream recorded from the IP camera, after I stop it using stream manager. I have window duration set to 30 seconds, and when I try to play the stream after I have stopped recording it, Strobe player shows ~55 seconds on the seek bar, but does not play anything. Could it be the stream manager that somehow stops the playback as well as recording?

As I have described before, I am able to seek and play my recorded 30 seconds if the player had been connected to the live stream before I stopped recording. When I reconnect to the same stream, it appears like it is around 55 seconds long (while it should be around 30), and when I hit play it jumps right to the end, showing nothing. The stream appears to be empty. However, the required files are all there, in [wms]/dvr/appName/definst/streamName.0/…, so what should I do to play them?

Could you suggest a workflow for recording and playing a stream from an IP camera using nDVR addon?

Also, could you provide some insight into my second question in the first post?

Thank you

PS I wish I could change the name of this thread to mention the IP Camera

I tried using the provided DvrStartDurationPlaylistRequestDelegate and I wasn’t able to play the stream while it was still recording. Strobe player displayed correct duration, but when I tried playing it the seekbar thumb jumped right to the end. The picture was black the whole time.

But then I got something really interesting.

All this time my IP camera stream address was set in a file at “[wowzahome]/content/camera.stream” and looked like this: rtsp://address

Then I tried the following: I streamed that camera to another wowza server to application “live”; then I used the video streaming from that other server in my “camera.stream” file, so that its contents looked like this: rtsp://other-wowza-adress:1935/live/camera.stream.

And that worked!.. almost

I was able to play the stream after I had stopped recording it, able to set starting time and duration with DvrStartDurationPlaylistRequestDelegate on both live and recorded stream.

BUT apart from that it’s a convoluted solution, the experience was really buggy. For different playlists within the same ~10 minute recording I have had the following:

  • in most of my attempts the recorded stream behaved like before - skipped to the end right away;

  • sometimes I could start playing it from certain moments in time, but then it would jump to the beginning even though I clicked in the middle of the seekbar;

  • sometimes the picture froze, and wouldn’t play even the parts of the seekbar that were okay previously;

  • sometimes it stopped playing before the end of the seekbar and jumped to the end or even to the beginning;

  • sometimes the duration on the seekbar showed times like 1900 hours when jumping to the end;

  • the duration was always a few seconds off from what I had requested, but I’m guessing that had something to do with alignment to chunks;

  • also when I played the pre-recorded stream with default playlist (just …/manifest.f4m?dvr) (or a playlist with start time close to 0), it did play back, but like a live stream, i.e. no duration, seekbar thumb unmoving.

I hope these symptoms will help you figure out what’s wrong with my workflow or my setup - or maybe nDVR itself?..

Thank you

Thank you Lisa, I ought to have tried nDVR Recording API earlier.

Now that I did, it prints positive responses when I call “…action=start” or “…action=stop” using HTTPDvrStreamRecord provider, but I’m still having trouble playing DVR recordings with Strobe. The symptoms are the same:

  • correct duration displayed;

  • if not playing from the beginning of the recording, player skips to the end of the seekbar right away;

  • occasionally I am able to start playing somewhere in the middle of the seekbar, but then seekbar thumb jumps to the beginning;

  • occasionally the picture freezes.

I installed patch 16 for 3.1.2.

Though I couldn’t find a link to it anywhere on the site, so I literally guessed it by looking at a URL for some old patch that had been posted in the forums.

The pattern to play UNsuccessfully is to set starttime > 100 (some small value around 0) and play from the beginning.

The only way I can reliably play is to set starttime to some small value around 0. For other values of starttime, it only occasionally happened that I clicked in the middle of the seekbar and the picture of the first frame appeared (from time 0, not where I had clicked). After that I could seek the whole duration. In other words, I haven’t found a pattern that would help you.

Looks like WMS 3.5 has just come out, I will have to test with that.

Same result with a fresh WMS 3.5.0 and a fresh DVR recording.

I’ve found some interesting patterns though:

If I set starttime to certain low values, it would not play, but I could seek into the middle - and then it would start playing from starttime. This worked for 0, 3, 30, 40 seconds on a 4-minute recording, didn’t work for 50 seconds.

In that playable sequence, if I seeked to the beginning, the thumb would jump to the end and show 1193 hours, but would play back the record.

Also, when playing a sequence (not beginning at starttime 0), playback would stop at about 2 minutes into the record (starttime included) and jump to the end.

Lisa, does that mean that you also were not able to play the from 3000 rightaway?

By the way, today I made a longer recording of ~10 min. The results were a bit different then:

  1. For wowzadvrplayliststarttime values 3000, 50000, 60000, 200000, 250000 I was able to play back from seeking at about the half way point. Though for certain values (like 250000) I had to seek at a very narrow interval around the end, not just about the half way point. For values 300000, 400000 I was not able to play back at all (maybe I just haven’t found that interval?)

  2. For every starttime the end of the playlist was somehow shifted to a point around 2/3 of the whole duration. After that point I wasn’t able to seek, and normal playback would jump across the remaining duration to the end. The exact point on the seekbar was different for every starttime - sometimes about 1/2, sometimes about 7/8; but I could see that the point in the recording was the same, as I hadn’t set wowzadvrplaylistduration. When I did set playlist duration, the issue was still present, AND the ending point in the recording seemed to have shifted according to the duration I had set (it ended on a different frame, before the actual end of the recording - just as expected).

I think, the last thing I described in my previous post was actually this unplayable ending part issue as well, I just didn’t investigate it enough. It might have also occurred during my previous tests, but for some reason I wasn’t able to reliably reproduce it. Maybe the unplayable part was so close to the end that I didn’t notice it.

Also, the 1193-hour issue sometimes occurs when seeking the unplayable part. When it does, the seekbar looks completed, but the playlist actually starts playing from the beginning, as I’ve described before.

I hope this helps you solve this issue.

Thank you for your time.

Thank you for your attention, Lisa,

but I’m more troubled by the fact that I still cannot reliably play a recorded DVR stream. (Same result with the remote IP camera and a local webcam stream.) What would you suggest to do based on the symptoms I have described before?

I have no trouble playing a live DVR stream, i.e. the one that has an actual live stream in the end. I mean I can set wowzadvrplayliststart to any value and it plays fine as long as there is a live stream in the end. Also when I play a pre-recorded DVR stream without setting starttime or duration, it plays fine.

If I set wowzadvrplaylistduration on a live DVR stream or on a pre-recorded DVR stream, I experience probably all of the problems I have described before (like in post #13).

I use the sample nDVR Strobe player. I start and stop recording via the DvrStreamRecord HTTPProvider.