Skip to main content
July 9, 2010
Question

DRM video playback - HELP PLEASE

  • July 9, 2010
  • 1 reply
  • 1567 views

I have searched and searched and searched online but cant find anything and from what I can Adobe doesnt have any examples, but I am building an AIR desktop video player application and want to be able to play videos with DRM such as bought iTunes movies or dvd/bluray Digital Copy's(if possible, if its not go ahead and tell me please). What I had done so far was something like this.

var netconnection:NetConnection = new NetConnection();

netconnection.connect(null);

var netstream:NetStream = new NetStream(netconnection);

netstream.client = this;//This works

var netoptions:NetStreamPlayOptions = new NetStreamPlayOptions();

netoptions.streamSource = "videoFile.m4v";

netoptions.preloadEmbeddedData(netoptions);

function onMetaData(e:Object):void {

     trace(e);

}

function onDRMContentData(e:Object):void {

     trace(e);

}

Now, with a regular video file, the onMetaData event fires and traces out and works just fine. If I try and play an iTunes bought movie, neither the onMetaData or onDRMContentData events fire and I have no way of knowing what is going on. Any ideas? Any help or examples or telling me what Im doing wrong would be awesome. Thank you.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html?allClasses=1#preloadEmbeddedData()

This topic has been closed for replies.

1 reply

Inspiring
July 10, 2010

I have never dealt with DRM in Flash but onMetaData method is called when, well, there is metadata injected into the video. NOT all the encoders inject metadata - it is not automatic. In other words, there are videos without metadata. My guess is that iTunes videos don't have metadata.

By the way, are you able to play iTune purchased videos in Flash at all?

July 10, 2010

Well, with any other video type I play, onMetaData fires. I was just using that as an example because pretty much every single example you can find of basic video playback that has the onMetaData function, the example creates a customClient variable and sets all that stuff up there, but you dont have to do that if set the client equal to the DisplayObjectContainer housing the Video object. So it would typically be NetStream.client = this;

At the moment I CANT play iTunes content. Im assuming its because all iTunes video have DRM in the file and thats why I am trying to figure out how to get that information working so that I can play iTunes movies.

If I trace out the NetStatus codes, it traces out NetStream.Buffer.Full, which means the video is loaded and begins playback. Immediately after that, it traces out NetStream.Buffer.Closed, which means it closed the stream and cleared the buffer. So it quit the playback as soon as it started it and shutdown the stream.

Im assuming that you can play iTunes movies since its H.264 video with AAC audio, which Flash can play. It is just a matter of getting around the DRM issue, so if any one who has dealt with this shit(yes shit cause at this point its getting frustrating not getting anywhere), any help would be most appreciated.

Here is the meta data btw for what the movie Taken traces out:

tags:

moovposition: 40

trackinfo: [object Object],[object Object],[object Object],[object Object],[object Object]

duration: 5608.8995662329

Inspiring
July 10, 2010

Well, with any other video type I play, onMetaData fires.

Again, because metadata was injected there at the time video was encoded. If there is not metadata - NetStream's onMetaData will not be called.

It is just a matter of getting around the DRM issue, so if any one who
has dealt with this ****(yes **** cause at this point its getting
frustrating not getting anywhere), any help would be most appreciated.

Sorry, but this is THE idea of a good DRM - not being able to get around it. One needs a licence to play a protected video. Otherwise it wouldn't make any sense, would it? You would be able to distribute (resell) the file. Perhaps, the question of how to get around DRM can be answered on some hacker's forum.

By the way, what do the objects in trackinfo contain?