CodeIgniter Forums
MP4 Force Download - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: MP4 Force Download (/showthread.php?tid=41217)

Pages: 1 2


MP4 Force Download - El Forum - 05-02-2011

[eluser]JingCleoVil[/eluser]
Hi all,

I am using this helper http://codeigniter.com/wiki/Download_helper_for_large_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?


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 05-02-2011

[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


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 05-02-2011

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


MP4 Force Download - El Forum - 07-17-2012

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


MP4 Force Download - El Forum - 07-18-2012

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