Re: streaming video to iPod touch through Safari
Sorry for my poor English and network knowledge. I would like to try using a proxy program to send a MP4 file to Touch is because I have try to use Safari to access a MP4 file directly from a web server and it playback perfectly. So I wonder if it is possible to send the MP4 through a proxy program, so that I can place MP4s in private area, or even do some simple load balancing on converting the source video file. Now I would like to clarify what is the different between direct accessing a MP4 from an Apache server and access a file stream from a proxy program on the same server, except the header. (I think this should be a basic knowledge but I really don't know, sorry). I am working on other part of the app. first, then I will try to use VLC to transcode and stream the MP4 using RTSP/HTTP. On Oct 17, 9:48 am, Michael Boutros <[EMAIL PROTECTED]> wrote: > Sorry to beat a dead horse in case the original author's issue has > been solved, but I'm also stuck. I have a pretty slick system that > basically emulates the Music functionality of touch/iPhone, but the > only issue I have now is actually playing back the file, or sending it > over to be played. How can I do this? From what I can tell, I need to > embed the file into the page using object> (for Quicktime), and then the device will handle the rest. Is > that what happens? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to iphonewebdev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~--~~~~--~~--~--~---
Re: streaming video to iPod touch through Safari
Sorry zariok. I would like to make thing clear. It that you mean I have to check the header of request come to my stream.php page and ignore all request that having 'byte-range' in the header? Sorry I am not good at dealing with header in PHP On Oct 16, 5:49 am, zariok <[EMAIL PROTECTED]> wrote: > Let me know how that works. iPod Touch and iPhone both specifically > state RTSP not supported. You might be able to just ignore the byte- > range requests and always return the current stream. > > On Oct 15, 12:27 pm, mickey9801 <[EMAIL PROTECTED]> wrote: > > > Thanks all. > > > I have tried on Windows Safari and got the same result in Firefox. I > > will try > > using Darwin Streaming Server to stream to iPod touch. > > > On Oct 15, 7:06 am, Stephane Daury <[EMAIL PROTECTED]> wrote: > > > > Instead of proxying the file with PHP, I'd advise for you to make use > > > of a PHP-generated playlist file, similar to what you'd do to stream > > > MP3s (see M3U or PLS file formats), or even better, a Quicktime > > > Media link. > > > > If the reason for the proxy is something like a play count having the > > > dynamic playlist will allow you to do the same. > > > If the proxy is there for security, remember the plugin used to embed > > > the file might not have the same features as what you'd expect from a > > > browser (such as cookie or auth support). For securing media, I'd > > > advise you to run a daemon like the Darwin Streaming Server (Open > > > Source components of the Quicktime Streaming Server). > > > > I think one of the reason you're having problems w/ your script is > > > that the script might be feeding the file faster than the bit rate > > > the player/plugin is expecting. > > > Ultimately, the browser isn't what's accessing the file. It's the > > > plugin running inside the browser. :) > > > Also, you mentioned you tried under Firefox on your PC. > > > Have you tried it with the Windows version of Quicktime and Safari, > > > both available from Apple. > > > That's sure to be the closest match to the iPod Touch environment. > > > > Hoping this might help, > > > > -- > > > Stephane Dauryhttp://tekartist,.org/ > > > > On Oct 14, 2007, at 1:18, mickey9801 wrote: > > > > > Hi all. I am trying to develop a web application likehttp://vtap.com > > > > or Google video which let user to download and playback mp4 file > > > > through Safari browser bundled with iPod touch. I can download and > > > > playback a mp4 file correctly when I access the movie directly by URL > > > > (I put the mp4 file in a public area). But when I try to use a simple > > > > file proxy program to read the same file at same location and transmit > > > > it to iPod touch, it doesn't playback correctly. Everything goes fine > > > > in PC (Firefox). I think it would be a problem in header but I don't > > > > know what should I put into. > > > > > My test program is as below (http://dev.crossmedia.com.hk/ipod/ > > > > stream.php): > > > > > PHP: > > > > > > > $filename = "./ef_mv_320_h264b.mp4"; > > > > $filesize = filesize($filename); > > > > $mime_type = 'video/mp4'; > > > > > header("Expires: Mon, 26 Nov 1962 00:00:00 GMT"); > > > > header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT"); > > > > header("Cache-Control: no-store, private, must-revalidate, max- > > > > age=0"); > > > > header("Pragma: no-cache"); > > > > header('Content-Length: '.$filesize); > > > > header('Content-Type: '.$mime_type); > > > > header('Content-Disposition: attachment; > > > > filename="'.basename($filename).'"'); > > > > > $fp = fopen($filename,"r"); > > > > while (!feof($fp)) { > > > > echo fread($fp, 8192); > > > > } > > > > fclose($fp); > > > > ?> > > > > > I have checked access log of my server and found that each time I > > > > access the stream.php, ipod touch safari will access the file twice. > > > > The user agent of first access is "Apple iPhone" and the second access > > > > is "iPod Safari"... > > > > > xxx.xxx.xxx.xxx - - [14/Oct/2007:04:
Re: streaming video to iPod touch through Safari
Thanks all. I have tried on Windows Safari and got the same result in Firefox. I will try using Darwin Streaming Server to stream to iPod touch. On Oct 15, 7:06 am, Stephane Daury <[EMAIL PROTECTED]> wrote: > Instead of proxying the file with PHP, I'd advise for you to make use > of a PHP-generated playlist file, similar to what you'd do to stream > MP3s (see M3U or PLS file formats), or even better, a Quicktime > Media link. > > If the reason for the proxy is something like a play count having the > dynamic playlist will allow you to do the same. > If the proxy is there for security, remember the plugin used to embed > the file might not have the same features as what you'd expect from a > browser (such as cookie or auth support). For securing media, I'd > advise you to run a daemon like the Darwin Streaming Server (Open > Source components of the Quicktime Streaming Server). > > I think one of the reason you're having problems w/ your script is > that the script might be feeding the file faster than the bit rate > the player/plugin is expecting. > Ultimately, the browser isn't what's accessing the file. It's the > plugin running inside the browser. :) > Also, you mentioned you tried under Firefox on your PC. > Have you tried it with the Windows version of Quicktime and Safari, > both available from Apple. > That's sure to be the closest match to the iPod Touch environment. > > Hoping this might help, > > -- > Stephane Dauryhttp://tekartist,.org/ > > On Oct 14, 2007, at 1:18, mickey9801 wrote: > > > > > Hi all. I am trying to develop a web application likehttp://vtap.com > > or Google video which let user to download and playback mp4 file > > through Safari browser bundled with iPod touch. I can download and > > playback a mp4 file correctly when I access the movie directly by URL > > (I put the mp4 file in a public area). But when I try to use a simple > > file proxy program to read the same file at same location and transmit > > it to iPod touch, it doesn't playback correctly. Everything goes fine > > in PC (Firefox). I think it would be a problem in header but I don't > > know what should I put into. > > > My test program is as below (http://dev.crossmedia.com.hk/ipod/ > > stream.php): > > > PHP: > > > $filename = "./ef_mv_320_h264b.mp4"; > > $filesize = filesize($filename); > > $mime_type = 'video/mp4'; > > > header("Expires: Mon, 26 Nov 1962 00:00:00 GMT"); > > header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT"); > > header("Cache-Control: no-store, private, must-revalidate, max- > > age=0"); > > header("Pragma: no-cache"); > > header('Content-Length: '.$filesize); > > header('Content-Type: '.$mime_type); > > header('Content-Disposition: attachment; > > filename="'.basename($filename).'"'); > > > $fp = fopen($filename,"r"); > > while (!feof($fp)) { > > echo fread($fp, 8192); > > } > > fclose($fp); > > ?> > > > I have checked access log of my server and found that each time I > > access the stream.php, ipod touch safari will access the file twice. > > The user agent of first access is "Apple iPhone" and the second access > > is "iPod Safari"... > > > xxx.xxx.xxx.xxx - - [14/Oct/2007:04:10:53 +0800] "GET /ipod/stream.php > > HTTP/1.1" 200 16384 "-" "Apple iPhone v1.1.1 CoreMedia v1.0.0.3A110a" > > xxx.xxx.xxx.xxx- - [14/Oct/2007:04:10:52 +0800] "GET /ipod/stream.php > > HTTP/1.1" 200 270336 "-" "Mozilla/5.0 (iPod; U; CPU like Mac OS X; ja- > > jp) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A110a > > Safari/419.3" > > > The amount of data logged in access log is not the same of the file. > > Seems it stopped to transfer data suddenly. > > > I have also tried to change the reading method from fread() to > > readfile(), so that the file will not transfer in segment. Now the > > amount of data logged in the access log is same as the mp4 file size, > > but iPod touch still cannot playback the file. The access log is like > > this : > > > xxx.xxx.xxx.xxx- - [14/Oct/2007:04:24:17 +0800] "GET /ipod/stream.php > > HTTP/1.1" 200 5027707 "-" "Apple iPhone v1.1.1 CoreMedia > > v1.0.0.3A110a" > > xxx.xxx.xxx.xxx- - [14/Oct/2007:04:24:17 +0800] "GET /ipod/stream.php > > HTTP/1.1" 200 5027707 "-" "Mozilla/5.0 (iPod; U; CPU like Mac OS X; > > ja- > > jp) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A110a > > Safari/419.3" > > > Hope anyone can help me. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to iphonewebdev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~--~~~~--~~--~--~---
streaming video to iPod touch through Safari
Hi all. I am trying to develop a web application like http://vtap.com or Google video which let user to download and playback mp4 file through Safari browser bundled with iPod touch. I can download and playback a mp4 file correctly when I access the movie directly by URL (I put the mp4 file in a public area). But when I try to use a simple file proxy program to read the same file at same location and transmit it to iPod touch, it doesn't playback correctly. Everything goes fine in PC (Firefox). I think it would be a problem in header but I don't know what should I put into. My test program is as below (http://dev.crossmedia.com.hk/ipod/ stream.php): PHP: I have checked access log of my server and found that each time I access the stream.php, ipod touch safari will access the file twice. The user agent of first access is "Apple iPhone" and the second access is "iPod Safari"... xxx.xxx.xxx.xxx - - [14/Oct/2007:04:10:53 +0800] "GET /ipod/stream.php HTTP/1.1" 200 16384 "-" "Apple iPhone v1.1.1 CoreMedia v1.0.0.3A110a" xxx.xxx.xxx.xxx- - [14/Oct/2007:04:10:52 +0800] "GET /ipod/stream.php HTTP/1.1" 200 270336 "-" "Mozilla/5.0 (iPod; U; CPU like Mac OS X; ja- jp) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A110a Safari/419.3" The amount of data logged in access log is not the same of the file. Seems it stopped to transfer data suddenly. I have also tried to change the reading method from fread() to readfile(), so that the file will not transfer in segment. Now the amount of data logged in the access log is same as the mp4 file size, but iPod touch still cannot playback the file. The access log is like this : xxx.xxx.xxx.xxx- - [14/Oct/2007:04:24:17 +0800] "GET /ipod/stream.php HTTP/1.1" 200 5027707 "-" "Apple iPhone v1.1.1 CoreMedia v1.0.0.3A110a" xxx.xxx.xxx.xxx- - [14/Oct/2007:04:24:17 +0800] "GET /ipod/stream.php HTTP/1.1" 200 5027707 "-" "Mozilla/5.0 (iPod; U; CPU like Mac OS X; ja- jp) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A110a Safari/419.3" Hope anyone can help me. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to iphonewebdev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~--~~~~--~~--~--~---
Re: ffmpeg settings for video encoding for iphone?
I was using this cmd to encode movie for download mp4 through safari in iPod touch: ffmpeg -i INPUT -acodec libfaac -ac 2 -ar 44100 -ab 128k -s 320x240 - vcodec libx264 -b 300k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me umh -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 - bt 300k -maxrate 300k -bufsize 300k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 15 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 OUTPUT.mp4;AtomicParsley OUTPUT.mp4 --DeepScan --iPod-uuid 1200 -- overWrite --title "THE MOVIE TITLE"; You have to install AtomicParsley to fix the UUIDatom bug in ffmpeg. It is OK if you download the mp4 file directly through safari, but it doesn't work when I trying to use a PHP proxy script to read and stream the same file to safari, stream.php?file=OUTPUT... I don't know what should I put into the header if I want to stream the mp4 movie to iPod touch like vTap is doing. On Oct 6, 3:17 am, CyberTron <[EMAIL PROTECTED]> wrote: > Wonder if anyone can share what's the 3gp and m4v settings you use for > ffmpeg for encoding the videos to iphone that's suitable to play from > safari? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to iphonewebdev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~--~~~~--~~--~--~---