Results 1 to 4 of 4

Thread: Pausing record keeps recording on fixed image (last video frame)

  1. #1
    Join Date
    Sep 2012
    Posts
    4

    Default Pausing record keeps recording on fixed image (last video frame)

    Hello everyone,

    I try to solve this problem : I record a stream from a custom recorder written in AS3.
    I succeed in pausing the record, but while it is paused, it seems that wowza keeps on receiving the last frame of my video while the pause is enabled,
    and continues normally recording when I re-enable the stream.


    I have tried for several days, but can't find any solution.

    I thought that pausing the NetStream would really pause the recording. Then I tried this :
    • Open a stream from AS3 (stream type : Record)
    • When clicking on my pause button, call netstream.pause()
    • On wowza-side, I detect the pause (isPause == true) the onPause event of IMediaStreamActionNotify3. There I tried to close the stream with stream.close() or stop the publishing process with stream.stopPublishing().
    • When re-clicking on the pause button, I re-publish the stream, with the same name, but in Append Mode.


    Thought it would do the trick, but it does not.

    Thanks for your help in advance,

    Jérémie

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Hi Jérémie,

    RTMP pause is really only relevant to NetStream vod playback, not Netstream publish or live playback. You have to stop publishing to stop recording if you are using StreamType "live-record". You can start and stop recording using HTTP live stream record, but that will not control the encoder.

    Be careful using append mode in this scenario, because of the risk of appending a corrupt recording, which can happen because of network problems. It is best to isolate each recording.

    Richard

  3. #3
    Join Date
    Sep 2012
    Posts
    4

    Default

    Quote Originally Posted by rrlanham View Post
    Hi Jérémie,

    RTMP pause is really only relevant to NetStream vod playback, not Netstream publish or live playback. You have to stop publishing to stop recording if you are using StreamType "live-record". You can start and stop recording using HTTP live stream record, but that will not control the encoder.

    Be careful using append mode in this scenario, because of the risk of appending a corrupt recording, which can happen because of network problems. It is best to isolate each recording.

    Richard
    Thanks Richard for your answer,

    The fact is that my customer would like to create a recorder for teachers. He thinks about this case : the teacher would start recording a lesson, then pause for any reason, then resume his recording.
    If I understand you well, the "live-record" type would do the trick, but I have to detect the state of the isPause parameter in my onPause event (in IMediaStreamActionNotify3), and there stop or start the publishing, depending on this state ?
    I could probably start the stream on the client-size with the "record" AS3 mode, and change it to "Append" when I resume the recording, with the same stream name ... ?

    I proposed to my customer, to isolate the recordings as you advise, and then merge the recordings via FFMpeg, but it seems not to satisfy him...

    Thanks for your help.

    Jérémie

    PS: excuse my english.
    Last edited by jpicaude; 06-02-2014 at 12:28 PM.

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Jérémie,

    Using a Flash RTMP client as the encoder, you can use NetStream.publish("myStream", "append"). The Wowza Application.xml StreamType to use for this is actually "default" (not "live-record"). A simple example of this is the WebRecording example in the /examples where Wowza is installed.

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •