[mythtv-users] file extension of recorded programs / mplayer firefox plugin?
Michael T. Dean
mtdean at thirdcontact.com
Sun Nov 5 05:14:23 UTC 2006
On 11/04/2006 06:44 PM, Andrew Lyon wrote:
> Is there any way to change the file extension of recorded programs
> when you click on them in mythweb? so that the mplayer firefox plugin
> is invoked?
>
> I guess I am asking if they can be set to have a .mpg extension on
> disk, or if it could be changed by mythweb or apache..
>
> Currently they have no file extension at all, i dont really want to
> setup a mime type of *.
The URL has no extension, but the handler /does/ transmit proper
Content-disposition headers indicating the "suggested" filename--which
does have an extension. More importantly, the handler also transmits a
proper Content-type header.
Note, however, that Firefox--as mandated by the HTTP
specification--completely ignores the file extension of web content and,
instead, handles content according to the specified MIME content type.
IE, on the other hand, completely ignores the HTTP specification and
does "the right thing" with the content based on file extension
/regardless/ of MIME content type (which is why so many web servers out
there are not properly configured--developers only tested with broken
IE--and don't work on standards-compliant browsers).
Sure, Apache can automatically add a Content-Type header to a response
based on file extensions when serving a file, but that /only/ works if
Apache is serving the content. In MythWeb's Recorded Programs page, the
links trigger Perl code which serves the contend, completely bypassing
Apache's file handling.
So, in reality, the extension means nothing in this case. You just need
to set up your browser to specify a handler for the appropriate video type.
Mike
At the bottom of the message are example headers obtained with:
wget --no-check-certificate --spider --server-response
https://hostname/mythtv/pl/stream/1027/1162686600 > headers
Note that if you use authentication for your MythWeb (and, you really
should if it's accessible from the Internet), you'll need to create a
~/.netrc file:
touch ~/.netrc
chmod 600 ~/.netrc
Then, edit the file to contain:
machine hostname.domainname login myusername password mypassword
HTTP/1.1 200 OK
Date: Sun, 05 Nov 2006 05:02:22 GMT
Server: Apache/7.12.3 (Unix) mod_ssl/14.3.75 OpenSSL/4.7.8c DAV/2
PHP/18.1.3 SVN/5.3.23
Accept-ranges: bytes
Content-range: bytes 0-614746548/614746548
Content-disposition: attachment; filename="Scrubs - My Interpretation.mpg"
Content-length: 614746548
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: video/mpeg
More information about the mythtv-users
mailing list