CodeIgniter Forums

Full Version: MP4 Force Download
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]JingCleoVil[/eluser]
Hi all,

I am using this helper http://codeigniter.com/wiki/Download_hel...rge_files/ it works perfectly but when I downloaded the file it seems it cant play. Its MP4 format. I already added the mime file in config/mime.php 'mp4' => 'video/mp4'.

The file from ftp is 8.9mb and its same when i forcefully downloaded it.

Is it on the php header part?

El Forum

[eluser]Ken Verhaegen[/eluser]
Did you try another .mp4-file yet?
The MIME should be ok, but maybe there's a codec error withing the file itself.


http://mobiforge.co.../content-delivery-mobile-devices
Maybe this link helps in any way?

El Forum

[eluser]JingCleoVil[/eluser]
Yeah i think its any video. I also tried .mov same thing happened.

El Forum

[eluser]Ken Verhaegen[/eluser]
Probably something goes wrong when the script tries to divide (chunk) the files...
Try to comment out the MIME-sections, so you'll get a decent error code from the script if there is one.

El Forum

[eluser]InsiteFX[/eluser]
Try adding the mime type to application/config/mimes.php
Code:
'mp4' => 'video/mpeg',
Also you may need to change the file download size in your php.ini file!
Check you apache file also it may not have the mime type in it so add it!

InsiteFX

El Forum

[eluser]Ken Verhaegen[/eluser]
InsiteFX,
Like he said in the first post, he did that.
And the whole point of the extension he uses is to ignore php.ini settings and download bigger files in chunks (it works, but I can't seem to find out why some files are broken due to lost data)

El Forum

[eluser]InsiteFX[/eluser]
Give me a link and I'll see if I can play it!

El Forum

[eluser]JingCleoVil[/eluser]
Guys!

Thanks for quick response. I solved it. I just tweak the .htaccess by using this code


<Files *.mp4>
ForceType applicaton/octet-stream
</Files>

and normal link for the anchor.

<a href="test.com/videofile.mp4">DOWNLOAD</a>

El Forum

[eluser]czerneev[/eluser]
Hi Jing or everyone,

I'm kinda stuck with the same problem. I managed to save the file and indeed it has the same file size but when I try to open it I get
"Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file."

Where the original file plays well.

Your help will be much appreciated.

Thank you.

P.S. I'm newbie so kinda need a bit detailed info =)

El Forum

[eluser]InsiteFX[/eluser]
Because your Windows does not have the codex to play the file install the versions of QuickTime or RealPlayer and then you will have it.
Pages: 1 2