Video streaming working with <video> tag, not with flash player ?

108 views
Skip to first unread message

Mark

unread,
Nov 8, 2010, 10:42:54 AM11/8/10
to Google App Engine
Hi,

I'm doing some work with the blobstore and videos. I've gotten it to
work (was pretty easy) when using the <video> tag, something like:

<video controls>
<source src="url-to-my-blobstore-video" type="video/mp4" />
</video>

Some browsers support the video tag, and my servlet which serves the
videos sees byte ranges specified from the client browser.

Because not all browsers support the <video> tag, I was wondering if
it is wiser to switch to a flash video player instead. When I try
that, the flash player does not present any requested byte range to
the servlet. It seems that the flash player just doesn't support that,
and I was recommended to use progressive download or RTMP - but I
don't know if app engine supports either of those.

Has anyone else got streaming with flash working from the blobstore?
Would be fine going with the <video> tag but not sure if it's really
well supported yet,

Thanks

John McLaughlin

unread,
Nov 8, 2010, 1:00:35 PM11/8/10
to Google App Engine
This site http://camendesign.com/code/video_for_everybody give pretty
much everything you need to know about setting up HTML5 video with
flash fallback, I've been using variations of it serving video from
GAE Blobstore with no problem -- though I personally haven't tested it
beyond Firefox, Chrome, and Safari. IE9 seems to be the HTML5
laggard, but the flash fallback should be OK for that.

One extra annoyance is that to take full advantage of the different
browser capabilities you need to create .ogv, .webm, and .mp4
transcodes of your video. If thats more trouble than you want, you
might skip the HTML5 video and serve everyone Flash. Note that to
serve Flash you also have to serve the "player.swf" file or equivalent
for them as well.

John

Stephen Johnson

unread,
Nov 8, 2010, 1:13:54 PM11/8/10
to google-a...@googlegroups.com
Have you tried using FlowPlayer?


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


Mark

unread,
Nov 8, 2010, 2:18:28 PM11/8/10
to Google App Engine
@John, thanks for the link, I believe I'm using the same techniques I
picked up from another writeup:

http://henriksjokvist.net/archive/2009/2/using-the-html5-video-tag-with-a-flash-fallback

The html5 video tag is working for me, it's just the flash player
isn't. When you are using the flash player, do you see your servlet
get requested for any byte ranges, or any other hints as to what
portion of the blob to fetch? For example, this is what my video get
servlet looks like:

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException
{
String vid = req.getParameter("vid");
try {
Video video =
PMF.get().getPersistenceManager().getObjectById(Video.class, vid);
BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();
ByteRange br = blobstoreService.getByteRange(req);
if (br != null) {
// Works fine with <video> tag.
blobstoreService.serve(video.getBlobKey(), resp);
}
else {
// Flash player never seems to request any data. I can try
forcing some down:
blobstoreService.serve(video.getBlobKey(), new ByteRange(0, 0
+ 1024 * 256), resp);
}
}

So I can force some info down (horrible idea) and I'll at least see a
few frames render in the flash player, but that's the best I can get.
The player won't play any content.

I'll check out the link you posted which seems to do a more thorough
job than what I was referencing. I'm just curious to know if you
really got the flash player pulling or just the <video> tag?

Thanks
> > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>
> > .

John McLaughlin

unread,
Nov 8, 2010, 7:38:05 PM11/8/10
to Google App Engine
AFAIK "player.swf" just takes a file link. It doesn't ask for byte
ranges. This on the edge of my knowledge of Flash though, I haven't
done any work with live video streaming, and I'm working from the
Python API.

I just double checked and IE8 indeed falls through to the Flash player
for my examples. If you send me your email address I can give you a
link to a simple example page.

John
johnmcl...@massanimation.com


On Nov 8, 11:18 am, Mark <mar...@gmail.com> wrote:
> @John, thanks for the link, I believe I'm using the same techniques I
> picked up from another writeup:
>
>  http://henriksjokvist.net/archive/2009/2/using-the-html5-video-tag-wi...
Reply all
Reply to author
Forward
0 new messages