Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Once more about switching between "live live" stream and "file-based live" stream

  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Default Once more about switching between "live live" stream and "file-based live" stream

    Hi all,

    can anybody help me?

    I am new in WMS and I'm testing WMS in hope to run it on our own server as a replacement for Ustream.TV hosting. I don't want much from WMS for now. The only thing I want from it for the beginning is to support a single live stream, which can be switched (transparently for the users) between 2 sources:

    1) "a real live stream" from the Adobe Live Encoder and
    2) "file based stream" generated from the previously recorded video.

    So I've set up WMS, installed a developer license and read a half-dozen threads on this forum related to my problem (all I could find). The solution from this thread: http://www.wowza.com/forums/content....tching-example seemed to be the least frightening (I don't feel myself a very experienced Java programmer), so I choose it as a base for my investigation. I've written a module initializing the application with two playlists, live and pre-recorded, and replaced Flash client interface with HTTP-provider (because I have'not Adobe Flash to write Flash-based applets).

    Now I have the following problem. If the application starts with a stream source set initially to the pre-recorded file, I can see a pre-recorded video until I try to switch the stream to the live source. At this moment a movie stops and remains stopped until I switch the source back to the pre-recorded file. Then it goes on.

    If I start my application initially set to the live source, I don't see any video at all, both live and pre-recorded. Switchng sources does not make any visual effects.

    If I set up my application (just for the experiment) to use two file-based sources, all goes well and I see two videos switching in JWPlayer on my HTTP-requests.

    When I set up my application normally, with live and file based sources, I see the like messages in the WMS log (once, after WMS restart):

    WARN server comment 2012-04-16 19:38:25 1775296588 127.0.0.1 - 3262 3073 51.413 - - - - - - - - Licensing[broadcast/_definst_/current]: *** Hit license limit for publishing streams. Publishing stream is stopped. ***

    and the like (a lot, following about 150 times per second):

    WARN server comment 2012-04-16 19:43:14 1775296588 127.0.0.1 - 3262 3073 340.12 - - - - - - - live.flv open: java.lang.NullPointerException
    ERROR server comment 2012-04-16 19:43:14 1775296588 127.0.0.1 - 3262 3073 340.121 - - - - - - - - MediaReaderFLV.readMetadata: getDuration: java.lang.NullPointerException

    So who can tell, what is going on? Is a problem that I really exceed the developer license limitations (maybe it counts both source stream and output stream as publishing ones) or I do something wrong? If the sources of my module and HTTP-provider can help I can show it.

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

    Default

    First, the live stream item must have a start value of "-2". The error line indicates you are not setting this properly.

    But the license limit is also a problem, you can only do one published stream, make sure it is the one you are testing

    Richard

  3. #3
    Join Date
    Apr 2012
    Posts
    3

    Default

    Ok, today I've tried to simplify the situation. I've cleared the logs, started my application from the live source (of course, it didn't produce any video, just like yesterday) and did not make any attempts to switch the stream to another source. Then I looked into the logs (they were fresh and short this time) and have seen just a single message:

    WARN server comment 2012-04-17 19:52:44 2137308831 127.0.0.1 - 3262 3073 42.222 - - - - - - - - Licensing[broadcast/_definst_/current]: *** Hit license limit for publishing streams. Publishing stream is stopped. ***

    The message appears in the log immediately after I press the "Start" button in the Flash Encoder.

    So I come to 2 conslusions:

    First, the yesterday error in MediaReaderFLV.readMetadata:getDuration was not related to the live source, but to the file-based one. It really has the "start" parameter set 0, not -2. Probably you are right and the file-based item start value must also be set to -2. I've just copy-pasted playlist.addItem() call from the forum article and the "start" parameter was set to 0 there.

    Second, more important and more sad, it's very likely that WMS licensing check really counts both the source and the output streams as publishing ones. As they are two, license check registers the violation. I definitely have no other broadcast sources on the host I am debugging on, so the only streams the licensing check can count are the stream from the encoder (named "camera" and not visible in the log) and the output stream (named "current") whose death we can see. If this is a case, it seems that I would not be able to debug my application using the developer license.

    Does it mean that I should order a trial license to investigate this problem? To be honest, I would not like to do this. I planned to order a trial license when I will be ready to test WMS on our production server under the real load and I did not wish to waste it's time for debugging my cripple early applications.
    Last edited by mudropolk; 04-17-2012 at 10:33 AM.

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

    Default

    Actually, it's the first file based stream that is being counted. It is a published live stream, albeit with a file for its source, aka client-less or server-side stream. Sorry I didn't catch that earlier. Yes, you will have to use the eval license to test this.

    Richard

  5. #5
    Join Date
    Apr 2012
    Posts
    3

    Default

    Richard,

    I've almost put up with the need to get the evaluation license... But there is one more question. If you are right, why don't I get license violation messages when I switch between two file-based sources? The stream really switches, I can see both videos, one by one. No license violations. The license violation appears as soon as I try to switch to the "live live" stream.

    Surely, there's something wrong in the license check mechanism. If something can be done to fix this, it would be very well. I really don't want to start the trial period until I am ready to demonstrate the _working_ system in the _real_ environment to the people who will pay for the permanent license. Actually we broadcast only 2 hours a week, so the 30-day trial is not very much for us to make sure that all goes well.

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

    Default

    Because the server-side stream (Stream1) that is switching between the two files is one published stream, not two. When switching between live (myStream) and file, Stream1 is one stream and myStream is the other, which exceeds the limit.

    If you start two file only based stream, Stream1 and Stream2, you would exceed the limit.

    Richard

  7. #7

    Default

    Hi,
    how about adaptivity - will it work well if I open N playlists / (switch N items) on N streams with different bitrates at the same moment?
    Thanks,
    Jiri

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

    Default

    It should work, depending on how many N is exactly and your server's capabilities. Have plenty of ram.

    Richard

  9. #9

    Default

    There are 3 adaptive live streams per application (TV channel) being pushed from FMLE to the origin server. There are about 10 such applications and there are about 30 edge servers connected to the origin. The encoders are switched on/off automatically (they are driven by PDC and EPG), and/or manually. When the encoders are switched off, or when we want to black the streams out manually, we want the origin server to switch smoothly (without interrupting the output streams and without breaking adaptivity) from live streams to prerecorded mp4s in a loop, and vice versa. I wrote a proof-of-concept module for the origin server that does it, but I'm not 100% sure if this technique is OK and if it doesn't break adaptivity.

    Here is how the plugin works:
    - When the application starts, it creates three streams and prepares two playlists for each stream (one for live input, one for mp4 input).
    - Then it opens "mp4 playlist" on each stream, so that users can see the message.
    - When FMLE streams arrive, it opens "live playlist" on each stream (at once)
    - When FMLE streams disappear, it opens "mp4 playlists" again (at once)
    - The same happens on-demand, using HTTP module and/or SOAP handler.

    So, the questions are:
    Is this method OK, or is there some better approach?
    Is this method compatible with adaptivity?

    Jiri

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

    Default

    Jiri,

    You describe what the module does, and if it is working that's great. I don't know if there is a better approach because I don't know what approach you took, but if it is working it is a good approach imo. I probably woud have suggested some use of Stream class streams, like this scheduled multi-bitrate (adaptive) example:

    http://www.wowza.com/forums/content....-Multi-bitrate

    Richard

Page 1 of 2 12 LastLast

Similar Threads

  1. when stream not "live" playback "standby" media until live?
    By CVP Media in forum Live Streaming and Encoders
    Replies: 1
    Last Post: 09-09-2014, 10:17 AM
  2. Replies: 7
    Last Post: 03-26-2014, 07:56 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
  •