in reply to Re^3: playing video using vlc plugin
in thread playing video using vlc plugin

I am getting the line first line as
HTTP/1.1 200 OK

Replies are listed 'Best First'.
Re^5: playing video using vlc plugin
by Corion (Patriarch) on Dec 28, 2015 at 12:14 UTC

    So, does everything work now? If not, what is the complete output of your script (without the .mp4 file), and what does the web server write into the error log? Also, are you sure that your choice of browser can play back an mp4 video file? Or are you only trying to download the file to the client, not play it in the browser?

      By default in Webmin it was downloading the file so as per my requirement i have to play the video file instead of downloading it.For debugging i am using the Mozilla Firefox browser and yeah it does support the vlc-plugin. So i am trying with the vlc-plugin to do that. But i dont know what is going wrong.

        Currently you send a Content-Disposition header which tells the browser to download the file instead of playing it back:

        print "Content-Disposition: attachment; filename=\"$name$ext\"\n";

        Maybe removing the header is all you need. Does downloading the file work and produce a file identical to the original?

        Also, I don't find any documentation for your choice of Content-Type: x-vlc-plugin. The only search results with that word are for example this Stackoverflow page, which talks about the client side HTML that is needed to embed the VLC plugin. Maybe using video/mp4 or audio/mp4 as the content type is the correct approach?

        I would try to divide the problem into three parts:

        1. Does the web server with your program send the file correctly?
        2. Does your HTML page play a static file sent from the web server correctly?
        3. If you have both parts above correctly, make your program send the same headers as the web server.