[mythtv-users] file extension of recorded programs / mplayer firefox plugin?

Andrew Lyon andrew.lyon at gmail.com
Sun Nov 5 12:52:07 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
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Hmm, I tried the same wget test and indeed the Content-Type is correct:

HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Sun, 05 Nov 2006 12:49:25 GMT
  Server: Apache
  Accept-ranges: bytes
  Content-disposition: attachment; filename="The Simpsons - Homer to
the Max.mpg"
  Content-length: 2366860968
  Content-range: bytes 0-2366860968/2366860968
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
  Content-Type: video/mpeg
Length: 2,366,860,968 (2.2G) [video/mpeg]
200 OK

Strange that the mplayer plugin doesnt handle that, but its not a myth
problem thats for sure!

Thanks for your help.

Andy


More information about the mythtv-users mailing list