Results 1 to 2 of 2
Discuss mp4 via php - why doesn't iphone play at the Web Applications - Hackint0sh.org; Hi, at first sorry for the bad english but i hope you can understand my ...
  1. #1
    Newbie Array

    Join Date
    May 2009
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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>



  2. #2
    Newbie Array

    Join Date
    May 2009
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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

 

 

LinkBacks (?)

  1. 03-25-2012, 06:36 AM

Similar Threads

  1. Appletv doesn't play live TV(web TV)
    By kingrocks in forum AppleTV 1
    Replies: 5
    Last Post: 03-02-2010, 10:05 PM
  2. [Jailbreak 3.0] 02.28 Doesn't Play Nice
    By kkdool in forum iOS 3.x (iPhone OS 3.x)
    Replies: 5
    Last Post: 04-01-2009, 01:26 PM
  3. [BBC iPlayer] Blue Arrow to play video doesn't show up
    By platt in forum Web Applications
    Replies: 6
    Last Post: 06-12-2008, 02:39 AM
  4. Itunes Musics doesn´t play on 1.1.3 DevTeam
    By testando in forum General
    Replies: 4
    Last Post: 01-29-2008, 03:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 04:51 AM.
twitter, follow us!