Embedding Video In a Site For iPhone/iPod?
Russ writes "Our corporate media delivery platform is in the process of being refactored (at long, long last), and one of the preferred requirements is the ability to serve streaming video to iPhone and iPod Touch devices, similar to the way YouTube does it — show a screen shot, and when the user taps it, the video should play full-screen and landscaped automatically. The problem comes from the severe lack of documentation Apple provides on how, precisely, this can be done. From what I can tell, YouTube still fires a Flash object to the iPhone despite its lack of Flash support. I have, to a certain extent, been able to review some of YouTube's Flash code and get a hack working on our platform (no screenshot, not landscape, but does play automatically), but I'm sure I'm missing a 'trick of the trade' somewhere that makes the process transparent to the user. Has anyone out there done this before, and if so, how? The standard (and non-standard) Quicktime object/embed codes seem to only provide partial functionality on the iPhone/iPod."
Since when is Slashdot's front page USENET's macromedia.flash.actionscript?
You just got troll'd!
Seriously, there are entire web sites dedicated to web programming discussions of this sort.
All you need is a direct link to an Apple-compatible MPEG4 video with the correct mediatype on a server that supports the Range HTTP header. The iPhone/iPod's player will automatically start and allow seeking in the video.
We've been using this technique for a commercial IPTV service for about a year already.
This is because all the followers of The Church of Steve Jobs are promoting anything iphone/apple on firehose.
to ask the source:
https://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/chapter_9_section_1.html#//apple_ref/doc/uid/TP40006514-SW1
requires a login, etc but if your going to develop for an iphone you might as well save yourself some headbashing and sign up.
anyone want to tell me how I can duplicate redtube (NSFW in a million years) video thumbnails?
They are rather excellent, and I aussume automated.....
every day http://en.wikipedia.org/wiki/Special:Random
It might be the html5 video tag which is at work in the iphone...
http://developer.apple.com/safari/mobile.php
It's worth signing up for a free account, even if it's only to access Mobile Safari's documentation.
No idea whether Safari on the iPhone already supports the video tag, but it sure is open, cross-platform and simple.
You can get a free player that you can embed your video into your site and play in flash - yet still works with the iPhone - http://tools.wizzard.tv/ All you need is an RSS feed to make it work. http://tii.libsyn.com/index.php?post_id=407161 Here is a link you check from your iphone to see how it works - Scroll down to see the video. Rob W Host - Today in iPhone Podcast
You can point your non-iphone browser there to get a sense of how its done.
They've done a splendid job of letting people stream video directly from their site to the iphone simply by having every video on their site converted to Iphone-compatible quicktime (mp4) format. The video quality is even quite a step up from what youtube offers on the iphone.
Not quite sure what exactly you are trying to do ... but lets say that your problem is you have embedded flash w/ video and you need iphone/itouch users to be able to access this video too ...
first thing you will want to do is to do a browser check for 'iPhone' or 'iPod'. You can do this in JS but I prefer to check server side.
JS would be
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { code for qt } else { code for flash }
PHP would be
if(eregi('iPhone', $_SERVER['HTTP_USER_AGENT']) || eregi('iPod', $_SERVER['HTTP_USER_AGENT'])) { code for qt } else { code for flash }
Next you will want to export your video using quick time pro and the "Export for web command" this will compress all versions for the iphone and ipod touch and a poster screen for the end user to click on.
Details are always nice... (Yes, there are far more options available!)
From mplayer:
mplayer -ss 60 -vo jpeg foo.mpg
Where:
-ss 60 starts 60 seconds into the video stream.
-vo jpeg outputs each frame as a jpeg image with the name 00000000.jpg.
Pick a bunch of winners... Motion blur can be a problem!
From ImageMagick:
convert -delay 10 -loop 0 000000{01,17,23,34,97}.jpg animated.gif
Where:
-delay 10 gives one frame every (10/100) or 0.1 seconds.
-loop 0 makes it repeat endlessly.
000000{01,17,23,34,97}.jpg are the source images.
animated.gif is the output file.
You may also want to use -geometry for resizing (making thumbnails). And perhaps -crop.
The problem comes from the severe lack of documentation Apple provides on how, precisely, this can be done.
Given the number of different links to apple.com web pages already provided in this thread, I'd say the real problem is someone doesn't want to do any reading.
#DeleteChrome
You should be using SWFObject.. it should work with your iphone if it is the latest updated version.
SCIREV.NET - fanfics,reviews & more
Pick a bunch of winners... Motion blur can be a problem!
File size is a decent heuristic here. A frame with a lot of motion blur won't have higher frequencies, and so with a fixed-quantization encode like JPEG, it'll be a smaller file size.
The biggest files will correlate with the frames with the most detail, mathematically.
Now, that's not saying that it wouldn't be a tight shot of a screen window, but it's a start :).
My video compression blog
Stop contributing to the Apple monopoly. You aren't helping matters when you support it. We consumers end up with less choice and more problems. The iPhone, the iPod, all crap lock-in and not even real "platforms" despite people acting like it is something you can develop for.
Streaming QuickTime has been a continual subject of discussion on the QuickTime Streaming Server listserv. Note that I am not referring to progressive download QT, I'm talking about RSTP streaming. Services like YouTube have the ability to detect the maximum bandwidth of the receiving device and deliver a stream encoded for that bitrate. In YouTube's case, they have a custom app that detects whether you're on EDGE or WiFi and delivers a progressive streaming file of higher or lower quality. I have been dissatisfied with the YouTube service, it seems to always stream poorly. And you have to wait and wait for enough of the file to load before it will start playing. Usually my iPhone (even on WiFi) goes to sleep and shuts off long before I can start watching, which aborts the download.
What the QTSS listserv people are all begging for is true RSTP streaming from QuickTime Streaming Server to the iPhone in Mobile Safari, and an API for apps. QTSS detects your device's bandwidth and delivers a true stream with the appropriate bitrate so it can begin playing instantly, and if you drag the playback slider to any point in the file, it begins playing instantly from that point. This would be a huge advantage, but there is a downside. Since the stream is being delivered continuously on demand, you can't deliver higher bandwidth (higher quality) files that would take a while to download. The file's bitrate may be no more than the channel would allow. But us QTSS users think this is an advantage, I would gladly trade off a little quality for instant-on playback. Another advantage is that QTSS can deliver live video from QuickTime Broadcaster, so live TV events can be delivered live.
The upshot of the deal is, Apple has not yet enabled RSTP in the iPhone, so it is not available in apps like Mobile Safari. I personally believe (without any evidence) that this is Apple's attempt to cripple Mobile Safari so as to not antagonize AT&T by overloading their network with streaming video. But there are some apps that have RTSP streaming now, there's an app that streams college radio stations (I forgot the name of the app). I don't know how they got it to work, they must have their own RTSP code, it's not in any current iPhone 2.0 OS API.
I have been telling people for years, if you wanted to start a new TV delivery method, all you'd have to do would be roll out a new line of smartphones with adequate data capacity and live streaming like QTSS. You could start another major network overnight. I've found the quality of TV watching on my iPhone (from my own manually encoded files) to be perfectly fine. But Apple won't enable RTSP on the iPhone... yet. Maybe they have something coming in iPhone OS 3.0, but there hasn't even been a hint of this capacity. Plenty of people are filing the request with the appropriate Apple people, and we get no response whatsoever. Let us hope that no news is good news, and they are not leaking or hinting at anything because they are under an NDA because it's about to roll out.
Hulu still doesn't make it possible to download videos in either flash or hi-def flash. I tried with flashgot and one of the command line tools, but no joy. I took a look at the url used to pull one of the videos and it's a really long url including my zip code and other info. Or it may be the url to pull the intermission advert while playing the video, as all flashgot was able to pull was the advert. I think I used the "properties" menu of firefox to see the available urls.
Is it possible to download the flash videos (especially the hi-def versions) from Hulu? Anything that plays on a computer can theoretically be captured (wireshark?), but can someone provide a couple of working examples if it's easier than a wireshark capture/dump/reassemble?
Good examples to learn from would be the following if possible:
capturing speed and angels in regular def
capturing speed and angels in hi-def
capturing hill street blues episode in regular def
capturing the same hill street blues episode in hi-def
example commands or example procedures for capturing the same video in both hi-def and regular-def would help us by providing example command lines or app/procedures by showing differences in flags or slight variations in procedures. And examples for capturing two different videos would really help. And, examples to avoid recordings of commercials, or stripping them in real time would be a bonus! Or something to look forward to for the future.
Thanks for any help provided!
Seriously the standard of developers these days seems to have plummeted. If you want to provision for a device go and get the manual for that device, find out that H264 is what you need for the iPhone and that YouTube most certainly does NOT stream flash to iPhones.
I'm going to put my grumpy old bloke hat on here, but its the same hat I wore when I was 25 and someone asked me how to run Windows apps on an IBM RS6000. That person's excuse was that they just "thought it would work" which was a woeful statement from someone who had a degree in IT. This AskSlashdot is at the same level in that the question boldly states something that ISN'T TRUE (YouTube stream flash) and thinks there is some magic secret.
There is no magic secret, there is something that shouldn't be considered a secret at all. That thing is called RESEARCH, hell I'm not even asking you to hit the books in a library but just Google YouTube iPhone to find a FREE converter that talks about the video differences or YouTube iPhone video codec. It really is trivial. And if you can't do that then have a thought about just giving up and using Google Apps Premier Edition for your business and using the commercial version of YouTube that it supplies.
An Eye for an Eye will make the whole world blind - Gandhi
Thanks to those that took a moment for a constructive answer! Turns out that using the embed/object parameters slightly differently solves both the thumbnail and auto-orientation issues.
The bad thing is that the video object (at least using Quicktime - iPhone Safari doesn't support the HTML5 video tag yet) can't be scripted via Javascript.
The ADC has absolutely no mention of scripting the iPhone video object via Javascript - it doesn't say it can't be done, but the object doesn't fire any events that I can find either.
We use JS to handle tracking - we need to know how much of the video the user watched, if they muted it extensively, etc. due to the credit requirements of one of our clients. We'd love to deliver an iPhone-capable version of the site, but without scripting capability it won't happen.
So the bonus question to this post is does anyone have (or has anyone found) information regarding scripting the iPhone 2.x video object from a web page using Javascript?
Dammit, I meant to post that anonymously!
Some of iPhone's competition supports Flash in the browser. Look it up.
Flash Lite != Flash. Look it up.
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)
Seriously the standard of developers these days seems to have plummeted.
Many of the "questions" and "articles" on slashdot are astroturf designed to get people talking about a particular product. They spam the slashdot editors until something gets through.
Some of the "respondents" are knowledgeable because they were expecting the "question" and have lots of propaganda lined up to direct the "discussion". Some use sock puppets to mod up the propaganda.
The questions are naive because they want to make it easy to read and to make the readers think they're smart, even if they're not. Standard marketing technique. Plus marketers specialize in people manipulation and not actual technical ability and they don't want to spend too much time on each spam so their questions tend to be superficial.
Most people seriously underestimate just how much marketing lowlifes have invaded social networking sites. Scum the lot of them. They should be in jail for fraud.
---
Marketing talk is not just cheap, it has negative value. Free speech can be compromised just as much by too much noise as too little signal.
It's really easy.
just create an iPhone compatible video file that actually plays on the iPhone when transfered through iTunes (as a test). If this works, just upload it to a web-server and link directly to the MP4 file.
This will stream on iPhone and iPod Touch, no need to make any "atom" changes whatsoever. You can even type the url to the actual file in safari, and it will play automatically. To make them stream on quicktime on PC/Mac, you do have to use something like atomic parsely to make the streaming work, but for iPhone/Touch this is not needed. for PC/Mac, also the content type needs to be set, but for iPhone this is also not needed.
As a bonus, you can actually use the position slider on the iphone as well.
So in your scenario, just place the screenshot, and link it directly to the movie file, no need to "embed" stuff.
Well in all honesty, you know what they say about common sense? That it is the rarest commodity on the planet
Hypnosis Melbourne
Ever heard of skyfire? Technically it's a horrible hack, but it does work fairly well for a lot of things, and it does allow full flash support in a mobile phone browser.
sig? uhh, umm, ok
Ever heard of skyfire?
Yes, but I haven't heard anybody say it's good yet. 10fps on Youtube? Pftbtb.
Of course, I'd be happy to be corrected when it finally is ready for prime-time.
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)
How about simply adding an image with a href that points to embedded media residing in a webserver? Never tried this though...