Native Video Playback MP4/F4V/FLV

From Director Online Wiki
Jump to: navigation, search

Introduction

Finally we got some video formats natively supported in Director 11.5. Great! We can playback video independent from any video players or frameworks installed on the user's machine, a very welcome new feature. No matter what the end user has installed, we can playback H.264 encoded MP4 and F4V videos and Sorenson Spark or On2 VP6 based FLVs.

This new native video support offers some very cool new possibilities, but also lacks some important features.

Dragging a video on stage and playing it should not be a big problem, so let's focus on "special cases":

Playback of new video formats

With DTS (Direct to screen) deactivated, video playback of these new formats is rather good and allows to "overlay" other sprites on top of the video. Nice! Maybe compose some text on top of video? Or even a short video loop in the background of your application? All this works quite nice as long as the video dimensions stay around SD (standard definition) or smaller. If you try to use HD video (720p or even 1080p), you'll see massive problems with performance and immerdiately think of DTS activated. Sadly you will notice that you won't get huge performance improvements with DTS activated. Processor load remains quite high and the real framerate starts to drop.

Fullscreen Playback

Although real fullscreen playback of video has been on the wishlists and it has already been mentioned by Adobe somewhere ... there is no real fullscreen setting for playback of the new native video formats. Very sad!

Access to the image of a video

After some bad news, here's a pretty neat feature. We have access to the image of video to e.g use it as a texture in Shockwave3D or do some Imaging Lingo. If you have alpha-transparent FLV video (On2 VP6), then this alpha is preserved in the grabbed image object. Awesome!

myImage = member("video").image

Off-stage playback of video

The access to the image of a video directly leads us to another great feature. Maybe you've already wondered why there are playback methods for a video member AND for a video sprite? This is a huge enhancement, imho! Now we can playback video members without them being on stage (no sprite needed). Maybe you don't want the video to be displayed as a sprite on stage, but just want to constantly grab the image of a movie to use it as texture in Shockwave3D? No overhead through a well-hidden video sprite on stage. Very helpful!

member("video").play()

Alpha-Transparency & Video

As of Flash Player 8, Flash includes On2 VP6 codec which supports alpha channels. Director 11.5 has native support of FLV and SWF Flash file types.



One method - a step-by-step process for creating and importing video with an alpha channel using Final Cut Pro and Flash 9 on a Mac


In Final Cut:

  • Set up your shot's alpha channel using whatever key/matte you want - leave a blank channel under it.
  • Render it in the sequence using the Animation codec, best quality Millions + (the + adds the alpha channel).
  • Go to (File/Export) QuickTime conversion.
  • Format: QuickTime Movie - Options - use the Animation codec, best quality Millions + again.
  • Now you have a QT with an alpha channel.


In Flash 9 (Flash 8 required similar steps in the Adobe Flash Media Encoder):

  • Go to Flash/File/Import/Import Video
  • Choose your file - continue
  • Choose "Embed video in SWF and play in timeline" - continue
  • Choose Symbol Type: "Graphic" if you want to play the video in the timeline (handy for animation). The other options are up to you - continue
  • Choose Video and set for the On2 codec with 'Encode alpha channel' selected.
  • Set your Quality - performance vs size.
  • Export as an SWF.
  • Import into Director - voila!

Streaming Video?

Here we'll get to a very problematic issue that has to be mentioned. From Youtube and other video platforms on the web, we are used to get almost immediate playback of video (only a few seconds for buffering) without any streaming servers involved. This way of video playback on the web is called "Progressive Download" or "HTTP Streaming". The possibility to watch video while it's still downloading in the background. Director 11.5 does NOT support this basic feature! Bummer! Instead you need to stream the video via RTMP (Flash Media Server) which most likely will not be an option for most of the Director users. So be prepared to not see much use of the new native video formats in Director 11.5 on the web. RTMP streaming (true video streaming) through Flash Media Server works nice and it's good to have this. But it's not a valid "replacement" for the missing and widely used Progressive Download.