• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    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.

    Lounge
    5
    16
    9397
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Former User
      A Former User last edited by

      When I attempt to access (presumably to download) an .mp4 video Opera displays screensful of random ASCII characters. As a guess Opera is trying to utilise Windows Media Player. Is there a setting I can make to assist Opera? Windows Media Player as a plugin/addon perhaps?

      Reply Quote 0
        1 Reply Last reply
      • leocg
        leocg Moderator Volunteer last edited by

        Opera should be able to play a MP4 file, depending on the codec it uses. If it is displaying some weird characters then there is a chance that the site is sending wrong info to Opera.

        Right click on the link, save the file and try to open it in Opera to see if it plays.

        What's your version of Opera, OS and link to the file?

        Reply Quote 0
          A Former User 2 Replies Last reply
        • A Former User
          A Former User @leocg last edited by

          @leocg Thank you for your response; it is much appreciated 😄

          (And I have not seen such a comprehensive collection of Emoji. Quite incredible!)

          These two screenshots seem to illustrate what I'm seeing:

          link text

          And version information and OS:

          link text

          The link to the file is:

          link text

          In the past I've used 'MSI Web Video' to produce shockwave flash (.swf) files that rendered okay in Opera. See, for example:

          link text

          Eric Carwardine alias Randomist

          Reply Quote 0
            1 Reply Last reply
          • A Former User
            A Former User @leocg last edited by

            @leocg The direct link to the file didn't post correctly. It should be:

            link text

            Eric alias Randomist

            Reply Quote 0
              1 Reply Last reply
            • leocg
              leocg Moderator Volunteer last edited by

              I've downloaded the video and played it in Opera without any problems. It means that the problem is probably on the page itself, maybe the wrong mime type is being sent to Opera.

              BTW, the same problem happens on Edge and Firefox tries to download the file instead of trying to play it.

              Reply Quote 0
                A Former User A Former User 2 Replies Last reply
              • A Former User
                A Former User @leocg last edited by

                @leocg Streaming video is a complex topic. Simply uploading an .mp4 (or an .avi) file to a website is not sufficient. I'll need to look further.

                Reply Quote 0
                  1 Reply Last reply
                • A Former User
                  A Former User @leocg last edited by

                  @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.

                  Reply Quote 0
                    1 Reply Last reply
                  • sgunhouse
                    sgunhouse Moderator Volunteer last edited by

                    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).

                    Reply Quote 0
                      1 Reply Last reply
                    • burnout426
                      burnout426 Volunteer last edited by

                      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 http://www.randomvoting.com/videos/ directory to video/mp4 (with perhaps removing the no-sniff header too) might help if you can't get the site to fix it.

                      Reply Quote 0
                        1 Reply Last reply
                      • burnout426
                        burnout426 Volunteer last edited by

                        Create a folder named "Fix MP4 Type".

                        In it, put these files:

                        manifest.json:

                        {
                            "background": {
                                "scripts": ["background.js"]
                            },
                            "incognito" : "spanning",
                            "description": "Fix MP4 Type on randomvoting.com", 
                            "browser_action": {
                                
                            },
                            "manifest_version": 2, 
                            "name": "Fix MP4 Type on randomvoting.com", 
                            "permissions": [
                                "webRequest", 
                                "webRequestBlocking", 
                                "http://www.randomvoting.com/videos/*.mp4"
                            ],
                            "version": "0.1"
                        }
                        

                        background.js:

                        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"
                                    break;
                                }
                            }
                            return {responseHeaders: headers};
                        }, {urls: ['http://www.randomvoting.com/videos/*.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 http://www.randomvoting.com/videos/capstick_came_home.mp4, 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.

                        Reply Quote 0
                          A Former User 2 Replies Last reply
                        • A Former User
                          A Former User @burnout426 last edited by

                          @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...🤔 😕

                          Reply Quote 0
                            burnout426 1 Reply Last reply
                          • burnout426
                            burnout426 Volunteer @Guest last edited by

                            @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.

                            Reply Quote 0
                              1 Reply Last reply
                            • A Former User
                              A Former User @burnout426 last edited by

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

                              Reply Quote 0
                                burnout426 1 Reply Last reply
                              • burnout426
                                burnout426 Volunteer @Guest last edited by burnout426

                                @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.

                                Reply Quote 0
                                  1 Reply Last reply
                                • A Former User
                                  A Former User last edited by

                                  Who's listeners?

                                  Reply Quote 0
                                    burnout426 1 Reply Last reply
                                  • burnout426
                                    burnout426 Volunteer @Guest last edited by

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

                                    Reply Quote 0
                                      1 Reply Last reply
                                    • First post
                                      Last post

                                    Computer browsers

                                    • Opera for Windows
                                    • Opera for Mac
                                    • Opera for Linux
                                    • Opera beta version
                                    • Opera USB

                                    Mobile browsers

                                    • Opera for Android
                                    • Opera Mini
                                    • Opera Touch
                                    • Opera for basic phones

                                    • Add-ons
                                    • Opera account
                                    • Wallpapers
                                    • Opera Ads

                                    • Help & support
                                    • Opera blogs
                                    • Opera forums
                                    • Dev.Opera

                                    • Security
                                    • Privacy
                                    • Cookies Policy
                                    • EULA
                                    • Terms of Service

                                    • About Opera
                                    • Press info
                                    • Jobs
                                    • Investors
                                    • Become a partner
                                    • Contact us

                                    Follow Opera

                                    • Opera - Facebook
                                    • Opera - Twitter
                                    • Opera - YouTube
                                    • Opera - LinkedIn
                                    • Opera - Instagram

                                    © Opera Software 1995-