4 steps to optimize video for the Rich Media Creatives • HandBrake
Learn how you could optimize video files for Rich Media Creatives to avoid problems on mobile devices. What is HandBrake? HandBrake is a free software for Mac, Windows, and Linux...
Filter by Category
Filter by Author
Learn how you could optimize video files for Rich Media Creatives to avoid problems on mobile devices. What is HandBrake? HandBrake is a free software for Mac, Windows, and Linux...
Posted by Wojtek Andrzejczak
Rich Media Creative is an HTML5 creative which contains advanced features like audio or video components. It can also be used for expandable creatives and allows tracking multiple user events.
Posted by Wojtek Andrzejczak
Learn how to improve HTML5 creatives loading performance and avoid common mistakes.
Posted by Wojtek Andrzejczak
Google Web Designer and Adobe Animate CC – Learn how you can prepare HTML5 creatives compatible with Google Studio for Google Marketing Platform campaigns.
Posted by Wojtek Andrzejczak
While preparing HTML5 creatives that contain an embedded video file, we face a few common problems, mostly on mobile devices.
Posted by Wojtek Andrzejczak
While preparing HTML5 creatives that contain an embedded video file, we face a few common problems, mostly on mobile devices.
Contents
Checking creative on iOS/Android devices, we notice that the video wants to play while it works on desktop.
Mobile devices have more strict requirements regarding multimedia then desktop browsers. It is essential to match the video specification for mobile devices. It is recommended to not use video bitrate over 500 kbit/s when the device is using the cellular internet connection, the problem mostly happens on iOS and sometimes also on lower-end Android devices.
Make sure that the video file is transcoded with the specification explained bellow. From my experience, when I see a video file in the creation which has over 1-2MB, it fails to load on most of the iOS devices.
Video specification bellow is recommended by Apple, Android, Google, and IAB as the optimal ones, and it does only cover the case when the video file is directly embedded in the HTML5. It does not cover video specifications for VAST/VPAID in-stream videos, while most of the platforms transcode video by themselves.
For video file will end up being approximately 700 KB per 15 seconds at 500 kbit/s bitrate, but this may vary depending on creative content.
By default, software like Adobe After Effects or HandBrake put default compression values as low as possible to generate as good output video as possible.
Video Codec | H.264 |
Progressive Download Format | When encoding an MP4 for progressive streaming, use the “web-optimized” setting. |
Video Target Bitrate | max. 500 kbit/s |
H.264 Profile/Level | Baseline profile, level 3.0 |
Video Interlacing | Progressive scanning, ie non-interlaced. No intra-field motion (blended frames) or interlacing |
Audio Codec | AAC-LC or HE-AACv1 |
Audio Bitrate | 128-192 kbps for AAC-LC, 64-128 kbps for HE-AACv1 |
Audio Levels | -24 LKFS (+/- 2.0 dB) in the US as per ATSC A/85, -23 LUFS (+/- 1.0) in the EU as per EBU R128 |
If we have the fixed problem described above, and the creative with the video still does not play a video, you might have another problem.
I assume you try to play a video as soon as the creative is loaded by adding autoplay attribute to the video tag or by executing JavaScript native method .play(). Whatever you try to do video will not start to play.
Your video probably contains audio. It is not allowed by Google to autoplay video with a sound. Sound must be muted.
If you don’t need audio, transcode your video again, and remove the audio track. A new generated video file will autoplay without any problems. You can always add a muted attribute to the video tag.
So you need to have audio, but you also need autoplay your video. What you can do is to autoplay your video, with muted attributed, which will disable audio. Then you need to add a custom audio button to on/off audio in the video. It will require a bit of JavaScript coding. There is no other way to go around this problem.
<video muted autoplay playsinline controls="controls" poster="poster_image.jpg">
<source type="video/mp4" src="video.mp4" />
</video>
Let’s take as an example 300×250 HTML5 creative, which has embedded a video file. Everything works fine until you don’t try to open your creative preview on any iOS device in the Safari browser. You will notice that video from the background of your creative opens in the full-screen mode.
iOS/Safari, by default, opens any video media file in the full-screen mode. It is not a bug. It is a feature.
Just add “playsinline” attribute to the video tag. This attribute will inform the Safari browser to play a media file inside of the document area where it was embedded without opening a system full-screen modal window.
<video playsinline controls="controls" poster="poster_image.jpg">
<source type="video/mp4" src="video.mp4" />
</video>
All creatives built with Google Web Designer after March 14, 2019, automatically include the playsinline attribute.
Unfortunately “playsinline” attribute was introduced with iOS 10. To get the same effect, you need to implement iphone-inline-video. The effect will be the same as described above.
Subscribe to receive updates about new articles.
Learn how to improve HTML5 creatives loading performance and avoid common mistakes.
Learn how to build Rich Media Creatives using Google Web Designer, which is fully compatible with the Google CM360 and DV360. What is Rich Media Creative? Rich Media Creative is...
So no 4k videos?
Not exactly, with modern mobile phones and 5G, it is not a problem to run 4K video, you need continuous 10-20Mbit/s transmission rate, low latency. But if you prepare ads to be distributed to all possible devices in all possible places. You need to take the worst-case scenario for your ads to run on as much as many devices in most case scenarios.
Besides, iOS does not provide JavaScript (type “navigator.connection” in Developer Tools console) information if the device is connected to the WiFi or cellular network.
“It is not a bug. It is a feature.”
Exactly 😀
We stumbled over here by a different website and thought I might
check things out. I like what I see so i am just following you.
Look forward to going over your web page again.
Thank you 🙂
Very nice post. I just stumbled upon your blog and wished to say
that I have really enjoyed surfing around your blog posts.
In any case I will be subscribing to your feed and I hope
you write again soon!