Results 1 to 5 of 5

Thread: How can I get an additional (Audio Only) stream using Wowza + Cloudfront

  1. #1
    Join Date
    Oct 2009
    Posts
    12

    Default How can I get an additional (Audio Only) stream using Wowza + Cloudfront

    So this is really a two-part question.

    First, about the Audio-Only stream.

    I found the (several) threads regarding how to enable the Wowza feature that splits the incoming stream, and is able to extract the audio and serve it as a separate "thing". I followed the instructions found here:

    http://www.wowza.com/forums/content.php?208-Adding-Multi-bitrate-Audio-only-Rendition-to-iOS-Streams-(AppStore-64Kbps)
    This looked extremely simple to implement, so I did modify the Application.xml corresponding to what I am using at the Origin server (that is sending the stream to the CloudFront distribution) and, as I understood it, I should be able to play the audio-only stream by using something like:

    http://[wowzaserver]:1935/[application]/[streamName]/playlist.m3u8?wowzaaudioonly
    I tried it (using the same JWPlayer configuration that plays back the "whole" stream just fine), but it didn't work. So I dug around a little more (actually read the whole post) and found the note where it says:

    Note: When using a live repeater (origin/edge) configuration with this setup, be sure to set the LiveStreamPacketizers value on the edge to cupertinostreamingrepeater and set the above properties on both the origin and edge.
    And I thought: "hum... this is NOT exactly a "live repeater (origin/edge)" scenario, is it? That, of course, since what I know about Wowza + CloudFront is that it is an HTTP caching scenario, where interaction between player and "edge" (ahem... CDN edge, that is) is actually sessionless. So... I'm guessing that the required parameter in the URL is not actually reaching the Origin server in order for it to know someone requested it (right?).

    So, what I would like to know is: is there a way around this? - Supposing I'm right about the problem, if not, please tell me where I'm wrong and how to solve it.

    I am thinking that I could create a second application in Wowza, and send to it an audio-only stream (we're using Wirecast to encode, so no big deal) and then deal with the request of the audio-only stream via the web page that serves the player, but if I can save the extra traffic, much much better.

    I will appreciate any help, pointers, instructions, encouragement and yes, I will even appreciate it if you tell me it can't be done.

    Finally, the second part - the issue.

    As I was playing around with the setup (I deployed the CloudFormation stack for Wowza+CloudFront available at AWS - pretty awesome stuff), I was also playing around with the Origin server, and at a given moment, I had to restart the WowzaMediaServer service. This is the output the console "spat":

    # sudo service WowzaMediaServer restart
    WowzaMediaServer: stopping
    waiting for processes to exit
    waiting for processes to exit                              [  OK  ]
    WowzaMediaServer: startingWowza Media Server 3 for Amazon EC2: Resize Boot Partition
    resize2fs 1.42.3 (14-May-2012)
    The filesystem is already 10485760 blocks long.  Nothing to do!
    
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/xvda1            41284928   1472524  39728548   4% /
    tmpfs                   848348         0    848348   0% /dev/shm
    /dev/xvda2           153899044    193164 145888256   1% /media/ephemeral0
    Wowza Media Server 3 for Amazon EC2: Initialize Content: /media/ephemeral0/WowzaMediaServer
    mkdir: cannot create directory `/media/ephemeral0/WowzaMediaServer': File exists
    mkdir: cannot create directory `/media/ephemeral0/WowzaMediaServer/mediacache': File exists
                                                               [  OK  ]
    I noticed the "mkdir: cannot create directory" error, but thought little of it. I went and tried to playback the stream (almost immediately) and it just kept on buffering... and I started to worry.
    I went ahead and restarted the server again... and got the same basic output.

    I renamed the "offending" directory (/media/ephemeral0/WowzaMediaServer to /media/ephemeral0/old_WowzaMediaServer) and restarted again, and this time it went on "clean" (no error messages):

    # sudo service WowzaMediaServer restart
    WowzaMediaServer: stopping
    waiting for processes to exit
    waiting for processes to exit                              [  OK  ]
    WowzaMediaServer: startingWowza Media Server 3 for Amazon EC2: Resize Boot Partition
    resize2fs 1.42.3 (14-May-2012)
    The filesystem is already 10485760 blocks long.  Nothing to do!
    
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/xvda1            41284928   1472524  39728548   4% /
    tmpfs                   848348         0    848348   0% /dev/shm
    /dev/xvda2           153899044    193164 145888256   1% /media/ephemeral0
    Wowza Media Server 3 for Amazon EC2: Initialize Content: /media/ephemeral0/WowzaMediaServer
                                                               [  OK  ]
    "Great! I guess it's Ok now... " - tried the stream again... and got buffering only again... and I panicked. My partner wanted to show the stream to someone, I was in a hurry, so I went and deleted the whole stack thinking there might be something I messed up, instantiated another one, and showed off the service. I know (in hindsight) the buffering thing was probably the content propagating to the CDN (I didn't give it enough time), but in any case I don't think that error should happen.

    Any ideas what went south there? Can that affect the functioning of the service (if I restart the server again and have the same "mkdir" error, that is)? Is this somehow permissions-related?

    Anyway... thanks in advance for any answers, to any or both questions. Looking forward to them!

    Have a good one.

  2. #2
    Join Date
    Oct 2009
    Posts
    12

    Default

    Sorry for the nuisance, but I am going to bump this one a little, since it's been a while since I posted, and not even one answer so far... any ideas? Anyone?

    Thanks in advance!

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

    Default

    The ?wowzaaudioonly stream should work from Cloudfront with HTTPOrigin mode enabled, but there will only be one session. To test directly from Wowza, turn HTTP origin mode off.

    On the 2nd issue, try stopping and starting Wowza rather doing restart.

    Richard

  4. #4
    Join Date
    Oct 2009
    Posts
    12

    Default

    Richard (and everyone else who wants to chime in):

    Thank you for your answer. However...

    1) Even with everything in place, and although I am pretty sure everything is properly configured, I can't get an audio-only stream by using ?wowzaaudioonly - video also comes back with it. I even tried opening the URL directly in Safari (iPad) like this:

    http://<server_name>/livecf/<streamName>/playlist.m3u8?wowzaaudioonly
    It opens just fine on the iPad - but it also plays back the video. Am I missing something here? The Application.xml seems to be properly configured... (just like the examples for iOS audio rendition posts)...


    2) I tried stopping and starting the server (instead of restarting it), I got this (logged as root, otherwise it was a LOT worse, due to permission issues):

    WowzaMediaServer: startingWowza Media Server 3 for Amazon EC2: Resize Boot Partition
    resize2fs 1.42.3 (14-May-2012)
    The filesystem is already 10485760 blocks long.  Nothing to do!
    
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/xvda1            41284928   1482952  39718120   4% /
    tmpfs                   848348         0    848348   0% /dev/shm
    /dev/xvda2           153899044    193164 145888256   1% /media/ephemeral0
    
    Wowza Media Server 3 for Amazon EC2: Initialize Content: /media/ephemeral0/WowzaMediaServer
    mkdir: cannot create directory `/media/ephemeral0/WowzaMediaServer': File exists
    mkdir: cannot create directory `/media/ephemeral0/WowzaMediaServer/mediacache': File exists
                                                               [  OK  ]
    Any ideas? This audio thing is what matters most right now - I managed to restart the server just fine by, once again, renaming the offending dir ("/media/ephemeral0/WowzaMediaServer") to something like /media/ephemeral0/oldWowzaMediaServer - and I guess it started alright, since everything is working...

    I hope you can help me with this... I am going NUTS, and my boss will have mine (...) if I don't make this work. :-)

    Thanks in advance.

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

    Default

    It would be best to take a closer. First let's focus on the audio only issue, with HTTPOrigin involved. Disable HTTPOrigin mode, then do a short test. Restart Wowza, test playback of the wowzaaudioonly stream, then zip up the /conf folder and just the current access log that shows the restart and this test to support@wowza.com. Include a link to thist thread for reference.

    Richard

Similar Threads

  1. Wowza server in AWS/Cloudfront HLS stream to VLC player not working
    By jdehart1 in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 1
    Last Post: 10-18-2013, 01:06 AM
  2. Wowza + CloudFront live HTTP stream
    By mattbodman in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 2
    Last Post: 06-18-2013, 09:22 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
  •