3 mistakes in HTML5 creatives • embedded video
While preparing HTML5 creatives that contain an embedded video file, we face a few common problems, mostly on mobile devices.
Filter by Category
Filter by Author
While preparing HTML5 creatives that contain an embedded video file, we face a few common problems, mostly on mobile devices.
Posted by Wojtek Andrzejczak
The discrepancy between delivered impressions is the most common any annoying campaign reporting problem. Let's discuss this problem from the agency and publisher's point of view.
Posted by Wojtek Andrzejczak
Google Analytics doesn’t track your Google Marketing Platform campaign traffic correctly if your traffic is identified as DFA/CPM.
Posted by Wojtek Andrzejczak
Google Campaign Manager for all new accounts sets the default time zone as New Your -5/-4h. If affects all start and end dates in all our campaigns.
Posted by Wojtek Andrzejczak
Update your server configuration with Certbot / Letscrypt snippets for your Nginx server. Automate SSL certificate challenges by including simple snippets.
Posted by Wojtek Andrzejczak
If your website is slow, and it takes a few seconds to load a single page event. It could indicate MySQL or Mongo DB database problem with your configuration.
Posted by Wojtek Andrzejczak
When you use Firebase Project you also create Google Cloud Console Project for all platforms. Generated API keys require a security audit to avoid problems.
Posted by Wojtek Andrzejczak
Caching resources of our application or website is very important. We want to deliver content to the user in the shortest possible time.
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.
Google Web Designer and Adobe Animate CC – Learn how you can prepare HTML5 creatives compatible with Google Studio for Google Marketing Platform campaigns.
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!