Results 1 to 7 of 7

Thread: OnWriteComplete returns incorrect file(name) w/versioning

  1. Default OnWriteComplete returns incorrect file(name) w/versioning

    StreamType is "live-record" and in the Application.xml under Streams/Properties/Property, the versionFile property is set True. In my contents folder I've already a file named "mystream.flv", so when I start the stream, a new file is created "mystream_0.flv". So far everything OK.

    But in my module I implement the IMediaWriterActionNotify.onWriteComplete(IMediaStream stream, File file), and this method returns the wrong file. If I ask for file.getName(), the result is "mystream.flv", not "mystream_0.flv". Is this by design, or is it a bug?

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

    Default

    The current or more recent file has the base name. You can rename it when you move it.

    Richard

  3. Default

    Thanks for your response, but I don't quite understand. Shouldn't the File object that is passed to OnWriteComplete contain the file that was just recorded - and thus have the filename "mystream_0.flv" and not "mystream.flv"? As it's now, the File object always points to "mystream.flv" regardless of the versioning.

    FYI: I don't want to move the file, the only thing my module does is notify a third party proxy about the availability of the file.

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

    Default

    mystream_0.flv is not the current recording, that is what Wowza renames the previous recording when it starts recording again.

    Richard

  5. Default

    hmm ok; that explains it, even though it doesn't make sense to me. Thanks anyway, I'll adjust my code to this!

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

    Default

    Take a look at the content folder while you are recording, you will see myStream.flv. You will not see myStream_0.flv until you stop the encoder then start another stream.

    Richard

  7. Default

    Yes, I understand now how the versioning works in Wowza. But it doesn't make sense to me that the previous file gets renamed when the new recording starts. Media Management Systems, Playlists and even Player currently playing the previous file will have their URL invalidated because the file name is no longer correct.

Similar Threads

  1. Replies: 11
    Last Post: 03-05-2014, 05:50 AM
  2. H.264 SDP File Reporting Incorrect Framerate
    By PhilHalf in forum Live Streaming and Encoder Discussion
    Replies: 0
    Last Post: 06-14-2012, 08:14 AM
  3. onWriteComplete getting called twice
    By catdude in forum Server-side Modules and Code Samples Discussion
    Replies: 0
    Last Post: 11-16-2011, 02:47 PM

Posting Permissions

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