带有JW Player和SMIL文件的Wowza VOD应用程序-在移动设备上不起作用 [英] Wowza VOD App with JW Player and SMIL file - not working on mobile

查看:105
本文介绍了带有JW Player和SMIL文件的Wowza VOD应用程序-在移动设备上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在wowza论坛上发布了此帖子,但总共得到了0条回复,所以我也想在这里发布.我没有做太多的媒体流工作,我试图关闭一个VOD项目的一些细节,该项目基本上将视频流传输到网站,并且在将正确的流传递给正确的消费者方面遇到了问题(例如:Android浏览器,Chrome桌面浏览器,iOS等).我浏览了许多教程,论坛等,但找不到正确的解决方法,包括一些关于SO的问题...

这是我设置的: 在Wowza上: 我已经设置了VOD应用程序

  • 内容目录:
    $ {com.wowza.wms.context.VHostConfigHome}/content/Weekends
  • 播放类型:MPEG-DASH,Apple HLS,Adobe RTMP,Adobe HDS,RTSP/RTP全部
    已启用
  • SMIL文件:sopweekendsmil.smil(以下内容)

SMIL文件(出于隐私原因,在底部发布的测试URL中,我目前使用的内容与本SMIL中所述的有所不同-以下是实际项目的SMIL文件):

<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
    <body>
        <switch>
            <video height="240" src="SOP_priorities_240p.mp4" width="320">
                <param name="videoBitrate" value="1000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="360" src="SOP_priorities_360p.mp4" width="640">
                <param name="videoBitrate" value="2000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="480" src="SOP_priorities_480p.mp4" width="720">
                <param name="videoBitrate" value="2000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="540" src="SOP_priorities_540p.mp4" width="960">
                <param name="videoBitrate" value="2500000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="720" src="SOP_priorities_720p.mp4" width="1280">
                <param name="videoBitrate" value="5000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
        </switch>
    </body>
</smil>

我在wowza服务器上的相应文件夹中拥有上述视频.

在应用程序网页中: 我正在使用JW Player,并具有以下代码来嵌入JW Player(版本6.9):

<script type="text/javascript">
    jwplayer("myElement").setup({
        fallback: true,
        width: 640,
        height: 480,
        sources: [{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.f4m"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd"
        }],
        rtmp: {
            bufferlength: '10'
        },
        plugins: {
             'qualitymonitor-2':{}
         }
    }); 
</script>

(我真的不知道qualitymonitor插件的功能是什么,或者它根本不起作用.如果我将其取出,似乎没有任何影响...). 我尝试使用JW Player语法进行多种变体,但这在桌面浏览器(Chrome/Firefox)上有效.但是,唯一可以正常运行的文件/URL似乎是jwplayer.smil.其他选项均无法在桌面浏览器上运行-如果我取出jwplayer.smil URL来测试其他选项,则会收到找不到可播放的源"消息.另外,无论我如何尝试,这在任何移动浏览器上都无法正常工作.我只尝试了一个文件(例如:.m3u8 smil url),并得到相同的错误.

当我尝试在Wowza服务器界面中使用测试播放器"功能时,MPEG DASH测试可以正常工作,而Adobe HDS可以正常工作(在chrome浏览器中),但是我似乎无法在测试播放器之外工作. /p>

我觉得我缺少一些概念性的东西-我需要为不同的消费者创建更多实际的文件吗?还是我应该如何设置JW Player?还是某些东西被阻止了?

测试网址: http://solsystech.com/

任何帮助将不胜感激.

更新:我将其部分工作了-我将嵌入代码更新为 以下:

jwplayer("myElement").setup({
      fallback: true,
      width: 640,
      height: 480,
      androidhls: true,
      sources: [{
          file: "<?php echo $jwUrl; ?>",
          type: "rtmp"
      },{
          file: "<?php echo $hlsUrl; ?>",
          type: "hls",
          "default": "true"
      },{
          file: "<?php echo $dashUrl; ?>",
          type: "dash"
      }],
      rtmp: {
          bufferlength: '10'
      }
  });

我尝试完全关闭RTMP,因为我知道这应该是 能够在没有RTMP的情况下工作,但是在chrome或 用于OSX的firefox,因此当我重新将其添加进来并使HLS 默认情况下,我能够在移动设备和台式机上播放流 浏览器正确.如果我默认使用其他设备,则移动设备 浏览器不会播放视频流...仍在尝试解决为什么什么都不显示的问题 如果我不从Wowza以RTMP流式传输,则桌面浏览器可以工作...

解决方案

RTMP是Flash格式,永远不会在移动设备上播放.为了最大程度地跨设备和跨浏览器兼容,HLS是首选格式.

I posted this in the wowza forums but have gotten a total of 0 responses, so I wanted to post here as well. I haven't done a lot of media streaming work and I'm trying to close out some details of a VOD project that basically streams video to a website and have run into an issue with enabling the correct stream to go to the correct consumer (ex: android browser, chrome desktop browser, iOS, etc). I've cycled through a bunch of tutorials, forums, etc and can't find the right fix, including some of the questions here on SO...

Here's what I have set up: On Wowza: I have a VOD application set up

  • content directory:
    ${com.wowza.wms.context.VHostConfigHome}/content/Weekends
  • Playback types: MPEG-DASH, Apple HLS, Adobe RTMP, Adobe HDS, RTSP/RTP all
    enabled
  • SMIL file: sopweekendsmil.smil (contents below)

SMIL file (in the test url posted at the bottom I'm currently using a different than described in this SMIL due to privacy - the below is the SMIL file for the actual project):

<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
    <body>
        <switch>
            <video height="240" src="SOP_priorities_240p.mp4" width="320">
                <param name="videoBitrate" value="1000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="360" src="SOP_priorities_360p.mp4" width="640">
                <param name="videoBitrate" value="2000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="480" src="SOP_priorities_480p.mp4" width="720">
                <param name="videoBitrate" value="2000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="540" src="SOP_priorities_540p.mp4" width="960">
                <param name="videoBitrate" value="2500000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
            <video height="720" src="SOP_priorities_720p.mp4" width="1280">
                <param name="videoBitrate" value="5000000" valuetype="data"></param>
                <param name="audioBitrate" value="48000" valuetype="data"></param>
            </video>
        </switch>
    </body>
</smil>

I have the above videos in the appropriate folder on the wowza server.

In the application webpage: I'm using JW Player and have the following code to embed JW Player (version 6.9):

<script type="text/javascript">
    jwplayer("myElement").setup({
        fallback: true,
        width: 640,
        height: 480,
        sources: [{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.f4m"
        },{
            file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd"
        }],
        rtmp: {
            bufferlength: '10'
        },
        plugins: {
             'qualitymonitor-2':{}
         }
    }); 
</script>

(I don't really know what the qualitymonitor plugin does or if it works at all. Seems to have no influence if I take it out...). I tried a bunch of variations with the JW Player syntax, but this worked on the desktop browsers (Chrome/Firefox). However, the only file/url that works correctly live seems to be the jwplayer.smil. None of the other ones work on the desktop browsers - I get a "No playable sources found" message if I take out the jwplayer.smil url to test the other ones. Also, this isn't working in any way on any mobile browsers no matter what I try. I've tried just a single file (ex: the .m3u8 smil url) and get the same error.

When I try the Test Players function in the Wowza server interface, the MPEG DASH test works correctly and the Adobe HDS works correctly (in chrome browser) but I can't seem to get those working outside of the Test Players.

I get the feeling that I'm missing some conceptual piece - do I need to create more actual files for the different consumers? Or is it possibly how I have JW Player set up? Or maybe something is being blocked?

Test URL: http://solsystech.com/

Any help would be greatly appreciated.

UPDATE: I got this partially working - I updated the embed code to the following:

jwplayer("myElement").setup({
      fallback: true,
      width: 640,
      height: 480,
      androidhls: true,
      sources: [{
          file: "<?php echo $jwUrl; ?>",
          type: "rtmp"
      },{
          file: "<?php echo $hlsUrl; ?>",
          type: "hls",
          "default": "true"
      },{
          file: "<?php echo $dashUrl; ?>",
          type: "dash"
      }],
      rtmp: {
          bufferlength: '10'
      }
  });

I tried turning RTMP off completely, as I understand this should be able to work without RTMP, but then nothing would play in chrome or firefox for OSX, so when I added that back in and made HLS the default, I was able to get the streams to play in mobile and desktop browsers correctly. If I have a different one as default, the mobile browsers don't play the stream...Still trying to solve why nothing on desktop browsers work if I don't stream in RTMP from Wowza...

解决方案

RTMP is a Flash format and will never play on mobile. HLS is the preferred format for maximum cross-device and cross-browser compatibility.

这篇关于带有JW Player和SMIL文件的Wowza VOD应用程序-在移动设备上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆