How can I edit the URL of a .mp4 file to make it stream in browser? Lets say I have a .mp4 file hosted on a CDN. What can I add to the URL for that file to play in browser? I dont have any back end access to the CDN and am merely a user.

Example-

What would I add to this URL in order?

Would /player.php? work here?

2

1 Answer

The button has the CDN link:

You can use the <video> tag in your HTML page to play the CDN link.

<!DOCTYPE html> <html> <body> <video width="320" height="240" controls> <source src="" type="video/mp4"> </video> </body> </html> 

PS:
You will notice your page link has this icon:

With a name like video_unknown.png that could be a clue that something is wrong, or at least is causing the file not to work inside a browser tab.

Checking your mp4's file bytes I see that a section called MDAT (which is media data) has a hard-coded size number of 1 but is then followed by 649213 bytes of actual media data.

Normally an mp4 has MOOV (metadata/settings for playback) then followed by MDAT (the actual playback data). Your file is arranged opposite with MDAT first, not a bad thing since an MPEG decoder is supposed to check this size and just skip to the metadata. Well your file says "media data size is 1 byte in length" so now the browser's decoder skips 1 byte and when it finds no metadata bytes saying MOOV it gives up and downloads the file to disk (hoping you know a software to handle such a corrupt file). The MOOV section itself had correct size shown as 6059 for the metadata.

Media players (or <video> tag) can play it once file is fully downloaded since the whole file is available to scan for metadata (which itself has the byte positions for each video frames)

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.