Results 1 to 6 of 6

Thread: ModuleAutoRecordAdvancedExample uses the first streams name for all following streams

  1. #1
    Join Date
    Nov 2014
    Posts
    2

    Default ModuleAutoRecordAdvancedExample uses the first streams name for all following streams

    Hi,
    Im trying to create the following module:
    • record incoming {livestreamname} to {livestreamname}_temp.mp4 file, send notification to external app "recoring started for {livestreamname}"
    • when incoming {livestreamname} has stoped, save/move recorded copy to {livestreamname}.mp4, notify external app
    • repeat


    the ModuleAutoRecordAdvancedExample has been of great help and I'm using it as a base, but there is an issue that i can not figure out:

    I've noticed that the module will only ever use the first livestream streamname for all upcoming streams. The only thing different to the recorded copy filename is the timestamp. It doesn't matter that the name of the livestream has changed, as it only ever uses the first streamname since applicationstart.

    Could some one point me to how I would change this behaivor so that it uses the current streams name as the filename for storing?
    Last edited by rynkan; 11-17-2014 at 02:53 AM. Reason: English

  2. #2
    Join Date
    Nov 2014
    Posts
    2

    Default

    sorry for the bump, am i going at this wrong?

  3. #3
    Join Date
    Dec 2014
    Posts
    5

    Default

    I have exactly the same problem. I took ModuleAutoRecordAdvancedExample as a base, and having problem with streams written to the wrong file. It looks for me like a problem of using a shared resource in a multithread application, here is a log output:

    Log call in onStopRecorder:
    getLogger().info("LiveStreamRecorder.onStopRecorder: Recording stopped:" + recorder.getStreamName() + " " + recorder.getFilePath() + " " + params.outputFile);
    Actual log output:
    INFO server comment - LiveStreamRecorder.onStopRecorder: Recording stopped:mystreamtest_240p D:\Java\Wowza\content\mystreamtest_360p.mp4 mystreamtest_720p.mp4
    So, as you may see from log statement recorder.getStreamName(), recorder.getFilePath() and params.outputFile are in inconsistent state. Should not be a recorder and params instances thread-safe and created on per stream basis?

  4. #4
    Join Date
    Dec 2014
    Posts
    5

    Default

    For those who might be interested by the topic, and hope this will save some precious hours.
    My idea was to record selected (not all) streams by appending streams to existing files with the same stream name without breaking files into segments and creating versions.
    First I tried LiveStreamRecordAutoRecord example, which I believed could record all the streams with SEGMENT_NONE and APPEND_FILE options set. Unfortunately, I had catastrofic issues with streams (transcoded) written either to the same base stream file location or to a wrong file location, e.g. 720p could be written to 160p. Having spent a entire day, I could not find out how to resolve the issue with parameters tuning or custom listener (see my log output in the post above). Also, I did not find the way to filter which streams to record and which not to. Luckily, LiveStreamRecordExampleModule did solve some problems as it shows record control on stream level rather then on app instance level. However, still not sure if streams appending to existing files handled properly by wowza, as I see some warnings in console and source stream playing issues (not transcoded one).

    This example did not work for me:
    How to start and stop live stream recordings programmatically (LiveStreamRecordAutoRecord example).

    This one works as expected:
    Download LiveStreamRecordExampleModule_4.0.zip

  5. #5

    Default

    Hey rynkan,

    Did you ever figure out a solution? I have the exact same problem and would like to know how to fix it. Can you paste the source code or give any guidance?

  6. #6
    Join Date
    Jun 2015
    Posts
    9

    Default

    Sorry for asking another question.

    But did either of you guys solve the problem of retrieving the recording file from the wowza server? Wowza doesn't serve up .mp4 files; Add to that if you copy it to another server straight after wowza has notified your module, then the file may not have been completely written to disk by wowza.

Similar Threads

  1. Smil for two streams
    By paul_tscherbakov in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 04-30-2014, 07:33 AM
  2. Transcoder Streams Available: 0
    By catdude in forum AddOn: Transcoder
    Replies: 2
    Last Post: 07-17-2012, 06:16 AM

Posting Permissions

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