Wowza Community

smil on s3 with JWPlayer 6

I have set up a Wowza instance on EC2 and I can stream the sample file. I can even stream one of my own files from my s3bucket using JWPlayer 6. But, I cannot get adaptive bitrate to work. When I look at the network console in Firebug, the player is requesting crossdomain.xml from the root of my instance which fails because it doesn’t exist.

I followed the instructions here and edited vhost.xml (although I tried it without the edit because it looked to me like the second to last entry already had the required entry).

I have 4 videos in my s3 bucket and a smil manifest (video.smil) that looks like this:

<smil>
  <head>
  </head>
  <body>
    <switch>
        <video src="mp4:video_320X180.mp4" system-bitrate="250000" width="320"/>
        <video src="mp4:video_480X270.mp4" system-bitrate="400000" width="480"/>
        <video src="mp4:video_960X540.mp4" system-bitrate="1000000" width="960"/>
        <video src="mp4:video_1280X720.mp4" system-bitrate="1400000" width="1280"/>
    </switch>
  </body>
</smil>

my JWPlayer urls are:

http://my-instance-dns.compute.amazonaws.com/vods3/definst/smil:amazons3/mybucket/assets/video/test/video.smil/jwplayer.smil

http://my-instance-dns.compute.amazonaws.com/vods3/definst/smil:amazons3/mybucket/assets/video/test/video.smil/playlist.m3u8

The player loads, but when I press play (on a pc or ios device) the “loading” spinner runs for about 15 seconds and the player displays the error “manifest not found”. In the console on chrome I can see that as soon as I click play the browser makes a request to:

Request URL:http://my-instance-dns.compute.amazonaws.com/crossdomain.xml which eventually fails with with no response code.

This URL plays fine, but it is not adaptive which is what we are after: rtmp://my-instance-dns.compute.amazonaws.com/vods3/definst/mp4:amazons3/mybucket/assets/video/test/video_1280X720.mp4

What am I doing wrong?

EDIT: For what it is worth, I have a local smil. When I load it into the flash player it works fine.

<smil>
  <head>
    <meta base="rtmp://my-instance-dns.compute.amazonaws.com/vods3/_definst_"/>
  </head>
  <body>
    <switch>
        <video src="amazons3/mybucket/assets/video/test/video_320X180.mp4" system-bitrate="250000" width="320"/>
        <video src="amazons3/mybucket/assets/video/test/video_480X270.mp4" system-bitrate="400000" width="480"/>
        <video src="amazons3/mybucket/assets/video/test/video_960X540.mp4" system-bitrate="1000000" width="960"/>
        <video src="amazons3/mybucket/assets/video/test/video_1280X720.mp4" system-bitrate="1400000" width="1280"/>
    </switch>
  </body> 
</smil>

How were these videos encoded, what encoder did you use? Each video must be key frame aligned for switching to work. The Expression 4 Encoder is known to do this as required, there are pre-set examples in this article:

https://www.wowza.com/docs/how-to-encode-video-on-demand-content

The only way to debug alignment of vod assets in Wowza is to stream them live like this:

https://www.wowza.com/docs/how-to-do-scheduled-adaptive-bitrate-streaming-using-stream-class-streams

Then enable this debug property:

https://www.wowza.com/docs/how-to-debug-encoder-multi-bitrate-keyframe-alignment

Also, for testing, you might try ABR streaming with .smil in the Wowza /examples/VideoOnDemandStreaming/FlashHTTPPlayer, or Silverlight player.

Richard

Right, JW Player does not use the server-side smil. JW Player uses a local .smil. You can leverage the server-side smil for JW Player 6:

https://www.wowza.com/docs/how-to-use-jw-player-with-adaptive-bitrate-streaming-from-wowza-streaming-engine

There is an example here:

https://www.wowza.com/docs/how-to-use-jw-player-with-wowza-streaming-engine

Richard

Corrected the first link in previous post, changed to:

https://www.wowza.com/docs/how-to-use-jw-player-with-adaptive-bitrate-streaming-from-wowza-streaming-engine

They are key frame aligned. The were encoded with Adobe Media Encoder CS6. Like I mentioned at the end of the post, I can stream them using ABR in flash if I put a smil (video.smil) on my server in the same directory as the page that contains my JWPlayer that looks like this:

<smil>
  <head>
    <meta base="rtmp://my-instance-dns.compute.amazonaws.com/vods3/_definst_"/>
  </head>
  <body>
    <switch>
        <video src="amazons3/mybucket/assets/video/test/video_320X180.mp4" system-bitrate="250000" width="320"/>
        <video src="amazons3/mybucket/assets/video/test/video_480X270.mp4" system-bitrate="400000" width="480"/>
        <video src="amazons3/mybucket/assets/video/test/video_960X540.mp4" system-bitrate="1000000" width="960"/>
        <video src="amazons3/mybucket/assets/video/test/video_1280X720.mp4" system-bitrate="1400000" width="1280"/>
    </switch>
  </body> 
</smil>

I can then load it with a setup like this:

<script type="text/javascript">
 jwplayer('player').setup({
                autostart: false,
        sources: [
                { file: "video.smil"}
            ],
        rtmp: {
                bufferlength: 5
        },
        width: "480",
        height: "270",
        primary: "flash",
        });
</script>

But, when I try to do anything with server side ABR playback nothing happens. The video won’t even start. And, like I mentioned, the network traffic shows a request to

my-ec2-dns/crossdomain.xml

which it willnot find since there is no crossdomain.xml file in the root directory on my ec2 instance. Because that request fails, playback fails. Let me know if you want a link to the test player so you can see what I mean. Any other ideas on what the problem might be?