3

First let me begin that I understand this protocol is mostly closed-source and Apple proprietary. Legal ramifications aside, I'd still like some help.

Title: AirPlay streaming to HTML video player.

What I'd like to do is stream an AirPlay MOV file to an HTML video player (possibly flash) player.

I have already built the AirPlay server using Node JS, with AppJS as my Window (webkit) container, and have photos being displayed properly. MDNS is already done. Airplay client and server communicating and switching protocols properly, etc. This is not an issue with the video either. Protocol part is finished.

I can also fetch the video file from the airplay client, then when the file is finished I can play that file via VLC, Quicktime, etc. What i'm looking for now is a progressive download of a type that can play the video (sort of streaming) as the data comes in.

NOTE: I can NOT play the file via VLC WHILE it's still downloading. Could be an issue that I mention in the following.

I have tried to open the video file (link via airplay client) with VLC while the download is in progress but no-go. It could be that the MOV file information is at the end of the file. If this is the case, how does AppleTV and such play video on the fly without having to download it first?

Up until this point I have been using the following link for the protocol documentation but it seems that parts are outdated and the video section doesn't say how to retrieve the video file.

AirPlay Protocol: http://nto.github.io/AirPlay.html#video

Flowplayer was a brilliant idea at first until I found out it does not support the MOV file type. Also, another question - is MOV an actual video file type or is it a container?

Onto the question: Is there a flash based player that can play MOV files from a stream without having to download the full file? The file information MAY be at the end of the file as well, I am not sure.

Update: So it seems that I've found a little more information about the AirPlay protocol.
From this website: https://github.com/unused/airstream

The airplay protocol can basically play videos in mpeg-4 (mp4, mov, ts, m4v) format that are accessible via http.

I may just reverse engineer the client part from that project and see if I can get a working server implementation going.
However looking at a section from another website: http://diveintohtml5.info/video.html

says this:

MPEG 4, usually with an .mp4 or .m4v extension. The MPEG 4 container is based on Apple’s older QuickTime container (.mov). Movie trailers on Apple’s website still use the older QuickTime container, but movies that you rent from iTunes are delivered in an MPEG 4 container.

Levi Roberts
  • 1,277
  • 3
  • 22
  • 44
  • 1
    MOV is indeed a container with many possible codecs. Adobe Flash does support MOV, so it's strange any player doesn't. – gluxon Apr 18 '13 at 04:39
  • I would think the better solution would be to have the client instruct the AirPlay server to load the video itself, and pause loading on the client. As an aside - I'm working to implement AirPlay server myself with node.js, have you made your implementation open source somewhere? Much appreciated. – Andrew Theis Oct 06 '13 at 19:27
  • If I can remember correctly the AirPlay client sends the server a direct link to the file. My problem is that the file must finish downloading on the server before it can be played due to the container information being at the end of the file. I do not know how Apple gets around this issue. The pausing and playback is client controlled but rendered on the server. – Levi Roberts Oct 07 '13 at 02:27
  • Continued: As for the open source - Now that I think about it, I haven't. I have made quite a few additions to the AirPlay protocol though. For example, the protocol now allows desktop clients to send webpages to other AirPlay receivers (clients / servers). I am calling the new protocol AirFree. I am also working on a way to send just one html section to the client. For example, a flash container. I will let you know as soon as I publish it on GitHub. – Levi Roberts Oct 07 '13 at 02:28

0 Answers0