• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MP4 Force Download

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?

[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.

Maybe this link helps in any way?

Yeah i think its any video. I also tried .mov same thing happened.

[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.

Try adding the mime type to application/config/mimes.php
'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!


[eluser]Ken Verhaegen[/eluser]
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)

Give me a link and I'll see if I can play it!


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

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

and normal link for the anchor.

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

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 =)

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.