What are the requirements for a server serving mpeg-dash - html

I am trying to understand if I can serve mpeg dash from normal blog storage.
I have created a test cases using the Youtube MPEG-DASH - Media Source Demo.
The example they give works
http://dash-mse-test.appspot.com/dash-player.html?url=http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd
But when I try and host the same files within an Azure website I get the following error.
http://dash-mse-test.appspot.com/dash-player.html?url=http://videostreamtest.azurewebsites.net/mpegdash/car-20120827-manifest.mpd
3, Implausible duration from video element: NaN
Can anyone tell me what the requirements are for hosting mpeg dash are and why I am getting the error I am getting?

Looks like you have wrong CORS settings on our webserver, as the range request is causing an error, just look in your console and you will see "Request header field Range is not allowed by Access-Control-Allow-Headers.". Did you enable CORS?
You can go for segmented MPEG-DASH content, where no "range" header field is necessary. you could transcode some from bitcodin.com and put it on your webserver with an MPEG-DASH player such as dash-player.com.

Related

Html5 video element refuses to play

I have a html5 video embedded as follows:
<video controls poster="/wp-content/uploads/2015/12/screenvid1.png">
<source src="/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4" type="video/mp4">
<source src="/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
This works fine on the test server. However, it doesn't work on the 'real' server. On this 'real' server, Internet Explorer 11 says "Invalid Source", and Firefox 43.0.4 says "No video with supported format and MIME type found."
I am quite positive that the source file is in the correct map and believe that the browsers find the file, but somehow refuse to play it. At least I don't see how the source file could possibly in the wrong place. It's true that I get the same error message when I change the file path into a non-existing path, but as I said, I don't see how it could be a simple case of 'file not found'. And if it is a case of 'file not found', it's not because the file isn't actually there (unless I'm tragically mistaken of course!)
Note: the only difference in the path for the source file between the two servers is that on the test server the path begins with an extra map '/wptest', because that's the submap the Wordpress site resides in, whereas on the 'real' server it resides in the root folder. After copying the site to the 'real' server, I've made the corresponding change in all relevant places for many files (e.g. images), and the files are always found. I've also checked three times that the file is actually there, in the correct map, on the 'real' server. In fact, let me upload a screen shot of the map structure as it is on the 'real' server (with the video file selected):
http://www.test2468.nl/wptest/Screenshot%20(3137).png
[NB: On this server, the map called 'svvreewijk' always counts as the root folder!]
I've found other questions regarding this error message, but the proposed solutions seem quite complicated (like changing the format with special audio formatting software), and I'm still hoping that the issue is actually simple to resolve - especially given that the video plays without problem on the test server.
Link to the relevant page on the test server: http://www.test2468.nl/wptest/foto-vid/ (video more to the right)
Link to the equivalent page on the 'real' server:
http://www.svvreewijkdevaan.nl/nl/foto-video/
Thanks.
Its definitely the case that the sever is returning a message saying that the file is not available as Sarah says.
Given the info in your question this might be caused by a number of things:
different relative vs absolute paths between test server and real server (although if your other files, images etc work this looks less likely).
the video file is very large - your server or your network may have restrictions on very large files
there may be difference in the servers video serving capability (for example see this similar issue with mp4 on IIS: http://robwillis.info/2012/04/iis-7-404-file-not-found-when-the-file-really-does-exist/)
In first case, file exists:
$ wget --spider test2468.nl/wptest/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4
HTTP request sent, awaiting response... 200 OK
Length: 587940629 (561M) [video/mp4]
Remote file exists.
In second case, file does not:
$ wget --spider svvreewijkdevaan.nl/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4
HTTP request sent, awaiting response... 404 Not Found
Remote file does not exist -- broken link!!!

Where to find the response video data?

This is regarding retrieving data from Mr.Robot
When I used the inspect element tool to investigate the traffic I was getting from the site via the network panel, here's a sample of the data I got
Does anyone know where I can find the data that corresponds to the video(tv episode)?
I saw that the file format of xhr represents the XMLHttpRequest so that is a combination of my browser requesting JSON, HTML, and XML from the web server? (Can someone confirm this as well)
I am trying to find a type that corresponds to one of these but having no luck.
I am doing this to enhance my knowledge of web and network engineering.
In the network tab, if you select to see the headers tab, you can see this information:
Request URL:http://api.massrelevance.com/usadigitalapps/mr-robot-tag-mrrobot.json?limit=5&since_id=1039088770827352555_891624285
Here, you can see it's a request to a JSON file. :D
EDIT: Try going to this URL when the video is not playing in the browser (for some reason, when I had the page loaded this was returning as blank):
http://api.massrelevance.com/usadigitalapps/mr-robot-tag-mrrobot.json?limit=5&since_id=1039263408306586885_20082880
That was the request mine was making. In there, you can find a video URL:
https:\/\/scontent.cdninstagram.com\/hphotos-xaf1\/t50.2886-16\/11765169_875397039210031_1586195986_n.mp4
Remove the \ and you'll see the video :D

HTML5 video wont play when hosted on my server, plays fine from external source

I think I have exhausted every avenue in trying to solve an issue whereby an HTML5 video won't play on my site. I have a simple demo page (below) to demonstrate where I am. I originally had a video in various formats for different browsers but for easier testing I am now just working with webm and testing in Chrome (Version 41.0.2272.89 (64-bit) on Mac OSX Yosemite). You will see the basic markup from the page above.
Demo 1 - .webm video hosted locally on the server - No video playing
I have tested the following:
Video file itself is accessible (cURL shows 200 response header)
Video file has correct MIME type (cURL shows video/webm set by .htaccess)
Video file has ok permission (644)
...so unless I am missing something obvious the markup is fine (for the browser I am testing) and the file itself is available and in the correct format.
OK, so the issue must be with the file itself then? Perhaps a codec issue or something, maybe something corrupted in the compression? Well, I don't think so...
The file came from an external source and if I embed it directly from the third-party's server it works fine. Check out this demo which is identical in markup other than the fact the video file is hosted externally:
Demo 2 - Same markup but video hosted elsewhere
Works fine for me!
So to confirm, the markup is the same in each case, the file when hosted externally loads fine, the exact same file when downloaded from the external source and uploaded to my server and referenced locally does not work.
I can only think that my testing here has ruled out issues with the video file itself and also with the HTML. It must be a server config issue with the parsing of the file surely? But, with the 200 response, the correct MIME type added via .htaccess and correct permissions I don't know what else to try.
Is everyone else seeing the same issue? What else should I be checking?
Thanks all!
For anyone else with HTML5 Video not displaying as expected check the following:
MIME types are supported
Rule out issues with the video file itself
Check your server for support of range request
In this case Apache 2.2.23 did not support an empty range request. The option is to update Apache to 2.2.27 as detailed in the following thread Range: bytes 0- FAILS in Apache 2.2.23
Thanks to Pablo Montilla for the guidance!
I think your problem lies in byte range support.
If you use curl:
curl "http://alkemist.partners/video-js/small.webm" -H "Range: bytes=0-"
You'll see the Empty reply from server response, but if you remove the Range header, your server returns the file correctly.

HTTP live Streaming reader

I have a server providing live streaming channel over a network via http and upd (http://..., upd://...), and I've been trying to find a way to display the stream to users in their browser (on at least Windows 7). I have tried to set video tag with src "http:// ip of server - ip of channel...", but i have obtained that "video format or MIME type is not supported".
so i have tried to save this content for 1 min and then played as a normal video, it's played normaly. So i think that my problem is to find a solution to display this content on the browser.
kindly, can you help me to find this solution or the steps and the tools required for this issue. please.
best regards,

Failed to Load Resource, Plugin Handled Load on iOS

Every time I try to view a video file on my server I get this error on iOS in Safari, Chrome.
I am using a blob server and then an Apache server so I am not sure what the problem is. However, when I only use Apache, I do get this error but then I have the video rendering too.
However when I render this using my server this is not working. Does anyone know why this is? The videos work fine on other devices and in browsers also works fine if accessed through Apache only.
The solution to this problem was just a work around. The reason being the that blob servers aren't streaming servers. iOS devices expect the videos to arrive in small chunks. So for instance a streaming server is able to do this. However, a blob server just hands the video as a blob which is not what the iOS device expects. Some browsers are smart enough to handle this but others not.
The way I solved this was to add the video files outside of the blob server in a folder within the project and then render this through the Apache server instead of serving it via the actual blob server we were using. I hope this helps.
I was also getting this error for some mp4 videos. Turns out it wasn't a server issue for me it was a video encoding issue.
Issue
A "moov atom" needs to be placed at the front of the video file. It serves as a table-of-contents for the video. That "moov atom" has to be read first for html streaming or it won't play on some devices.
The Fix
To fix, I used handbrake to transcode my video. Turn on 'web optimize' Also turning on zerolatency and 'fast decode' may help (found in the video tab).
We were getting a similar error here. I thought it may have been the streaming issue since our video was hosted in blob storage on Azure. After setting up a Media Service for streaming, the video still didn't work. It turns out, the cause of the bug for us was Safari using a Service Worker. Below is some further explanation of what we found:
Safari first sends a byte range request for a Video tag that expects a 206 response. However, if you use a Service worker, the response returns with a 200 and it appears Safari doesn't know how to handle this. Our solution was to exclude using a Service Worker for Safari.
We found this by using the network tab of the Safari debugger on a Macbook to troubleshoot the issue we were seeing on the iPad. Attached is a screenshot for comparison/reference. The left tab shows what the call should look like by default. The right tab shows what you would see if using a Service Worker.
Add the following line of code to your .htaccess (located in the root of your WordPress installation):
SetEnvIfNoCase Request_URI .(?:mp4)$ no-gzip dont-vary
The following screenshot is the new complete .htaccess
Reference: https://clickshepherd.com/blog/solved-elegant-themes-divi-and-cloudflare-mp4-media-error-formats-not-supported-or-sources-not-found/
In our case, we created a URL pattern for our blob assets and then set headers in that URL pattern definition page which sent back a mime type of 'video/mp4'. This should instruct the browser to treat the binary stream as chunked, which in turn meant we didn't need to download the whole thing before it started playing.
Google Cloud Platform Solution
This issue caused me a lot of headache, so I just wanted to add my specific solution here, if anyone else encounters this while deploying to Google Cloud Platform.
When trying to load MP4 videos in Safari, I was getting the same error:
"Failed to Load Resource, Plugin Handled Load"
Which was preventing the videos from playing.
Still, I wanted to try to keep everything inside Google Cloud, so I created a Storage Bucket for the site, and added the videos there.
Of course, trying to retrieve the videos from the storage URL from the main site resulted in a CORS error.
Fortunately, you can configure CORS pretty easily on storage buckets:
Configuring cross-origin resource sharing (CORS)
Once that configuration was deployed, I was able to retrieve and load the videos on the site in Safari without the "plugin handled load" error.
I saw the error "Failed to Load Resource" and though that this is reason, why my videos are not playing.
Turned out, my videos were missing the hvc1 tag. And when I added it - they're playing fine.
In my case issue was with H256 HEVC videos, but in your case some other encoding / tagging issues can be the reason.
In my case, issue was fixed with ffmpeg:
ffmpeg -i input.mp4 -tag:v hvc1 -acodec copy -c:v copy -movflags faststart out.mp4