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

I added this
if ( $begin > 0 || $end < $size ) { print "HTTP/1.1 206 Partial Content" ; } else { print "HTTP/1.1 200 OK" ;
But i am getting the error
Error - Bad Header
I think this is webmin error.

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

    Sorry for mixing up the HTTP status line - it's been a long while since I last did this manually... You will need to print at least the newlines:

    print "HTTP/1.1 206 Partial Content\r\n";

    Also consider just running your script from the command line to see whether the headers look right. You might want to comment out the sending of the video to prevent binary data being spewed to your terminal.

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

        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?