Azure Media Services Live Streaming Preview Error - azure

I'm trying to use preview url to preview my stream before go live, but always get an error "No compatible source was found for this media". When I start the event, I have no problem playing the actual streaming url, it plays perfectly in the Azure Media player.
And another question, I see a couple video tutorials and see that preview can be used in pass through channels, but I found this in the documentation: "When Live Encoding is enabled, you can now get a preview of the live feed as it reaches the Channel.", this means that only Standard channels can be used to see a preview? By the way, I tested in both channels, pass through and standard and get the same error in preview.
Update:
I'm using Chrome and just for curiosity, I open Azure Media Player in Internet Explorer and finally I can see the live feed in preview. So, what's the problem with Chrome?

you need to enable Flash in Chrome to be able to playback preview URLs from AMS because the previews are only available in the smooth streaming format. Smooth Streaming needs plugins like Flash or Silverlight to playback.
You can enable flash in a couple different ways but most commonly you can just go to content settings and enable it for whatever websites you're using.

Related

How to embed azure media services live stream to a personal website

I have created a simple live stream using Azure Media Services. I can view it from Azure Media Player but I want to be able to embed the video to my personal website using the <Video></Video> HTML tag. I've been looking for a solution but I can't seem to find one. Is this even possible?
The HTML5 tag does not always support playback of HLS or DASH depending on the platform you are on.
https://caniuse.com/?search=hls
https://caniuse.com/?search=dash
Sounds like you are trying to playback HLS or DASH from Azure Media Services with just an HTML5 video tag and no javascript player framework. That won't work in most browsers.
Review https://howvideo.works/ for background on how HLS and DASH actually work in the browser - and the reason that you need access to a javascript library and the Media Source Extension feature of HTML5 (not always available in all browsers - see https://caniuse.com/mediasource)

How to make Azure Media Service hosted video auto play on mobile?

I am working on a project where by we are hosting and streaming video through Azure Media Service.
There is a particular video we have positioned as the hero background upon entry to the site. On desktop the video auto-play's and streams just fine but on mobile it does not autoplay at all. It simply showcases the preview image.
I'd love to be able to paste a link to the site but unfortunately due to the confidentiality of the project I am not able to. However, if there is something in particular you'd like me to post to help support the question please let me know.
The web-app is build using Angular.
Does anyone know how to fix this problem? or can point me in the right direction?
Check with the browser platform you are targeting on the mobile applications. Most mobile browsers have disabled autoplay. User MUST now initiate all playback actions.
Since the release of iOS 10 Apple has allowed muted video autoplay: https://webkit.org/blog/6784/new-video-policies-for-ios/
Chrome 53 on Android also allowing muted video autoplay: https://developers.google.com/web/updates/2016/07/autoplay

Enabling background audio in my Windows Store HTML5 app

I have an HTML5 Progressive Web App (PWA) that I've packaged into the Window Store thanks to PWABuilder. It's a Pandora-like music app that plays audio via the HTML5 audio tag.
The app works fine on Windows 10 until I minimize the app, then the audio stops playing. I want my app to keep playing audio even when minimized.
My first thought is I need to declare the appropriate capabilities in my app manifest. So, in my appxmanifest.xml, I added:
<Capabilities>
<uap3:Capability Name="backgroundMediaPlayback" />
</Capabilities>
But even with the backgroundMediaPlayback capability, it doesn't work; minimizing the app stops the audio.
Looking at the Universal Windows audio sample app, it says this should work:
"Adding the backgroundMediaPlayback capability enables all media
playback APIs become background enabled. That means you can use any
platform audio APIs, such as MediaPlayer, AudioGraph, XAudio2, and
the HTML Audio tag."
If I'm reading that right, it means simply adding the backgroundMediaPlayback capability should make my HTML5 audio tags work in the background. Is there something else I'm missing?
This sounds like the app is being suspended instead of using the Activity Sponsored Execution mode that's available for apps that declare the backgroundMediaPlayback capability (MS blog here).
Check to see if your app is being suspended when it's minimized.
Were you able to get the sample working?
UPDATE 1
It looks like your MinSDK and Target SDK are set to 10240 (the first version of Windows 10). Update the values to the following:
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.14393.0" MaxVersionTested="10.0.16299.0"/>
UPDATE 2
In addition to the SDK versions, you also need to add the SystemMediaTransportControls. See the 2nd bullet point in under the "Requirements for Background Audio" paragraph in this documentation article.
Resources
I tracked down the different documentation articles that piece this together.
In the Background Audio article's Single Process section defines the SDK version constraints as min version 1607 (aka Anniversary Update, OS Build/SDK 14393)
The UAP3 Capability manual
Play Media In The Background documentation
The Manifest schema changes documentation (per release)

Streaming with Azure media services

I have a media services account with a streaming unit and I have been able to upload a video and dynamically package into various streams. I am trying to have a webpage with the streaming url to be able to serve cross platform iOS, android, desktop etc.. How do I go about it.
PS: I was able to create a page with videojs and progressive download. I am tring to explore the other option with Windows Azure.
Thanks for any help.
Azure Media Services has shipped Azure Media Player which could automatically detect the capability of your browser or device, and request the appropriate streaming format- for instance, it will grab MPEG-DASH stream with EME enabled browser, or HLS for iOS devices. You could give it a try: http://amsplayer.azurewebsites.net/azuremediaplayer.html. Please contact yanmf#microsoft if you want to get into Private Preview for this player. It will be free for use when we launch very soon.
Take a look at JW Player and the Microsoft Media Platform Player Framework. Both offer plenty of playback options for progressive and adaptive streaming to a wide range of browsers and devices.
For desktop : Use OSMF plugin - Adobe + Smooth streaming URL
For iOS : Use HTML5 Video tag+HLS v3 URL
For Android : Use HTML5 Video Tag+HLS v3 URL or Dash.JS with Mpegh Dash URL
For Windows Phone : Use Dash.js + Dash.JS URL
Hope this helps...
Update1:
Azure has came up with their own Media player for streaming which will take care of playing video in all the devices.
For Demo and Test - http://www.aka.ms/azuremediaplayer
For Documentaion - http://azure.microsoft.com/blog/2015/04/15/announcing-azure-media-player/
The bitdash MPEG-DASH player works also out of the box for MPEG-DASH content, here you can see an example stream comming from Azure: http://www.dash-player.com/demo/streaming-server-encoder-support/?mpd=http%3A%2F%2Fsamplescdn.origin.mediaservices.windows.net%2Fe0e820ec-f6a2-4ea2-afe3-1eed4e06ab2c%2FAzureMediaServices_Overview.ism%2Fmanifest(format%3Dmpd-time-csf)&m3u8=undefined&autoplay=true&muted=false&usePoster=true

Enable CORS on a WAMS media file for playback in the MPEG-DASH reference player

I've been trying to use MPEG-DASH's dash.js reference player to play media from my Windows Azure Media Services (WAMS) account. Unfortunately Chrome 33 (which supports Media Source Extensions, and thus DASH) gives me a standard CORS error:
XMLHttpRequest cannot load totallyrad.origin.mediaservices.windows.net/6c8d4ddf-1579-4047-8f15-ae1fe95bd2d5/interview1.ism/manifest(format=mpd-time-csf).
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:3000' is therefore not allowed access.
Unfortunately, you can't just upload a crossdomain.xml to WAMS so the browser will allow the request (it's a disallowed type for some reason).
I found an article on how to enable CORS for Azure Storage but this is to enable an upload scenario from a browser: This is the opposite of what I need.
It seems that Azure doesn't really support dash if this is not possible... so I must have done something wrong because someone has already done this, as this media link works in the dash player.
For testing, you can use the online Dash.js player
After Kirk Shoop responded on my github issue (https://github.com/Dash-Industry-Forum/dash.js/issues/118):
WAMS should produce the headers correctly if the content was published correctly.
Pasting from a WAMS PM:
Next steps for you would be:
Check the streaming URL, perhaps hit Publish again if you've Unpublished it.
Check that you can get a Smooth manifest for you file. Remove ‘(format=mpd-time-csf)’ from your url to get the smooth manifest
Check that the smooth plays (http://smf.cloudapp.net/healthmonitor).
Check that you have a streaming RU.
Check that the DASH manifest downloads.
Try it again in the DASH-IF sample player.
Kirk
Software Design Engineer
Microsoft Open Technologies, Inc.
Thanks for the quick response. I got it working based on the feedback. Here's what I found:
My WAMS account didn’t have a Reserved Unit (RU). Although I believe this is for encoding, I assigned one.
My content was unpublished, so I published it.
Finally, my encoding job apparently wasn’t using smooth streaming – the default in the MediaServicesGettingStarted project is “H264 Broadband 720p”.
I had tested my uploaded video in a Flash player with the Microsoft OSMF smooth streaming plugin... and it had worked. So I'm completely confused as to why it became unpublished, or how the smooth streaming plugin played it previously. But, it works now... so thank you for the tips!

Resources