Home User CP Donate Chat Register Today!  
  Get New posts Faq / Help?
   


Go Back   Hackint0sh > Projects and Hacks > iPhone > Applications & Development > Web Applications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2009, 11:53 PM
zeroXcool
Status: Offline
Junior Member
 
Join Date: May 2009
Posts: 3
Rep Power: 0
zeroXcool is on a distinguished road
Default mp4 via php - why doesn't iphone play

Hi,
at first sorry for the bad english but i hope you can understand my problem.

I've two files on my webserver "test.mp4" and "test.php".

"test.mp4" is a video file that plays well on iphone when i open it in safari

"test.php" is a php script that set the headers of the mp4 video file and then sends the file content to the browser

"test.php" plays well on my pc, but the iphone brings the player up and then says: "this video can't be played"

so i captured the traffic of both requests (to "test.mp4" & "test.php") with wireshark and followed the tcp stream, but can't see anything wrong.

so does anyone else have an idea ?

the content of "test.php" is below, as well as the wireshark output.

"test.php":
PHP Code:
<?php
    header
("HTTP/1.1 200 OK");
    
header("Date: Tue, 19 May 2009 20:55:26 GMT");
    
header("Server: Apache/2.2.3 (Debian) mod_mono/1.2.1 mod_python/3.2.10 Python/2.4.4 PHP/5.2.9-0.dotdeb.1 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8");
    
header("Last-Modified: Tue, 19 May 2009 20:50:33 GMT");
    
header("ETag: \"5696da-54ac4-fdb5840\"");
    
header("Accept-Ranges: bytes");
    
header("Content-Length: 346820");
    
header("Content-Type: video/mp4");
    
passthru("cat test.mp4");
?>
Wireshark - Follow TCP Stream (test.php)
Code:
GET /test.php HTTP/1.1

User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2 like Mac OS X; de-de) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5G77 Safari/525.20

Referer: http://wwwdump.zcnet.ath.cx/

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: de-de

Accept-Encoding: gzip, deflate

Connection: keep-alive

Host: wwwdump.zcnet.ath.cx



HTTP/1.1 200 OK

Date: Tue, 19 May 2009 21:47:04 GMT

Server: Apache/2.2.3 (Debian) mod_mono/1.2.1 mod_python/3.2.10 Python/2.4.4 PHP/5.2.9-0.dotdeb.1 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8

X-Powered-By: PHP/5.2.9-0.dotdeb.1

Last-Modified: Tue, 19 May 2009 20:50:33 GMT

ETag: "5696da-54ac4-fdb5840"

Accept-Ranges: bytes

Content-Length: 346820

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Content-Type: video/mp4



....ftypisom....mp41....free.
<MORE BINARY CONTENT OF test.mp4>
Wireshark - Follow TCP Stream (test.mp4)
Code:
GET /test.mp4 HTTP/1.1

User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2 like Mac OS X; de-de) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5G77 Safari/525.20

Referer: http://wwwdump.zcnet.ath.cx/

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: de-de

Accept-Encoding: gzip, deflate

Connection: keep-alive

Host: wwwdump.zcnet.ath.cx



HTTP/1.1 200 OK

Date: Tue, 19 May 2009 21:47:09 GMT

Server: Apache/2.2.3 (Debian) mod_mono/1.2.1 mod_python/3.2.10 Python/2.4.4 PHP/5.2.9-0.dotdeb.1 with Suhosin-Patch mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8

Last-Modified: Tue, 19 May 2009 21:12:26 GMT

ETag: "5696da-af095-5e1e2280"

Accept-Ranges: bytes

Content-Length: 716949

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Content-Type: video/mp4



....ftypisom....mp41....free.
<MORE BINARY CONTENT OF test.mp4>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 05-20-2009, 12:11 PM
zeroXcool
Status: Offline
Junior Member
 
Join Date: May 2009
Posts: 3
Rep Power: 0
zeroXcool is on a distinguished road
Default

Solution: byte-ranges !!

My PHP-Script didn't support byte-ranges and the Quicktime-Player (IPhone & Windows) needs this to play the video.

A solution is here Content Delivery for Mobile Devices | mobiForge (function rangedDownload) but since this would only work with files and not with on the fly encoding it's nothing for me
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
iPhone Games - NES Emulator elbarlo Free Toolchain Software 109 08-17-2009 10:43 PM
Official, Consolidated iPhone Hack Unlock Thread freudling General 9 10-31-2008 10:28 AM
[1.1.2 OTB] > 1.1.3 HW Unlock, up and running: GSM.VN ; Geohot; Imth; and hackin0sh Number_41 Older Software Unlock Solution 132 01-18-2008 12:18 PM
Tutorial: Jailbreak/Activate/Unlock a 1.0.2 or 1.1.1 iPhone using IPSF obviouz Older Software Unlock Solution 25 10-16-2007 03:08 PM



All times are GMT +2. The time now is 07:31 AM.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 Ad Management by RedTyger
follow us on Twitter!

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105