是否可以根据 google 广告的大小限制制作带有视频的横幅广告?

Is it possible to make a banner ad with a video in it respecting the size limit of for example google ads?

我如何制作带有视频的横幅广告,例如,遵守常见大小限制 (150kB) 的 Animate CC?

我发现您可以使用 Javascript 实现 HTML5 视频?也许是一个动图?欢迎任何教程或指南。

是的,这是可能的。 这是一个非常小的 7K 视频,在 SO 的大小限制内(6.6K 压缩):

<!DOCTYPE html><html>
<meta charset="utf-8"><meta name="ad.size" content="width=320,height=100">
<body>
<script>
setTimeout( function(){
   var v = document.querySelector( '#video' );
   v.removeAttribute('loop'); /* Stop loop after 1 seconds (set below) */
   v.addEventListener('ended', function(){
      v.currentTime = 0.6; /* Rewind to 0.6 sec */
      v.pause(); /* Stop video for IE 11 */
   });
 }, 1000 );
</script>
<video id="video" width="272" height="48" onclick='this.play()' autoplay loop src='data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAFg5tZGF0AAACsAYF//+s3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0OCByMjY2NSBhMDFlMzM5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNiAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTE2IGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDM6MHgxMzMgbWU9dW1oIHN1Ym1lPTEwIHBzeT0xIHBzeV9yZD0xLjAwOjAuMDAgbWl4ZWRfcmVmPTEgbWVfcmFuZ2U9MjQgY2hyb21hX21lPTEgdHJlbGxpcz0yIDh4OGRjdD0xIGNxbT0wIGRlYWR6b25lPTIxLDExIGZhc3RfcHNraXA9MSBjaHJvbWFfcXBfb2Zmc2V0PS0yIHRocmVhZHM9MSBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0Z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AADQAAABQAAAEaAAAAIAAAABQAAAAZAAABAgAAAJEAAAAxAAAAEAAAABMAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTcuMjQuMTAw'>
</body></html>


原来的回答比较否定,但后来我们积累了更多的经验。

首先,GIF 动画很糟糕。 它非常效率低下。 当然,您可以获得 150k,但颜色数量非​​常少,并且有些英勇和有损 compression。 一点都不好看

至于视频,没有明确禁止,而是 HTML5 adsword 广告 may not contain HTML5 视频文件。 但是,可以使用 data uri 或将视频重命名为 .css.

来规避

Google may add video detection in the future - they already detects it if you rename it to an image - but for now video itself is not a reason of rejection.

Another issue is that mobile platforms do not autoplay video. It is simple to make them click-to-play, but you may want to spare some byte budget for the image placeholder.

这就剩下尺寸的主要问题了。

video, the common 格式为 MP4 (H.264)。 从技术上讲,所有视频广告都可以压缩到 150K,使用合适的工具,您只需降低质量,直到达到目标。 唯一的问题是质量是否可以接受。

音频(如果有的话)是较难的部分。 您需要 28kbps 或更低的极端比特率才能不占用太多配额。 对于 Google,音频也必须是用户启动的。 所以你有很多选择自动播放没有音频,或点击播放,或脚本音量 on/off 按钮。


这些是我制作 141K demo ad 所采取的步骤,加上我后来发现的一些增强功能:

  1. Avidemux 打开缩放(右尺寸)但高质量的视频。
  2. 在左侧,将 "Video Output" 设置为 Mpeg4 x264,并将输出格式设置为 "MP4 Muxer"。
    1. 立即尝试保存视频以确保 Avidemux 可以处理源视频。
  3. 单击视频输出正下方的 "Configure" 按钮。
    1. 常规选项卡,将线程设置为 1,然后将质量设置为 32。将编码保留为 "Constant Rate Factor"。
    2. “运动”选项卡,将“运动估计”设置为 "Hadamard Exhaustive Search",将亚像素优化设置为 10。将矢量搜索范围增加到 64。
    3. 分区选项卡,启用所有分区块。
    4. 帧选项卡,设置最大。参考帧至 16,最大。连续 B 帧为 16,B 帧偏差为 20(或更高),自适应 B 帧决策为最佳,GOP 大小最大。到 1000。
    5. Analysis 选项卡,将 Trellis Quantization 设置为 Always On。
    6. 量化器选项卡,将方差 AQ 设置为自动。
    7. 单击“确定”。
  4. 返回主屏幕。打开音频菜单 > Select 音轨。
    1. 禁用(取消选中)所有音轨。点击确定。
  5. 在主屏幕上,单击保存按钮并输入视频的名称。
    1. 检查视频大小。如果不是 150KB 左右,调整质量(步骤 2.1)并再次保存。
    2. 在我的版本 (2.6.12) 中,Frame 选项卡的 B-frame Bias 似乎有问题,每次我更改配置时都会重置。
    3. 视频大小可以略大于150,例如152K压缩后可能变成147K。
    4. 如果它真的超过了一点点,比如 155k,请将 Analysis 的降噪设置为 512 或 1024 以微调大小。
    5. 一旦我们有了完美的视频,convert it 到数据 uri。
  6. 创建 index.html,放入文档类型、<html>meta ad.size<body> 和视频标签。使用数据 uri 作为视频 src。
    1. 添加attributes和脚本来控制视频。在演示中我们将视频设置为自动播放和循环播放,然后在 10 秒后删除循环属性并监听视频结束以倒带。
    2. 请注意,IE 11 将永远循环,直到我们显式调用 .pause()
    3. 在所有主流浏览器中验证文件。文件大小应在 200K 左右。
  7. 使用 7zip,将 index.html 添加到存档:
    1. 存档格式必须是 "zip"。
    2. 将压缩级别设置为 "Ultra"。
    3. 将字大小设置为 256,将 CPU 线程数设置为 1。
    4. 单击“确定”。
  8. 您应该会得到一个 index.zip 比保存的视频小一点的视频,您可以将其作为 HTML5 图片横幅上传到 Google Adwords!

The steps are based on Avidemux 2.6.12's defaults. I can't list every options because there are too many, but since x264 encoder is pretty stable I don't expect the defaults to change.

We also tried Average Bitrate a few times, but CRF consistently yields better result.

The settings trade encoding time for better quality or smaller size. It may not be obvious but single thread increase byte efficiency too. When you only have 153,600 bytes, these little bits helps.

Adjusting B-Frame Bias is not advised in general encoding, but a moderate increase really helps to shave more bytes off.

As of 7-zip 16.02, Deflate is the second best compression algorithm for video - better than bzip, lzma, or ppmd. Deflate64 is marginally better, but is not supported by Google.

要实现视频,您可以使用 html5 视频标签

<video>
<source src="video here" type="video/videotype">
</video>

但并非所有浏览器都支持它。 .gif 应该更容易实现,文件也更小。虽然它不提供像play/pause

这样的视频功能

用视频制作横幅广告 HTML5

HTML5 video tag demo with advertisement, message, information box/dialog on top of the video Play the video and wait till 8 seconds when a popup message/ad box will appear and it would go away at 18 sec!

请参考here, Demo at here

// Get the Video Object
var v=document.getElementById("myvideo");


// Show the Adv Box i.e. the DIV
function show_adv() {
 document.getElementById("my_ad").style.visibility="visible";
}

// Hide the Adv Box i.e. the DIV
function hide_adv() {
 document.getElementById("my_ad").style.visibility="hidden";
}

// Execute this for each second when playing the Video
function catch_the_frame() {
 var t;
 t = Math.round(v.currentTime); // currentTime is float; Make it whole number to check
 document.getElementById("seek_status").innerHTML="Current Time: " + t + " seconds"; // Show the current playing time in seconds
 if ( t >= 8 && t <= 18) { // Target Second when we want to show the message/ad
  show_adv(); // Show the message/ad
 }else {


  hide_adv(); // Show the message/ad
 } 
}

// Hide the video when page loaded
hide_adv();
// Handle the playing event
v.addEventListener('playing', function() {setInterval(catch_the_frame,500);}, false);
#v_area{
    float:left;
    z-index: 99;
}

#my_ad {
 position:absolute;
     width:350px;
 height:150px;
 top: 10;
 left: 10;
 font-family: Arial;
 font-size: 120%;
 background-color:rgba(255,0,0,0.2);
 z-index:100;
 color: #ff0000;
}

#close a {
 position:absolute;
 top: 5;
 left: 520;
 z-index:100;
 font-family: Arial;
 font-size: 40%;
 text-decoration: none;

}
.generic_txt{
 font-family: Droid Sans,sans-serif;
 font-size: 150%;    
 color: #0000ff;
}
.generic_txt_heading a {
    font-family: Droid Sans,sans-serif;
 font-size: 110%;    
 color: #00ff00;
 text-decoration:none;
}

.generic_txt_heading2 {
    font-family: Droid Sans,sans-serif;
 font-size: 100%;    
 color: #0000ff;
 text-decoration:none;
}
<div id="v_area">

 <div id="my_ad" style="visibility: hidden;">
    How are you? I hope you are having a nice day. Cheers! 
    <p>Visit <a href="www.debugpoint.com">www.debugpoint.com</a> for more tutorials!
    </p><div id="close" onclick="this.parentNode.parentNode.removeChild(this.parentNode); return false;">
             <p></p><p><a href="#">[x]</a>
           </p></div>
 </div>
 
 <div>
  <video id="myvideo" controls="">
  <source src="http://video.webmfiles.org/big-buck-bunny_trailer.webm">
  Your browser doesn't support HTML5 video. Try a different browser instead.
  </video>
 </div>

</div>