Video in CommCare

This guide provides details on how to prepare video content for playback, what formatting to use, and how to use video content on the phone, providing links to resources and tools which will be helpful in the process.

Preparing Content - Technical

Most video content is created in a format which isn't broadly compatible with playback on mobile phones both because of the encoding (file format) and the size of the video (in raw bits and in screen resolution), both of which should be corrected when converting the content to be used on a mobile. The first step for preparing a video is to reduce its size.

The proper size for a video file depends on the size of its original content, since it is preferable to maintain the aspect ratio between the width and the height of the frames. In general a good metric is to find the largest screened device you're planning on using, and resizing the video to maintain the same aspect ratio, but to both fit within the size recommendations for Images in CommCare. So a source video with a size of 640x480 for a Nokia C2 would be resized to 225x169. CommCare will automatically resize videos which are too big for the current screen, so it is preferable to size videos to work with the largest screen size.

Tools recommended for preparing video content:

  • VirtualDub - Free tool for editing and modifying video content. NOTE: Resizing content in VideoDub is done using a Resize Filter.

  • CellSea - Free tool for cropping and resizing videos. NOTE: Asks for information from social media accounts. 

Once the video content is the appropriate size, it must be converted to a format which the phone can use for playback.

J2ME/Java Feature phones: The most popular (and widely supported) format for playback on Nokia phones (the only current testbed used for J2ME phones with CommCare) is 3gp.

Android phones: Android systems can support a much broader set of video file types and it is best to test it out. You can use the tools below to make several different file types and then try it out. For a device with a larger screen, a 3gp file may not have sufficient resolution and could appear grainy on a device with a large screen. We have had some luck using mp4. You can also try using different video player apps other than the default one to see if that improves the user experience.
 

Tools recommended for formatting video content:

  • Mobile Media Converter - Free tool for converting video files into common mobile formats. Don't be confused by all of the junk on the download page, just proceed to the bottom Download button.

  • Any Video Converter- Free tool to convert video files into common smartphone formats.  You can choose specific phones/operating systems.

Preparing Content - Design

Below are some general suggestions/guidelines/questions for consideration

Designing videos

  • Stick to videos that are around 2-3 min, maybe 5 min would be the longest. If videos are short then there's more flexibility if a phone user wants go to back to a specific part. without getting stuck in navigation. 

  • Always good to make videos and content thinking about the device and "real estate" screen size. It is recommend to make a test video and then field test it with users before investing in making the rest. 

  • Will the video be a still image with panning and zooming, or full animation? 

  • Pace, speed of voice playback and screen changes. The more quickly a scene changes might be difficult to really see what's going on if its a smaller screen or low literate users. Zooming and slowing down really helps.

Organizing videos in your app:

  • Do your users want display text about the video? Alternatively, they might want to have a title screen in the video itself for better viewability and leave the display text as a (.) period or blank (not sure if that's possible)

  • How should the videos be organized? Embedded within a protocol or checklist, associate videos with logic, or simple chapter lesson type format? For chapter/lesson, would you set them up so its modules (chapters) and forms (lessons) or one video module, with different forms that contain different videos? Or could create one form that has all the videos in there and use a top level question to select the video. 

Using Videos

Once the video files have been converted to a compatible format for the phone, it should be included in the forms and transferred onto the memory card as outlined in Multimedia in CommCare. Multimedia support in CommCare includes video playback in question labels.

Android phones: On Android devices, questions that have video content will have a grey button with a video icon in the upper right-hand corner. Pushing this button will open the phone's default media player, or present a list of installed media players. When the video clip has completed, the user will be returned to the screen from which they launched the video. Depending upon what media player you are using you may also be able to fastforward/rewind the video.

3GP Video Guidelines

Videos in 3GP format can cover a wide range of codecs, data formats, and encoding options. If you are using the Mobile Media Converter tool (or the underlying ffmpeg tool that it uses), here are some parameters which you may find useful when converting (or re-encoding) your videos to a mobile format.

To change these parameters in the MMC, select 3GP Video for your conversion, and set quality to Custom, then click on Advanced...

  • Video Codec: mpeg4

  • Video Size: unchecked box

  • Video FPS: 15

  • Video Bitrate: 260k

These options (assuming your source video is sized reasonably) should output videos which are of roughly the correct quality for CommCare phones, and play with good quality and without stuttering.
If you find that your video stutters try lowering the Video Bitrate. If the video plays smoothly, but the quality is too low, try increasing it.