Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Cannot access (download?) to view .mp4 video files.

  • @leocg said in Cannot access (download?) to view .mp4 video files.:

    It means that the problem is probably on the page itself, maybe the wrong mime type is being sent to Opera.

    So what one would do with that?
    I also have that trouble with mime type with some hosts sometimes. Not usually recently, but still. When it happens, the download extension does catch the file to download.

  • If the is on some hosting site you may be stuck with what you have. You can always save the link to a file and view it in an external program (I just did - it's a video of a cat).

  • Close all tabs in Opera so there's only the start page. Ctrl + shift + i to load developer tools. Switch to the Network tab, check "disable cache" and make sure "all" (in this particular case) for the filter. Then, paste the link in the address field and press enter.

    You'll then see a request/repsponse connection being logged. Left-click it and click the "Headers" tab. What you will see is:

    Content-Type: text/plain

    That's the reason for the problem as suggested previously.

    Now, browsers could try to sniff the content, figure out that it's actually an mp4 and play it etc. But, the site also sends:

    X-Content-Type-Options: nosniff

    that tells the browser not to do that and to treat it as text/plain just like the site says.

    An extension that allows you to modify the content-type in response headers for files with mp4 extensions in the directory to video/mp4 (with perhaps removing the no-sniff header too) might help if you can't get the site to fix it.

  • Create a folder named "Fix MP4 Type".

    In it, put these files:


        "background": {
            "scripts": ["background.js"]
        "incognito" : "spanning",
        "description": "Fix MP4 Type on", 
        "browser_action": {
        "manifest_version": 2, 
        "name": "Fix MP4 Type on", 
        "permissions": [
        "version": "0.1"


    chrome.webRequest.onHeadersReceived.addListener(function(details) {
        var headers = details.responseHeaders;
        for (var i = 0; i < headers.length; ++i) {
            if (headers[i].name === "Content-Type") {
                headers[i].value = "video/mp4"
        return {responseHeaders: headers};
    }, {urls: ['*.mp4']}, ['responseHeaders', 'blocking']);

    Then, goto opera://extensions, switch to developer mode, click "load unpacked extension" and point it to the folder.

    Also, adjust opera://flags/#autoplay-policy how you want.

    Then, when navigating to, it should play inside Opera once enough of it is buffered. You can then use the download option on the video toolbar to download it if you want.

    Anyway, play with and tweak the extension to your liking.

  • @burnout426
    What is the difference between .js and .json extensions?
    Do you use the Notepad application for that? I used to learn HTML and created some files and saved as .html...🤔 😕

  • @joshl said in Cannot access (download?) to view .mp4 video files.:

    What is the difference between .js and .json extensions?

    .json is for specifying Javascript data objects. .js is for directly executable Javascript code. In this case, think of JSON like an ini file or a prefs file etc.

    @joshl said in Cannot access (download?) to view .mp4 video files.:

    Do you use the Notepad

    Yes. Notepad or any text editor is fine. Notepad++ is what I use in this case.

  • @burnout426, it only fixes stuff on that randomvoting or should one put some list of sites (or hosts?) instead of it there?

  • @joshl said in Cannot access (download?) to view .mp4 video files.:

    it only fixes stuff on that randomvoting

    Yes. You really need to do it on a case-by-case basis, as the fix for each problem site can be different.

    However, you can specify multiple match_patterns in permissions in the manifest file and in the urls array in the listener background.js to make the specific fix apply to more URLs.

    You could set "<all_urls>" in the manifest file and add multiple listeners (one for each site) in background.js where you can then do specific fixes per site.

  • Who's listeners?

  • @joshl I meant to add multiple chrome.webRequest.onHeadersReceived.addListener... in background.js. One for each site you want to handle.

Log in to reply