Skip to content

Instantly share code, notes, and snippets.

@cmcginty
Last active December 16, 2016 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmcginty/456767516650338a69338010e729099e to your computer and use it in GitHub Desktop.
Save cmcginty/456767516650338a69338010e729099e to your computer and use it in GitHub Desktop.
Enable Mythweb Direct Download Links on Ubuntu

Enable Mythweb Direct Download Links on Ubuntu

"The requested URL /mythweb/mythweb.pl/pl/stream/2199/1399343400 was not found on this server."

Requesting just /mythweb/mythweb.pl would download the PERL script, indicating that CGI wasn't working. To get it working, I needed to make the following changes:

  1. sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load

  2. In /etc/apache2/mods-available/mime.conf, add:

     AddHandler cgi-script .cgi .pl
    

After these changes and restarting apache2, downloading works just fine.

If you need to support H.264 media with the extension of .mp4, then update the stream_raw.pl file:

    $ sudo vi /usr/share/mythtv/mythweb/modules/stream/stream_raw.pl

Add the follow section to the if statement:

    elsif ($basename =~ /\.mp4$/) {
        $type   = 'video/mpeg';
        $suffix = '.mp4';
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment