Members Only

InStep: Creating Video Controls

This article appeared in Issue 76 of InDesign Magazine.

Adding video and audio controls in InDesign offers unique options when exporting to interactive formats.

Too often, designers get pigeonholed into thinking about InDesign as a print-only application. But if the most recent releases of InDesign have taught us anything, it’s that InDesign is capable of far more than that. With its ability to output to digital publishing formats such as interactive PDF, EPUB, and DPS, we have more publishing options than ever before. And with those options come opportunities for including all sorts of fun modern gadgets that Mr. Gutenberg himself never dreamed of! Video and audio controls are just a few of the interactive features that you can add in InDesign, but they’re arguably the ones that can have the most impact, as well as the most support across the different interactive formats.

For this article, we’ll be outputting to the Fixed Layout EPUB format (FXL). FXL offers some powerful features and good compatibility across supported devices and EPUB readers including Kobo, iBooks for iOS and Mac, and Readium for Chrome.

1. Optimize the video

Begin with the video that you’d like to use in your project. You’ll likely want to optimize it. One way to do this is to use Adobe Media Encoder. Part of a Creative Cloud subscription, this application lets you optimize an existing video file for a specific resolution and file format.

The easiest way to use Media Encoder is to select one of the many presets available in the Queue panel. For my example, I chose Web 1280×720, 16×9, with a frame rate of 3500kbps.

If you don’t have a Creative Cloud subscription, there are other applications you can use to optimize your video. One that I like is a product called HandBrake. Available for both Mac and Windows, HandBrake is a free application with excellent options for optimizing video content to specific formats and resolutions.

InDesign supports many video formats, including .mp4, .mov, .avi, .mpeg, .f4v, and .flv. But for maximum compatibility and quality, it is recommended that you use a video format encoded with the H.264 codec such as the .mp4 format. InDesign also supports the .mp3 format for audio.

2. Place audio/video into the InDesign document

Place the video file into the InDesign document. You can do this via File > Place, Adobe Bridge, or the Mini Bridge panel in InDesign.

Audio won’t appear visually in the exported document, so positioning, cropping, and scaling of the placed file aren’t very important. Video does appear in the exported document, so position it where you want it to appear in the layout.

InDesign will allow you to crop video, but this cropping is not supported in exported formats (the full video will always appear in the final exported file). Scaling applied to a video in InDesign will be reproduced in the exported file, but for best quality, you should optimize the video to the size that you need with Media Encoder or HandBrake prior to placing the file into InDesign.

3. Set media options

With an audio or video file selected, you can set options for how those files will play by opening the Media panel (Window > Interactive > Media). The Media panel allows you to preview placed audio or video files within InDesign by clicking the Play button or by manually dragging the playhead. You can use Options checkboxes to set the video to play when the page loads and loop the audio/video file. Just keep the user experience in mind when considering these options. You can also use the Media panel to choose a poster (the static image the user sees before the video starts playing). The skins you can choose from the Controller menu only apply when exported to the Flash format; they don’t have any effect when exporting to FXL and PDF.

You can also add navigation points at the bottom of the Media panel that will allow you to jump to specific sections of the video. To do this, drag the playhead to the desired point in the video, and click the + sign at the bottom of the panel. Give the navigation point a descriptive name, and then press Enter or Return. In this example, I’ve added four navigation points for key areas of the video that I’d like to provide easy access to.

4. Mask the video

Video doesn’t have to be simply dropped inside of a document. You can have a lot of fun integrating it visually into the context of the layout. In my example, I’d like the video to play in the screen area of a television image because that’s the visual effect that I’m going for.

I could just as easily use an image of an iPad, smartphone, tablet, or anything else. To make this happen, I obtained an image of a television and cut a path for the screen area of the television in Photoshop.

I then placed the television image in InDesign on top of the video. Next, I chose Object > Clipping Path > Options, selected the Photoshop path that I created, and clicked the Invert checkbox so that the area within the path would reveal the video.

This technique works just fine when the document is exported to an .FXL file, but in an exported PDF, the video will play on top of the placed image. An easy fix for this is to convert the image of the TV (or whatever image you are using) to a button by opening the Buttons and Forms panel (Window > Interactive > Buttons and Forms), selecting the image, and clicking Convert to Button at the bottom of the panel. By converting the image to a button, it also becomes an interactive object and will mask the video underneath.

5. Add a Play button

Now you have the ability to add buttons that will control the playback of the video/audio in your document. In this example, I’ve placed an image of a remote control as a visual element that will contain invisible buttons placed on top of the actual buttons of the remote control. You could also create your own visual buttons using a placed graphic or an object drawn directly within InDesign.

Using one of the Rectangle or Ellipse tools, draw a frame on top of the Play button of the remote control image. Make sure the stroke and fill are set to None. I like to make the interactive button a little bigger than the actual button to provide a larger hit area for the user when they are trying to click or tap the button. Again, you could use an image or graphic of your choice for the button, or you could draw your own shape.

With the shape selected, open the Buttons and Forms panel, and choose Button from the Type drop-down menu or click the Convert to Button button (I never get tired of saying that) at the bottom of the panel. I like to give the button an appropriate name. It doesn’t have much effect when exporting to PDF or FXL, but it does have an impact when trying to capture analytics in a DPS app, and you can use these same techniques to control video when building DPS folios. Leave the Event set to On Release or Tap.

Click the + sign in the Actions section, and choose Video from the drop-down menu. If you were creating a button to control audio, you would choose Sound from the drop-down menu. In the Video drop-down menu, choose the video file that you want this button to control (in case you have more than one video on the page), and choose Play from the Options drop-down menu so this button will play the video when it is clicked or tapped.

In the PDF Options section at the bottom of the panel, you can provide a description for the button (useful for accessibility purposes), and you can choose whether the button will print or not.

6. Preview the video

Click the  button at the bottom of the Buttons and Forms panel to preview your page in the EPUB Interactivity Preview panel. Hover your mouse over the Play button you created, and click to start playing the video. You’ll notice that the video begins to play, but there’s currently no way to stop the video. Pressing the Play button simply restarts the video from the beginning. So let’s address that problem next.

7. Add a Stop button

Draw a shape around the Stop button that will become the interactive button that will stop the video. Convert it to a button, and add another video action to the button—this time, choose Stop from the Options drop-down menu. Now you have buttons to both play and stop the video in the file.

8. Add a Pause button

A more realistic requirement when watching a video is the ability to pause the video at certain points during playback. Draw a shape around the Pause button of the remote control, and convert the shape to a button. Add the Video action to the button, and choose Pause from the Options drop-down menu.

Preview the document using the EPUB Interactivity Preview panel to see the controls in action. One limitation of the Pause button is that although it allows you to pause the video, it won’t let you resume it. This requires some advanced controls.

9. Add advanced controls

Begin by adding another button directly on top of the pause button, and add the Resume action to this button. Although this will in fact resume the video, you’ll have noticed that because it’s on top of the Pause button, it has made the Pause button inaccessible. To address this, we’ll systematically hide and show certain buttons that will need to be available at various times during playback.

Select the Play button, and open the Buttons and Forms panel. Click the + sign to add another action to the button, and choose Show/Hide Buttons and Forms from the drop-down menu.

Choose which buttons in the document to show and/or hide: In the Visibility section, show the Pause button and hide the Resume button. This makes only the Pause button available when the Play button is pressed. Repeat this for the Pause button, setting it to show the Resume button and hide the Pause button (itself). Do the same thing for the Resume button, but have it show the Pause button and hide the Resume button (itself). This sets the controls so that only the appropriate controls are visible when needed.

10. Adding navigation points

In step 3, we used the Media panel to add some navigation points at key areas in the video. Now we’ll add some buttons that will provide quick access to those navigation points. I’m using the colored buttons at the top of the remote control image to access each of the navigation points that I’ve created. Start by drawing a shape over the first button of the remote control, and convert it to a button. Click the + sign in the Buttons and Forms panel to add an action to the button, and choose Video. Make sure to choose the correct video from the Video drop-down menu, and in the Options drop-down menu, choose Play From Navigation Point. Choose the appropriate navigation point from the Point drop-down menu. Repeat this for the remaining buttons at the top of the remote control image.

11. Wrap up

From here, you can export your file to the format of your choice. Note that there is a bug that can affect the stacking order of buttons in an interactive PDF. You can read about it (and some fixes for the problem) at InDesignSecrets.

Adding video and audio to your digital documents can make them more engaging in ways that can’t be matched in print. And by crafting a few custom controls with images and buttons, you can go even further—as far as your own creativity will take you.

Bookmark
Please login to bookmark Close

Not a member yet?

Get unlimited access to articles and member-only resources with a CreativePro membership.

Become a Member

Comments (2)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...