Here’s another tool for those of you interested in playing video inside of Acrobat.
The standard Video Tool
in Acrobat 9 allows you embed a single video the PDF file or stream it from a URL and allows you to play a video in your PDF file. But what if you wanted to play more than one? What if you wanted to embed a small, low resolution video but provide the option to stream an HD version with the click of a button. Using the default video player, you would need to add separate widgets which may not be the behavior you really want.
The Video Player Plus Widget for Acrobat allows you to…
- Embed multiple videos in the same video widget
- Programmatically switch between the embedded videos and streaming content
- Programmatically switch between embedded player skins
- Programmatically change the skin color and behavior
You can even use the Video Player Plus Widget to replace the default video player that ships with Adobe Acrobat 9.
Using the Video Player Plus:
There are two ways to use the Video Player Plus Widget for Acrobat. You can use the Flash Tool
or you can replace the VideoPlayer.swf that ships with Acrobat 9 and access it though the Video Tool
. There are advantages to each so if you work with video a lot, you’ll probably have use for both methods.
Locating the video skins and replacing the default video player with the Video Player Plus.
Before you can use the Video Player Plus Widget with the Video Tool
you’ll need to replace the default video player that ships with Acrobat 9. This change will affect all users so if you are sharing your machine with others you might want to just use the Flash Tool
method.
Windows:
- Download VideoPlayerPlus.swf
- Locate the VideoPlayer.swf file in the directory below
C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Multimedia Skins\Players
- Copy the existing VideoPlayer.swf to a safe location as a backup.
- Move VideoPlayerPlus.swf into the "Players" directory and rename it to VideoPlayer.swf – just remove the word "Plus".
- Go back to the "Multimedia Skins" directory and copy the skin files to another folder on your computer. You’ll need them for the Flash Tool
method.
Macintosh:
- Download VideoPlayerPlus.swf
- Locate "Adobe Acrobat Pro.app" in your Applications folder
- Show the Package Contents and then navigate to the folder below
Contents/MacOS/Multimedia Skins/Players
- Copy the existing VideoPlayer.swf to a safe location as a backup.
- Move VideoPlayerPlus.swf into the "Players" directory and rename it to VideoPlayer.swf – just remove the word "Plus".
- Go back to the "Multimedia Skins" directory and copy the skin files to another folder on your computer. You’ll need them for the Flash Tool
method.
Using the Video Player Plus with Video Tool 
- Add your video as normal.
Seriously – it’s that easy – but you’ll be able to do a few more things with it. Read the Additional Functionality section below. What you won’t be able to do with this method is embed multiple videos in the same widget. You will be able to direct the source of the video to a stream. One of the examples below illustrates this nicely.
Using the Video Player Plus with Flash Tool 
You’ll want to have all of the video files, the skin files and a poster image ready before you start.
- Open the PDF file and select the Flash Tool
from the Multimedia Task button. - Drag or double-click to select the area on the page where you want the video to appear.
- Check the box for "Show Advanced Options"
- Click "Choose…" to find the "VideoPlayerPlus.swf" file, and then click Open.
- In the "Resources" tab, add at least one skin file and all of the video files that you’d like to embed in this widget. (See figure 1).
- Switch to the "Flash" tab.
- Copy the text under the word Parameters below and paste it into the area for "FlashVars"
- Edit the string so that the name of the video that you want to be the default is the "source". Don’t add any line breaks, this string needs to be interpreted as though it were at the end of a URL. (See figure 2)
Note: If you have spaces in your file name, you’ll need to escape them. You may want to just rename your video files before you embed them, it’s easier and less error prone.
- Edit the string so that the name of your skin file is the "skin"
- Edit the string for the remaining parameters or just use these as the default. They’re pretty self explanatory.
- In the "Launch Settings" tab, you may want to add a "Poster" that will display when the video is deactivated. The Video Tool
creates this for you automatically but with the Flash Tool
you’ll need to do this yourself.
Parameters:
source=VIDEOFILENAME.flv&skin=SKINFILENAME.swf&skinAutoHide=true&skinBackgroundColor=0x7F0000&skinBackgroundAlpha=0.75&volume=1.
Additional Functionality:
The following table lists the ActionScript methods that can be used in the callAS method that are available with the default video player for Acrobat 9.
| multimedia_play() | Play the video or sound clip from the current location. |
| multimedia_pause() | Pause playback of the current media. |
| multimedia_rewind() | Rewind the media clip to the beginning. This method does not pause the clip. |
| multimedia_nextCuePoint() | Move the play head to the next cue (chapter) point. |
| multimedia_prevCuePoint() | Move the play head to the previous (chapter) point. |
| multimedia_seek(time:Number) | Move the play location to an offset of time from the beginning of the media, where time is measured in seconds. |
| multimedia_mute() | Mute the audio of the media. |
| multimedia_volume(volume:Number) | Set the volume level. The volume is a number between 0 and 1 inclusive. A value of 0 mutes the audio, while a volume of 1 sets the volume level to the maximum level. |
The Video Player Plus Widget for Acrobat adds four additional methods.
| multimedia_source(path:String) | Sets a new source file for the video. The video can either be embedded resource or a URL to streaming content. |
| multimedia_skin(path:String) | Sets a new skin file to be used by the player. This should be an embedded resource. |
| multimedia_skinBackgroundColor(color:uint) | Sets a new background color for the player skin in the form of 0xRRGGBB. |
| multimedia_skinAutoHide(state:boolean) | Sets the autohide behavior for the player bar. [true or false] |
Examples:
Two Embedded Videos:
In the example file below I have two videos and one skin file embedded in the Video Player Plus Widget for Acrobat. There are two buttons under the widget that allow you to play either of the videos. The buttons’ mouseUp action contains some simple JavaScript that changes the source of the video and the background color of the skin file. The code for one of the buttons is below. The code for the other button is identical except for the color in line 3 and the filename in line 4. Because I needed to embed more than one video, I used the Flash Tool
method described above.
RMA = this.getAnnotsRichMedia(this.pageNum)[0]
RMA.activated = true;
RMA.callAS("multimedia_skinBackgroundColor", "0x7F0000")
RMA.callAS("multimedia_source", "ThomasBookerWelcome.flv")
RMA.callAS("multimedia_play");
Example with Two Embedded Videos
Low Resolution plus Streaming HD:
In the example file below I have embedded a low resolution video with the goal of keeping the PDF file under 5 megabytes and easily sent around via email. However, I have a high resolution HD version of the video available on a server. If the end user is conected to the internet, they can click the "Play HD" button which runs a JavaScript that redirects the video source to the URL of the HD video; very similar to the code above. The only difference is that the filename is replaced by a URL.




Another problem solved. This is a fabulous tutorial!
Well that’s the amazing Mr Geraci for you
Nice one Joel !
Harry
You mentioned cue points, but I am no loger able to define these for FLV in Acrobat Pro Extended 9.2 (or whatever the latest version is). Is this feature now disabled due to security issues? I know it was possible in 9.0; in the latest versions, the [+] is disabled, and chapter points can only be deleted.
Thanks or the comment, it gives me the opportunity to clarify some things.
Actually, Acrobat cannot add cue points to FLV files. It can only add cue points to other video file types like .mov and .avi as they are being converted to .FLV for embedding in the PDF file.
However, the Adobe Media Encoder can add cue points to FLV. You’ll need to run your original through the encoder though. You can read the specifics at the link below.
http://help.adobe.com/en_US/AdobeMediaEncoder/4.0/WSC039D82B-0C0E-4c53-BEBA-4C6C4B400160.html#WS5b3ccc516d4fbf351e63e3d117f0bcbdad-7ff9
I am hoping you might be able to help me. I am developing a 40+ page PDF that contains nearly 8 hours of video (.flv, 20 videos 8-40min each) My final PDF is 2.8 gigs. The flv’s are encoded at 700kbs.
This document will be distributed via DVD to doctors all over the world many without an internet connection at the moment the receive the DVD. We are requiring Reader 9.3 and are including it on the DVD. The end product will have hundreds of links that will move the user through the document as well as to specific timecodes within the videos.
We are having a couple issues that we’d love to find solutions to. We appreciate any help you can provide!!
1. Videos are taking a long time to load (15-60 seconds) For some of the longer video we can drop down to 400kbs. Will this make them load faster? What do you suggest are the best settings?
2. Is it possible for a “loading” page or indicator to appear while the videos load? How could that be done?
3. Is it possible to have an auto run to check the system for Reader 9.3? …or have the PDF auto run if
3. We’d love to have our project open in full screen mode but in that mode we see a hand with a little down arrow that when clicked advances you to the next page. This can be confusing if the end used mistakenly taps the mouse near but not on a link and they end up at the next page and not where they want to be. Can this be turned off?
4. If full screen mode will not work for us it there a way to at least fit to screen when it opens?
Thank you so much for your help!!!
Sincerely,
tom
Hi Tom
A few more points on video compression.
In terms of the best compression specs …. as Joel says it’s whatever YOU decide is good enough. Video quality is largely subjective .. aside from obvious macroblocking and other ugliness induced by a data rate that is simply too low for the footage.
Consider this; Each video clip, for each target codec (in this case H264), at a certain target pixel size … has a data rate ‘sweet spot’ Below the floor of that sweet spot and your video becomes noticeably degraded, above it and you are adding extra data rate (file size) for no real visible benefit in quality. So your goal is to find the sweet spot for YOUR footage.
So let’s take your pixel size … let’s just say it’s 512 x 288 (16:9 obviously) A common data rate suggested by compression programs might be in the region of 500- 700Kbps. Select some indicative source and run a section of it at say 600Kbps.
I then suggest you drop the data rate by ⅓ and test again. So do your next test at 400Kbps. Check the footage, does it look crappy yet ? If so, go up to 500Kbps and check again. If your 400Kbps clip still looks pretty good you are probably still ABOVE the sweet spot for the video. Drop your data rate to say 250Kbps and encode again.
You may be surprised at how low you can go from the initial suggested settings and still get a video you are happy with. The suggested setting are there to cover ALL types of video folks might load in, but some clips compress much easier than others.
For instance a music video clip will need a higher bit-rate because virtually every frame will feature high motion, lots of colour and fast editing techniques, cuts, swish pans etc.
But a talking head interview usually features a static background (wall of bookshelves) and all that moves is the interview subject. Very efficient to compress because not much changes from scene to scene.
Before we move off video, let me also suggest that even if your video has been SHOT 16:9 (which most are now, as they are HD) Does it NEED to be presented in widescreen ? If the talking head example above is only showing bookshelves left and right of the subject, do you need to encode and present that ? Crop to 4:3, crop to square ! I often crop talking heads at lecterns into 3:4 That is, the video is like a portrait A4 sheet of paper. This also allows you a range of page layout options not otherwise possible.
Also don’t forget the audio ! If your soundtrack is pretty much voice-only and has been well recorded, you may find you are happy with something in the range of 32-56Kbps for the AAC Audio (what Acrobat/H264 uses)
Finally, although it is counterintuitive to non-compressionists … you must always get the highest quality source files you can. you the the SMALLEST high quality files, by ingesting the LARGEST sized source. Highest quality source (say 1920 x 1080) means the most data to play with in analysing the footage for the encoder, plus the higher quality footage will usually have the best signal to noise ratio (SNR) that is a complicated way of saying GIGO (Garbage In, Garbage Out)
My absolute final suggestion on the source is not to let anyone transcode it before you get it. By that I mean find out what it has been EDITED in and get that format. Don’t let them say “Oh I’ll send you a DVD-Video of it if they have edited it in Final Cut Pro using Apple Pro Ress 422 codec. Or if it has been done using a 3rd party codec like Black Magic or such, you can usually download the codec from the vendors website so you can read that source and then compress them to H264 (what Acrobat uses. So ideally you would get a $100 500GB USB drive posted to you with the hi res footage. Heaven !
Good compression tools for this job would be the Adobe Media Encoder which you probably have as part of a CS, but if you don’t get the results you like you can also look at specialist video encoding tools like Sorenson Squeeze and Episode Pro
fwiw
Dean Lafan
These are pretty challenging questions. I’ll do the best I can.
1. Videos are taking a long time to load (15-60 seconds) For some of the longer video we can drop down to 400kbs. Will this make them load faster? What do you suggest are the best settings?
The best settings are whatever you determine they are. Quality is always a balance between file size, video dimension and compression.
2. Is it possible for a “loading” page or indicator to appear while the videos load? How could that be done?
It is possible, just not with either the built in player or the one the Video Player Plus without some improvements. It should be pretty easy for me to modify the code to add a loader indicator. Stay tuned – these are usually weekend projects and I have varying amounts of time to work on them.
3. Is it possible to have an auto run to check the system for Reader 9.3? …or have the PDF auto run if
Yes – some simple JavaScript can detect the version (app.viewerVersion)
3(a). We’d love to have our project open in full screen mode but in that mode we see a hand with a little down arrow that when clicked advances you to the next page. This can be confusing if the end used mistakenly taps the mouse near but not on a link and they end up at the next page and not where they want to be. Can this be turned off?
I don’t recommend going to full screen – instead, you can use the document properties initial view settings to suppress all but the application window title bar and you don’t get the security dialog asking permission. It’s a better user experience even if it’s not as pretty.
4. If full screen mode will not work for us it there a way to at least fit to screen when it opens?
I’m not sure what you mean by that. You mean automatically maximize the Reader window? Then – No. The PDF has no control over how the application runs.
I like the idea to enhance the standard flash player inside a PDF in the way of the Video Player Plus Widget.
Are there any detailed informations how this can be done?
Is there a recommended programming environment?
Are there tutorials to be read?
Any information will be useful for me.
Sincerely
Uwe
The Flash Player in Acrobat is virtually identical to the stand-alone version. You might want to read my article here -> http://blogs.adobe.com/pdfdevjunkie/the_flash_designers_guide_to_a
Hi – can you tell me how I might play videos by default in full screen mode when the poster image is clicked? Can I script this somehow? Currently I have to click the video to play it, then right click it, then choose full screen multimedia.
You can’t – For security reasons, Acrobat and Reader require user interaction to go into full screen mode.
Hi. I am looking for ways to have two videos playing side-by-side and having a master control. That is, I want to be able to start them at the same time or rewind both to some common time in both videos.
I appreciate any pointers.
It’s a really cool idea. You’d need to create the “Master” control and use the JavaScript/ActionScript bridge to send commands to the separate video files.