8

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

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

4

3 回答 3

8

是的,有可能。这是一个非常小的 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//+s3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0OCByMjY2NSBhMDFlMzM5IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNiAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTE2IGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDM6MHgxMzMgbWU9dW1oIHN1Ym1lPTEwIHBzeT0xIHBzeV9yZD0xLjAwOjAuMDAgbWl4ZWRfcmVmPTEgbWVfcmFuZ2U9MjQgY2hyb21hX21lPTEgdHJlbGxpcz0yIDh4OGRjdD0xIGNxbT0wIGRlYWR6b25lPTIxLDExIGZhc3RfcHNraXA9MSBjaHJvbWFfcXBfb2Zmc2V0PS0yIHRocmVhZHM9MSBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc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AAAEAAAABMAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTcuMjQuMTAw'>
</body></html>


最初的答案是否定的,但我们从那以后获得了更多的经验。

首先,动画 GIF 很糟糕。这是非常低效的。当然,您可以获得 150k,但颜色数量非​​常少,并且有一些英雄和有损压缩。一点都不漂亮。

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

谷歌可能会在未来添加视频检测功能——如果你将其重命名为图像,他们已经检测到它——但目前视频本身并不是拒绝的原因。

另一个问题是移动平台不会自动播放视频。让它们点击播放很简单,但您可能希望为图像占位符节省一些字节预算。

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

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

音频,如果有的话,是更难的部分。您需要 28kbps 或更低的极端比特率,以免占用太多配额。对于 Google,音频还必须是用户发起的。因此,您可以选择在没有音频的情况下自动播放,或单击播放,或编写音量开/关按钮。


这些是我制作 141K演示广告所采取的步骤,以及我后来发现的一些增强功能:

  1. 使用Avidemux打开缩放(正确尺寸)但高质量的视频。
  2. 在左侧,将“视频输出”设置为 Mpeg4 x264,并将输出格式设置为“MP4 Muxer”。
    1. 现在尝试保存视频以确保 Avidemux 可以处理源视频。
  3. 单击视频输出正下方的“配置”按钮。
    1. 常规选项卡,将线程设置为 1,然后将质量设置为 32。将编码保留为“恒定速率因子”。
    2. Motion 选项卡,将 Motion Estimation 设置为“Hadamard Exhaustive Search”,将 Subpixel Refinement 设置为 10。将 Vector Search Range 增加到 64。
    3. 分区选项卡,启用所有分区块。
    4. 框架选项卡,设置最大。最大参考帧数为 16。连续 B 帧到 16,B 帧偏置到 20(或更高),自适应 B 帧决策到最佳,以及 GOP 大小最大。到 1000。
    5. 分析选项卡,将格状量化设置为始终打开。
    6. Quantiser 选项卡,将 Variance AQ 设置为 Auto。
    7. 单击确定。
  4. 返回主屏幕。打开音频菜单 > 选择曲目。
    1. 禁用(取消选中)所有音轨。单击确定。
  5. 在主屏幕上,单击保存按钮并输入视频名称。
    1. 检查视频大小。如果不在 150KB 左右,请调整质量(步骤 2.1)并再次保存。
    2. 在我的版本(2.6.12)中,Frame 选项卡的 B-frame Bias 似乎有问题,并且每次我更改配置时都会重置。
    3. 视频大小可以略高于 150,例如 152K 压缩后可能变为 147K。
    4. 如果它真的超过了一点点,比如 155k,请将 Analysis 的 Noise Reduction 设置为 512 或 1024 以微调大小。
    5. 一旦我们有了完美的视频,将其转换为数据 uri。
  6. 创建 index.html,放入 doctype、<html>meta ad.size<body>和 video 标签。使用数据 uri 作为视频 src。
    1. 添加属性和脚本来控制视频。在演示中我们将视频设置为自动播放和循环播放,然后在 10 秒后移除循环属性并监听视频结束来倒带。
    2. 请注意,IE 11 将永远循环,直到我们明确调用.pause().
    3. 在所有主要浏览器中验证文件。文件大小应在 200K 左右。
  7. 使用7zip,将 index.html 添加到存档:
    1. 存档格式必须是“zip”。
    2. 将压缩级别设置为“超”。
    3. 将字大小设置为 256,将 CPU 线程设置为 1。
    4. 单击确定。
  8. 您应该得到一个比保存的视频小一点的 index.zip,并且您可以将其作为 HTML5 图像横幅上传到 Google Adwords!

这些步骤基于 Avidemux 2.6.12 的默认设置。由于选项太多,我无法列出所有选项,但由于 x264 编码器非常稳定,我不希望默认值发生变化。

我们也尝试了几次平均比特率,但 CRF 始终产生更好的结果。

这些设置以编码时间换取更好的质量或更小的尺寸。这可能并不明显,但单线程也提高了字节效率。当您只有 153,600 字节时,这些小比特会有所帮助。

在一般编码中不建议调整 B-Frame Bias,但适度增加确实有助于减少更多字节。

从 7-zip 16.02 开始,Deflate 是第二好的视频压缩算法 - 优于 bzip、lzma 或 ppmd。Deflate64 稍微好一点,但不受 Google 支持。

于 2016-07-04T04:27:04.657 回答
1

使用视频 HTML5 制作横幅广告

视频顶部带有广告、消息、信息框/对话框的 HTML5 视频标签演示 播放视频并等待 8 秒,此时会出现一个弹出消息/广告框,它会在 18 秒后消失!

请参考这里,演示在这里

// 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>

于 2016-07-08T03:15:04.230 回答
0

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

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

但并非所有浏览器都支持它。.gif 应该更容易实现,文件也更小。虽然它不提供播放/暂停等视频功能

于 2016-07-07T11:06:56.530 回答