Prevent mp4 files from autostreaming

Prevent mp4 files from autostreaming

Posted by: _don
Posted on: 2009-05-27 10:45:00

If I link to a .mp4 file, it doesn't give a download link, but rather starts streaming. I have Quicktime installed unfortunately (Quicktime alternatives don't always work), which is why the file starts streaming rather than presenting me with a download box. I am sure a lot of people have Quicktime installed and also don't want .mp4 files they're trying to download from me to start streaming instead.

How do I stop this behavior without using some sort of download script and without removing Quicktime? I prefer the look of the default directory listing.

Also I know raring up the .mp4 files would stop this, but I'd have to reupload at least a GB of movies, since I don't think raring can be done with php. I know you can tar and untar files with PHP, but a lot of people would be confused by a .tar extension...

Re: Prevent mp4 files from autostreaming

Posted by: sXi
Posted on: 2009-05-27 12:06:00

Right-Click > Save Linked Content As... (or w/e terminology your browser uses).

You can archive files using rar, zip, etc. from shell, with a script that passes commands to shell, or with an SFTP client that supports the ability to issue shell commands. WinSCP is such a client.




How To Install PHP.INI / ionCube on DreamHost

Re: Prevent mp4 files from autostreaming

Posted by: _don
Posted on: 2009-05-27 12:26:00

Fatal error: Call to undefined function rar_open() in /home/x/x/testing/rar.php on line 3


Obviously RAR for PHP is not installed. I also do not have shell access, unless the basic webhosting package includes it?


Also, Save As is obviously an option, but I'd like for the file to always download when a user clicks the link. Save As is an extra step that should not be necessary here.

Re: Prevent mp4 files from autostreaming

Posted by: sXi
Posted on: 2009-05-27 13:12:00

In reply to:

Fatal error: Call to undefined function rar_open() in /home/x/x/testing/rar.php on line 3
Obviously RAR for PHP is not installed.


I didn't imply that it was wink


In reply to:

I also do not have shell access, unless the basic webhosting package includes it?


Panel > Users > Manage Users


In reply to:

Also, Save As is obviously an option, but I'd like for the file to always download when a user clicks the link. Save As is an extra step that should not be necessary here.


Your PC settings are stepping in and deciding to stream the content. This behaviour is user-configurable.




How To Install PHP.INI / ionCube on DreamHost

Tags: mp4 filesuntardefault directorydirectory listinggb