VideoJS plugin not working on MPEG-DASH video format in Moodle - moodle

I am working on Moodle plugins. I am working on the video player. I want to make sure that the video player supports Dash video files. I checked that the default video player in Moodle in videoJS. I also checked that VideoJS should support MPEG-DASH. To double check, I went to Site Administration>Plugins>Plugins Overview>VideoJS>Settings. There I looked into the Video file extensions. The only option where I could find MPEG-DASH was 'Streaming Media'. I enabled both MPEG-DASH and HLS here.
Now, I went to Home>Available Course 'abc'>Add an activity or resource>File. Here in the 'Description' box, we have the option to upload video:
Here I tried to upload my Dash or .mpd file. I must mention, I have many .m4s chunks and 1 mpd file. However, I see error message: Dynamic Adaptive Streaming over HTTP (MPEG-DASH) filetype cannot be accepted.
I guessed that once I enable MPEG-DASH in VideoJS, the File video should accept .mpd file. I do not know what is going on. Do I need to 'enable' VideoJS for File resource separately? Or does it not support MPEG-DASH for the moodle version I am using Moodle 4.0.

Related

How to get to play an audio file in browser itself rather than downloading from a onedrive shared folder link?

I'm working on a flutter application which uses the shared data from onedrive to play in the app but I'm having trouble getting the m4a file.
For instance, This is a onedrive link: https://1drv.ms/u/s!Aicuq23aphFzb_KQvr0anumY9Jk?e=NQZfXl. Now, I converted it to an api as given in here and I got this URL.
When I browse children.#content.downloadUrl I see a link which is a download link but I want a link with m4a file that will play in the browser itself. How am I suppose to achieve that ?
You will need an audio playing service in your app which can take an URL and play it for you handling all the internals like downloading, buffering etc.
Checkout this package: audio_service

Azure media player source manifist

We are very small junior school private tutors have setup of an online portal where students can login and watch the daily video lectures. We have many videos uploaded to Azure media services but we realized the encoding cost is high and not affordable. So I encoded a video using FFMPEG and generated m4s and audio file and .mpd (metadata) using MPBox in my local.
I have copied all the files on Azure blob storage and blob storage have HTTPS access. Can I use .mpd as source url for Azure media player ?
e.g. Azure media player source is //amssamples.streaming.mediaservices.windows.net/3b970ae0-39d5-44bd-b3a3-3136143d6435/AzureMediaServicesPromo.ism/manifest
but my generated metadata from MPDBox is
https://bb.sourceoftraining.companywebinternet.storage/ssj-ewrrer-2343s-ssssdf23/process_and_benifits.mpd
Or any other player I can use. I tried Shaka player but unable to show the Resolution and Playback speed settings.
Uploading pre-encoded MP4's works just fine. I suggest you download the latest version of the Azure Media Explorer tool for the v3 API. In there you can now upload an MP4 into a new asset, and have it generate the client and server manifests needed for streaming. Just upload to a new empty Asset, and then double click on the asset to get to the tab for the files, and click the generate manifests buttons.
That pre-gens the required manifest files needed for streaming an MP4 that is pre-encoded with closed 2 second GOPs. The tool pre-generates both the client and server manifest and saves them back into the asset to improve the playback performance from the streaming server.
You can use Azure Media Player to play back DASH, Smooth, or HLS - but the technology that it chooses to use for playback differs by platform. For example depending on the browser version, OS, or mobile client it will chose to load a different player tech or it will use the built-in OS player support.
https://learn.microsoft.com/en-us/azure/media-services/azure-media-player/azure-media-player-overview
For DASH content (.mpd) the AMP player chooses to use Dash on Windows, and on Android in specific conditions. It does this by detecting the platform and using the right tech combined with the /manifest(format=mpd-time-cmaf) format on the URL. You can learn more about how "dynamic packaging" works in AMS here - https://learn.microsoft.com/en-us/azure/media-services/latest/dynamic-packaging-overview
There are various "format" options on the streaming locator URL in AMS that provide different manifest formats back.
Smooth Streaming = /manifest
MPEG-DASH-CMAF = /manifest(format=mpd-time-cmaf)
HLS with CMAF = manifest(format=m3u8-cmaf)
HLS v3 (TS) = /manifest(format=m3u8-aapl-v3)
Using one of those various formats, you can use any 3rd party player that supports them. Shaka, HLS.js, Exoplayer on Android, iOS AvFoundation native player, Video.js, or even the 'adpater-player' noted by Jason above. Any player that supports the current HLS or DASH specifications should work.
If you have School email addresses that you can use for yourself and your students the simplest solution would be to leverage capabilities from Microsoft Stream via the free O365 education plan - https://www.microsoft.com/en-us/microsoft-365/academic/compare-office-365-education-plans. Info on Microsoft Stream at https://www.microsoft.com/en-us/microsoft-365/microsoft-stream.
And to clarify feedback Jason Pan just provided, while Azure Media Player doesn't support just pointing at .mpd file for playback this is rather done via first creating appropriate server manifest and then requesting .mpd manifest via format option in the URL clients will use to request content. Media Services will then dynamically create the appropriate manifest to respond to the client request. See John's response for links to articles with additional feedback on this.
If you use Shaka Player's UI library, you'll be able to display the Resolution and Playback speed settings.
Shaka UI library Shaka Player Demo

Encoding of audio (mp3, mp4, m4a, ogg) file for smooth streaming window media services

I want to encode the audio file (mp3, mp4, m4a, ogg) for the streaming and want to play (I want to play encoded file smoothly) using the HTML5 player but I think HTML5 player.
So now what I am doing, I am uplaoding a file and econding this file on windows Azure Media Services using the preset "AAC Good Quality Audio". It encode the file with .mp4 file format and then I create SAS locator to run this file, it works well but the problem is that user can download it too which I don't want to allow.
If I create the OnDemandOrigin locator of the same encoded asset, it gives me 404 erroe. It means we can not play it.
Below are the steps that I have used to upload the file on Azure Media Services:
Created the empty assest.
Upload the file into the asset.
Then create the new task job to encode the audio file.
I have successfully encoded the file but when I try to generate the origin url it generate the url but when I browse the file I get
the error 404.
My queries:
"AAC Good Quality Audio" preset is the right for my task?
How can I restrict the user to download the file, if I use sas locator.
Is it possible to play the encoded file using origin locator.
Can I encode audio files for smooth streaming ? If I can then which player I should use to run the encoded file for all browsers, IOS devices and android devices.
If you want further details please feel free to ask me.
Awaiting your response.
Thanks
If your user is able to listen to the audio you're publishing, they will also be able to download the file. This you can not prevent. At best, you can make it difficult, but not impossible. More to the point, Media Services at its current incarnation has no way for you to do authorization of any kind, so the only tool you've got is time-bombed SAS locators.
The typical solution for this problem is to use DRM. Media Services supports PlayReady encryption, but you need to either have a PlayReady server or purchase it as a service (there is currently a service in the Azure Marketplace that provides PlayReady for a monthly price).
See following article how to protect assets with Microsoft PlayReady technology
Origin Locators are something you would use to publish a Smooth Stream or HLS asset. It is not useful for regular media files, as it is internally something equivalent to an IIS Media Services endpoint. For regular media files, you can just as well host them in Blob Storage -- and refer to them via the SAS locator.
There is currently no single format that will play across all devices and operating systems. You can get Smooth Streaming to work on most Windows and Mac computers (possibly Linux, too), either with Silverlight or with the Smooth Streaming Plugin for the Flash-based OSMF. For iOS devices you will need to encode to HLS and use the HTML5 video tag. Microsoft Media Platform will support MPEG-DASH, a recently ratified ISO/IEC standard for dynamic adaptive streaming over HTTP.More details how to use DASH preview feature can be found here
If you want smooth streaming for audio only, it looks like you will have to create a video asset with an empty video stream -- although there is a Uservoice request to add support for audio only in the future.

Steps to show live HTTP streaming video with no extension on MPMovieplayercontroller?

I am trying to develop an iPhone app which will be able to show live stream video on iPhone.The link is in format 'http://192.168.111.18:8002/testlink'.
I went through all the apple documentation and have downloaded mediastreamsegmenter and also it has been installed properly as I can see its details using 'man mediastreamsegmenter' command.I couldn't understand it after that.Please guide me regarding this.
You should use a link with suffix ".m3u8", which contains the TS segments of the live video stream. When you click on the "m3u8" link, then the video player will be launched to request for those TS segments, otherwise, the browser won't know it is a live video link.
https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html

Streaming video, cloud servers, and videojs

I'm interested in setting up a streaming video server (perhaps on a cloudfront server) with videojs. I understand that flash video can be streamed, however, is it possible to stream video using videojs and a different codec? (like h246). I tried looking through the videojs documentation and forums but did not find any additional info.
Video.js has limited support for RTMP streaming in Flash, but hopefully more in the next few months.
HTTP Live Streaming (HLS) is the most supported streaming format for HTML5 (iOS, Safari, latest Android). Video.js can support that on the devices that support HLS natively.
I think you would have to transcode the h264 file on the fly to get the effect you want. Subsonic is a program which will read your file structure, display your videos and music in a webui, transcode the audio/video and stream it--but it uses jwplayer, not videojs.
However, it is opensource, so if you want to try to modify that, I'm sure it would be possible.