[SCM] handbrake/master: Imported Upstream version 0.10.3+ds1

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Tue Jan 26 00:28:16 UTC 2016


The following commit has been merged in the master branch:
commit 4624c48967f372cc04f3c120db56a33c244600b7
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Tue Jan 26 01:18:53 2016 +0100

    Imported Upstream version 0.10.3+ds1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fda0602
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,26 @@
+# Visual Studio
+win/CS/*/bin
+win/CS/*/obj
+win/CS/*.suo
+
+# Xcode user data
+xcuserdata
+
+# Build system
+build/
+build.*/
+download/
+
+# Gtk autoconf spam
+gtk/Makefile.in*
+gtk/*/Makefile.in*
+gtk/aclocal.m4
+gtk/autom4te.cache
+gtk/compile
+gtk/config.*
+gtk/configure
+gtk/depcomp
+gtk/install-sh
+gtk/ltmain.sh
+gtk/missing
+
diff --git a/NEWS b/NEWS
index 97e054e..0680dce 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 NEWS file for HandBrake <http://handbrake.fr/>
 
+Changes between 0.10.2 and 0.10.3
+
+  - Assorted bug fixes and performance improvements.
+  
+  
 Changes between 0.10.1 and 0.10.2
 
   - Assorted bug fixes and performance improvements.
diff --git a/doc/texi/Building.linux.texi b/doc/texi/Building.linux.texi
index 79da9b7..26d7790 100644
--- a/doc/texi/Building.linux.texi
+++ b/doc/texi/Building.linux.texi
@@ -33,7 +33,7 @@ The @b{GTK UI} introduces some significant extra build requirements. GTK version
 
 Ubuntu 14.04 packages:
 @itemize @bullet
- at item subversion (cli/gui)
+ at item git (cli/gui)
 @item cmake (cli/gui)
 @item yasm (cli/gui)
 @item build-essential (cli/gui)
@@ -66,7 +66,7 @@ Ubuntu 14.04 packages:
 
 To install these packages:
 @example
-sudo apt-get install subversion cmake yasm build-essential autoconf libtool \
+sudo apt-get install git cmake yasm build-essential autoconf libtool \
 zlib1g-dev libbz2-dev libogg-dev libtheora-dev libvorbis-dev \
 libsamplerate-dev libxml2-dev libfribidi-dev libfreetype6-dev \
 libfontconfig1-dev libass-dev libmp3lame-dev libx264-dev intltool \
diff --git a/doc/texi/base/handbrake.texi.m4 b/doc/texi/base/handbrake.texi.m4
index 1367c4d..099e7f7 100644
--- a/doc/texi/base/handbrake.texi.m4
+++ b/doc/texi/base/handbrake.texi.m4
@@ -20,10 +20,10 @@ dnl
 @set HB-version-hex     __HB_version_hex
 @set HB-build           __HB_build
 @set HB-repo-url        __HB_repo_url
- at set HB-repo-root       __HB_repo_root
 @set HB-repo-branch     __HB_repo_branch
- at set HB-repo-uuid       __HB_repo_uuid
+ at set HB-repo-tag        __HB_repo_tag
 @set HB-repo-rev        __HB_repo_rev
+ at set HB-repo-hash       __HB_repo_hash
 @set HB-repo-date       __HB_repo_date
 @set HB-repo-official   __HB_repo_official
 @set HB-repo-type       __HB_repo_type
diff --git a/doc/texi/building/appendix.repo.texi b/doc/texi/building/appendix.repo.texi
index ea7bf2d..59b501e 100644
--- a/doc/texi/building/appendix.repo.texi
+++ b/doc/texi/building/appendix.repo.texi
@@ -1,10 +1,10 @@
 @appendix Project Repository Details
 @example
 url:    @value{HB-repo-url}
-root:   @value{HB-repo-root}
 branch: @value{HB-repo-branch}
-uuid:   @value{HB-repo-uuid}
+tag:    @value{HB-repo-tag}
 rev:    @value{HB-repo-rev}
+hash:   @value{HB-repo-hash}
 date:   @value{HB-repo-date}
 type:   @value{HB-repo-type}
 @end example
diff --git a/doc/texi/building/chapter.via.terminal.texi b/doc/texi/building/chapter.via.terminal.texi
index b5c61eb..b98301b 100644
--- a/doc/texi/building/chapter.via.terminal.texi
+++ b/doc/texi/building/chapter.via.terminal.texi
@@ -62,7 +62,7 @@ Clean-room procedures dictate that when certain factors change, old builds shoul
 
 @itemize
 @item configure with different options
- at item subversion working dir is updated and you want configure to re-evaluate working dir metadata.
+ at item git working dir is updated and you want configure to re-evaluate working dir metadata.
 @item build corruption is suspected
 @end itemize
 
diff --git a/doc/texi/building/command.texi b/doc/texi/building/command.texi
index fedb581..cd97764 100644
--- a/doc/texi/building/command.texi
+++ b/doc/texi/building/command.texi
@@ -1,4 +1,4 @@
 @macro COMMAND-checkout{}
-svn checkout @value{HB-repo-url} @value{HB-acro-lower}- at value{HB-repo-branch}
+git clone @value{HB-repo-url} @value{HB-acro-lower}- at value{HB-repo-branch}
 cd @value{HB-acro-lower}- at value{HB-repo-branch}
 @end macro
diff --git a/doc/texi/building/prerequisites.common.texi b/doc/texi/building/prerequisites.common.texi
index 64c21fd..30b1621 100644
--- a/doc/texi/building/prerequisites.common.texi
+++ b/doc/texi/building/prerequisites.common.texi
@@ -1,7 +1,7 @@
 The following general tools are used on various platforms and it is recommended you use these versions or similar:
 
 @itemize @bullet
- at item subversion - 1.6.16
+ at item git - 2.4.3
 @item python - Python 2.7.1
 @item curl - curl 7.21.4 (or wget)
 @item m4 - GNU M4 1.4.6
diff --git a/gtk/po/LINGUAS b/gtk/po/LINGUAS
index 3602928..2a974b0 100644
--- a/gtk/po/LINGUAS
+++ b/gtk/po/LINGUAS
@@ -13,4 +13,5 @@ pt_BR
 ro_RO
 ru
 th
+zh_CN
 
diff --git a/gtk/po/cs.po b/gtk/po/cs.po
index 1f63fa4..d864a4c 100644
--- a/gtk/po/cs.po
+++ b/gtk/po/cs.po
@@ -428,9 +428,9 @@ msgid "About HandBrake"
 msgstr "O programu HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Autorské právo © 2008 - 2013 John Stebbins\nAutorské právo © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Autorské právo © 2008 - 2016 John Stebbins\nAutorské právo © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/da.po b/gtk/po/da.po
index 75bb197..a9cca73 100644
--- a/gtk/po/da.po
+++ b/gtk/po/da.po
@@ -424,8 +424,8 @@ msgid "About HandBrake"
 msgstr ""
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
 msgstr ""
 
 msgid ""
diff --git a/gtk/po/de.po b/gtk/po/de.po
index 6982b24..934ea8f 100644
--- a/gtk/po/de.po
+++ b/gtk/po/de.po
@@ -425,9 +425,9 @@ msgid "About HandBrake"
 msgstr "Über HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake-Entwickler"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake-Entwickler"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/es.po b/gtk/po/es.po
index d3ca564..2a69329 100644
--- a/gtk/po/es.po
+++ b/gtk/po/es.po
@@ -425,9 +425,9 @@ msgid "About HandBrake"
 msgstr "Acerca de HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/fr.po b/gtk/po/fr.po
index c45bf21..a8b15ea 100644
--- a/gtk/po/fr.po
+++ b/gtk/po/fr.po
@@ -429,9 +429,9 @@ msgid "About HandBrake"
 msgstr "A  propos d'HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/it_IT.po b/gtk/po/it_IT.po
index 3455d80..f04abe5 100644
--- a/gtk/po/it_IT.po
+++ b/gtk/po/it_IT.po
@@ -425,8 +425,8 @@ msgid "About HandBrake"
 msgstr "Info su HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
 msgstr ""
 
 msgid ""
diff --git a/gtk/po/ja_JP.po b/gtk/po/ja_JP.po
index ab4da76..adfc525 100644
--- a/gtk/po/ja_JP.po
+++ b/gtk/po/ja_JP.po
@@ -423,8 +423,8 @@ msgid "About HandBrake"
 msgstr "HandBrake について"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
 msgstr ""
 
 msgid ""
diff --git a/gtk/po/ko.po b/gtk/po/ko.po
index e348155..0a7535f 100644
--- a/gtk/po/ko.po
+++ b/gtk/po/ko.po
@@ -424,9 +424,9 @@ msgid "About HandBrake"
 msgstr "HandBrake 정보"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/no.po b/gtk/po/no.po
index e791f98..fa3963e 100644
--- a/gtk/po/no.po
+++ b/gtk/po/no.po
@@ -424,9 +424,9 @@ msgid "About HandBrake"
 msgstr "Om HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Kopibeskyttet © 2008 - 2013 John Stebbins\nKopibeskyttet © 2004 - 2013 HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Kopibeskyttet © 2008 - 2016 John Stebbins\nKopibeskyttet © 2004 - 2016 HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/pt_BR.po b/gtk/po/pt_BR.po
index 0e58062..65908cf 100644
--- a/gtk/po/pt_BR.po
+++ b/gtk/po/pt_BR.po
@@ -424,9 +424,9 @@ msgid "About HandBrake"
 msgstr "Sobre HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008-2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008-2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/ro_RO.po b/gtk/po/ro_RO.po
index fcf043d..a0d4ae8 100644
--- a/gtk/po/ro_RO.po
+++ b/gtk/po/ro_RO.po
@@ -424,9 +424,9 @@ msgid "About HandBrake"
 msgstr "Despre Handbrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/ru.po b/gtk/po/ru.po
index 55071f7..3ca4ef9 100644
--- a/gtk/po/ru.po
+++ b/gtk/po/ru.po
@@ -426,9 +426,9 @@ msgid "About HandBrake"
 msgstr "О программе"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "Copyright © 2008 - 2016 John Stebbins\nCopyright © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/th.po b/gtk/po/th.po
index 6311827..1869d26 100644
--- a/gtk/po/th.po
+++ b/gtk/po/th.po
@@ -425,9 +425,9 @@ msgid "About HandBrake"
 msgstr "เกี่ยวกับ HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "สงวนลิขสิทธิ์ © 2008 - 2013 John Stebbins\nสงวนลิขสิทธิ์ © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr "สงวนลิขสิทธิ์ © 2008 - 2016 John Stebbins\nสงวนลิขสิทธิ์ © 2004 - 2016, HandBrake Devs"
 
 msgid ""
 "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
diff --git a/gtk/po/es.po b/gtk/po/zh_CN.po
similarity index 69%
copy from gtk/po/es.po
copy to gtk/po/zh_CN.po
index d3ca564..b91d47e 100644
--- a/gtk/po/es.po
+++ b/gtk/po/zh_CN.po
@@ -1,37 +1,40 @@
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-# 
+#
 # Translators:
-# Kevin López Brante <kelopez.cl at gmail.com>, 2014
-# Soleil Rojas <s-rojas01 at hotmail.com>, 2014
+# Translators:
+# helinb <1696060289 at qq.com>, 2015
+# Hu XiaoKe <hot123tea123 at gmail.com>, 2015
+# 玉堂白鹤 <yjwork at qq.com>, 2015
 msgid ""
 msgstr ""
-"Project-Id-Version: HandBrake-0.10\n"
+"Project-Id-Version: Handbrake-0.10.2\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2014-11-03 13:01+0300\n"
-"PO-Revision-Date: 2014-11-28 14:44+0000\n"
-"Last-Translator: VictorR2007 <victorr2007 at yandex.ru>\n"
-"Language-Team: Spanish (http://www.transifex.com/projects/p/handbrake/language/es/)\n"
+"PO-Revision-Date: 2015-09-25 11:08+0800\n"
+"Last-Translator: helinb <1696060289 at qq.com>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/victorr2007/handbrake-0102/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Language: es\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: zh_CN\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.4\n"
 
 msgid "Quality: "
-msgstr "Calidad:"
+msgstr "画质:"
 
 #, c-format
 msgid "Bitrate: %dkbps"
-msgstr "Tasa de bits: %dkbps"
+msgstr "码率: %dkbps"
 
 #, c-format
 msgid "Bitrate: %.4gkbps"
-msgstr "Tasa de bits: %.4gkbps"
+msgstr "码率: %.4gkbps"
 
 msgid "<small>Passthrough</small>"
-msgstr "<small>Pasar a través</small>"
+msgstr "<small>通过</small>"
 
 #, c-format
 msgid ""
@@ -39,44 +42,55 @@ msgid ""
 "Gain: %s\n"
 "DRC: %s\n"
 "Track Name: %s"
-msgstr "%s\nGanancia: %s\nCompresión: %s\nNombre de la pista: %s"
+msgstr ""
+"%s\n"
+"增益: %s\n"
+"动态范围控制 DRC: %s\n"
+"音轨名: %s"
 
 #, c-format
 msgid ""
 "%s\n"
 "Gain: %s\n"
 "DRC: %s"
-msgstr "%s\nGanancia: %s\nCompresión: %s"
+msgstr ""
+"%s\n"
+"增益: %s\n"
+"DRC: %s"
 
 msgid "Add"
-msgstr "Agregar"
+msgstr "添加"
 
 msgid ""
 "Add an audio encoder.\n"
 "Each selected source track will be encoded with all selected encoders."
-msgstr "Agregar un codificador de audio.\nCada pista seleccionada se codificará con todos los codificadores seleccionados."
+msgstr ""
 
 msgid "Set the audio codec to encode this track with."
-msgstr "Elige el códec de audio con el cual codificar esta pista."
+msgstr "设置该轨道的音频编码。"
 
 msgid "Set the bitrate to encode this track with."
-msgstr "Elige la tasa de bits en la que se codificará la pista."
+msgstr "设置该轨道的码率"
 
 msgid ""
 "<b>Audio Quality:</b>\n"
 "For encoders that support it, adjust the quality of the output."
-msgstr "<b>Calidad de Audio:</b>\nPara los codificadores que lo soportan, ajusta la calidad de la salida."
+msgstr ""
+"<b>音质:</b>\n"
+"调节输出视频的音频质量,需要编码器支持。"
 
 msgid "Set the mixdown of the output audio track."
-msgstr "Elige el tipo de mezcla de la pista de salida de audio"
+msgstr "设置输出音轨的混音。"
 
 msgid "Set the sample rate of the output audio track."
-msgstr "Elige la tasa de muestreo de la pista de salida de audio."
+msgstr "设置输出音轨的采样率。"
 
 msgid ""
 "<b>Audio Gain:</b>\n"
 "Adjust the amplification or attenuation of the output audio track."
-msgstr "<b>Ganancia de Audio:</b>\nAjustar la amplificación o atenuación de la pista de salida de audio."
+msgstr ""
+"<b>音频增益:</b>\n"
+"调节输出音轨的增益。"
 
 msgid "0dB"
 msgstr "0dB"
@@ -97,230 +111,238 @@ msgid ""
 "very loud and very soft sequences, DRC allows you\n"
 "to 'compress' the range by making loud sounds\n"
 "softer and soft sounds louder.\n"
-msgstr "<b>Compresión de Rango Dinámico:</b>\nAjusta el rango dinámico de la pista de salida de audio.\nPara un audio de origen que tenga un rango dinámico amplio,\ncon secuencias muy fuertes y muy suaves, la Compresión permite\n'comprimir' el rango de volumen, haciendo los ruidos fuertes\nmás suaves y los más suaves más fuertes.\n"
+msgstr ""
+"<b>动态范围压缩:<\\b>\n"
+"动态调整输出音频的幅值。\n"
+"对于幅值较大的源音频,\n"
+"DRC 可以压缩幅值范围,\n"
+"将大音频信号压制在某个范围内,\n"
+"将小音频信号适当提升。\n"
 
 msgid "Remove this audio encoder"
-msgstr "Eliminar este codificador de audio"
+msgstr "移除此音频编码"
 
 msgid "Closing HandBrake will terminate encoding.\n"
-msgstr "Al cerrar HandBrake se cancelará la codificación.\n"
+msgstr "关闭 HandBrake 将会结束编码。\n"
 
 msgid "No Title Found"
-msgstr "No se encontró el titulo"
+msgstr "找不到标题"
 
 msgid "none"
-msgstr "Ninguno"
+msgstr "无"
 
 msgid "Not Selected"
-msgstr "No Seleccionado"
+msgstr "没有选中的"
 
 msgid "zerolatency x264 tune selected, forcing constant framerate"
-msgstr "ajuste cero latencia x264 seleccionado, forzando velocidad de fotogramas constante"
+msgstr ""
 
 msgid "Scanning ..."
-msgstr "Analizando ..."
+msgstr "扫描中 ..."
 
 msgid "Stop Scan"
-msgstr "Detener análisis"
+msgstr "停止扫描"
 
 msgid "On"
-msgstr "Sí"
+msgstr "开启"
 
 msgid "Strict"
-msgstr "Estricto"
+msgstr "严格"
 
 msgid "Loose"
-msgstr "Libre"
+msgstr "宽松"
 
 msgid "Custom"
-msgstr "Personalizado"
+msgstr "自定义"
 
 msgid "Unknown"
-msgstr "Desconocido"
+msgstr "未知"
 
 msgid "auto"
-msgstr "automático"
+msgstr "自动"
 
 #, c-format
 msgid ""
 "%s\n"
 "\n"
 "%s in %d seconds ..."
-msgstr "%s\n\n%s en %d segundos ..."
+msgstr ""
+"%s\n"
+"\n"
+"%s ,共 %d 秒 ..."
 
 #, c-format
 msgid "%sYour movie will be lost if you don't continue encoding."
-msgstr "%sSu película se perderá si no se continúa la codificación."
+msgstr "%s您的电影将会丢失,如果您不继续编码。"
 
 msgid "Cancel Current and Stop"
-msgstr "Cancelar actual y detener"
+msgstr "取消当前并停止"
 
 msgid "Cancel Current, Start Next"
-msgstr "Cancelar actual, comenzar siguiente"
+msgstr "取消当前,开始下一个"
 
 msgid "Finish Current, then Stop"
-msgstr "Finalizar actual y despues detener"
+msgstr "完成当前,然后停止"
 
 msgid "Continue Encoding"
-msgstr "Continuar codificación"
+msgstr "继续编码"
 
 msgid "Custom "
-msgstr "Personalizado"
+msgstr "自定义"
 
 msgid "Modified "
-msgstr "Modificado"
+msgstr "修改"
 
 #, c-format
 msgid "Handbrake Version: %s (%d)\n"
-msgstr "Handbrake Versión: %s (%d)\n"
+msgstr "Handbrake 版本: %s (%d)\n"
 
 #, c-format
 msgid "%d encode(s) pending"
-msgstr "%d codificación(es) pendiente(s)"
+msgstr "%d 个编码等待执行"
 
 #, c-format
 msgid "job %d of %d, "
-msgstr "trabajo %d de %d, "
+msgstr "作业 %d of %d, "
 
 #, c-format
 msgid "pass %d (subtitle scan) of %d, "
-msgstr "pasada %d (análisis de subtítulos) de %d,"
+msgstr ""
 
 #, c-format
 msgid "pass %d of %d, "
-msgstr "pasada %d de %d,"
+msgstr ""
 
 #, c-format
 msgid "Encoding: %s%s%.2f %% (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)"
-msgstr "Codificando: %s%s%.2f %% (%.2f fps, avg %.2f fps, ETA %02dh%02dm%02ds)"
+msgstr "编码进行中: %s%s%.2f %% (%.2f fps, 平均 %.2f fps, 还需 %02d小时%02d分%02d秒)"
 
 #, c-format
 msgid "Encoding: %s%s%.2f %% (ETA %02dh%02dm%02ds)"
-msgstr "Codificando: %s%s%.2f %% (ETA %02dh%02dm%02ds)"
+msgstr "编码进行中:%s%s%.2f %% (还需 %02d小时%02d分%02d秒)"
 
 #, c-format
 msgid "Encoding: %s%s%.2f %%"
-msgstr "Codificando: %s%s%.2f %%"
+msgstr "编码进行中: %s%s%.2f %%"
 
 msgid "Searching for start time, "
-msgstr "Buscando la hora de inicio,"
+msgstr "搜索开始时间,"
 
 msgid "Scanning..."
-msgstr "Analizando..."
+msgstr "扫描中"
 
 #, c-format
 msgid "Scanning title %d of %d..."
-msgstr "Analizando título %d de %d..."
+msgstr ""
 
 #, c-format
 msgid "Scanning title %d of %d preview %d..."
-msgstr "Analizando título %d de %d vista previa %d..."
+msgstr ""
 
 msgid "Source"
-msgstr "Origen"
+msgstr "源文件"
 
 msgid "Choose Video Source"
-msgstr "Elegir origen de video"
+msgstr "选择视频源文件"
 
 msgid "Paused"
-msgstr "Pausado"
+msgstr "暂停"
 
 msgid "Encode Done!"
-msgstr "Codificación finalizada!"
+msgstr "编码完成!"
 
 msgid "Encode Canceled."
-msgstr "Codificacón cancelada."
+msgstr "编码取消。"
 
 msgid "Encode Failed."
-msgstr "Codificación fallida."
+msgstr "编码失败。"
 
 msgid "Muxing: This may take a while..."
-msgstr "Multiplexando: Esto puede tomar un tiempo..."
+msgstr "混流中:这可能需要一段时间..."
 
 msgid "Scan this DVD source"
-msgstr "Analizar esta DVD de origen"
+msgstr "扫描 DVD 源"
 
 msgid "AutoScan"
-msgstr "Autoanálisis"
+msgstr "自动扫描"
 
 msgid "Suspend"
-msgstr "Suspender"
+msgstr "挂起"
 
 #, c-format
 msgid "Suspend failed: %s"
-msgstr "Suspension fallida: %s"
+msgstr "挂起失败: %s"
 
 msgid "Suspend failed"
-msgstr "Suspension fallida"
+msgstr "挂起失败"
 
 msgid "Shutdown"
-msgstr "Apagar"
+msgstr "关机"
 
 #, c-format
 msgid "Shutdown failed: %s"
-msgstr "Apagado fallido: %s"
+msgstr "关机失败: %s"
 
 msgid "Shutdown failed"
-msgstr "Apagado fallido"
+msgstr "关机失败"
 
 msgid "Encoding"
-msgstr "Codificando"
+msgstr "编码中"
 
 #, c-format
 msgid "press %d %d"
-msgstr "presione %d %d"
+msgstr "存在 %d %d"
 
 #, c-format
 msgid ""
 "Invalid Settings:\n"
 "%s"
-msgstr "Ajustes inválidos:\n%s"
-
-msgid "Cancel"
-msgstr "Cancelar"
+msgstr ""
+"无效设置:\n"
+"%s"
 
 #, c-format
 msgid "%s: %.4g (Warning: lossless)"
-msgstr "%s: %.4g (Advertencia: sin pérdida)"
+msgstr "%s: %.4g (警告:无损)"
 
 #, c-format
 msgid "HandBrake %s/%s is now available (you have %s/%d)."
-msgstr "HandBrake %s/%s ya está disponible (tú tienes %s/%d)."
+msgstr "HandBrake %s/%s 现在可用 (您拥有 %s/%d)。"
 
 msgid "Encode Complete"
-msgstr "Codificación completa"
+msgstr "编码完成"
 
 msgid "Put down that cocktail, Your HandBrake queue is done!"
-msgstr "Deja ese coctél, Tu cola de HandBrake finalizó!"
+msgstr "放下手中的鸡尾酒,您的 HandBrake 队列完成了!"
 
 msgid "Your encode is complete."
-msgstr "Su codificación está completa."
+msgstr "您的编码已完成。"
 
 msgid "Shutting down the computer"
-msgstr "Apagando la computadora"
+msgstr "关闭计算机"
 
 msgid "Putting computer to sleep"
-msgstr "Poniendo la computadora a dormir"
+msgstr "将计算机转入休眠"
 
 msgid "Quiting Handbrake"
-msgstr "Saliendo de HandBrake"
+msgstr "退出 HandBrake"
 
 msgid "Bottom"
-msgstr "Inferior"
+msgstr "底部"
 
 #, c-format
 msgid "open failed: %s\n"
-msgstr "apertura fallida: %s\n"
+msgstr "无法打开: %s\n"
 
 msgid "No key for dictionary item"
-msgstr "No hay clave para elemento de diccionario"
+msgstr ""
 
 msgid "Invalid container type. This shouldn't happen"
-msgstr "Tipo de contenedor inválido. Esto no debería suceder"
+msgstr "无效的容器类型,这不应该发生啊。"
 
 #, c-format
 msgid "%s:missing a requried attribute"
-msgstr "%s:falta un atributo requerido"
+msgstr ""
 
 #, c-format
 msgid ""
@@ -331,38 +353,34 @@ msgid ""
 "    I - Include path to search for files\n"
 "    <in resource list>    Input resources file\n"
 "    <out resource plist>  Output resources plist file\n"
-msgstr "Uso: %s [-I <inc path>] <in resource list> <out resource plist>\nResumen:\n    Crea una plist a partir de una lista de recursos \nOptions:\n    I - Incluye la ruta para buscar archivos\n    <in resource list>  Archivo de recursos de entrada\n    <out resource plist>  Archivo de recursos de salida plist\n"
+msgstr ""
 
 msgid "language"
-msgstr "idioma"
+msgstr "语言"
 
 msgid "Language"
-msgstr "Idioma"
+msgstr "语言"
 
-msgid ""
-"The language this text is in, as an ISO code. Pango can use this as a hint "
-"when rendering the text. If you don't understand this parameter, you "
-"probably don't need it"
-msgstr "El lenguaje en el que está este texto, es un código ISO. Pango puede usar esto como una ayuda al renderizar el texto. Si no entiendes este parámetro, probablemente no lo necesites"
+msgid "The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If you don't understand this parameter, you probably don't need it"
+msgstr ""
 
-msgid ""
-"The preferred place to ellipsize the string, if the cell renderer does not "
-"have enough room to display the entire string"
-msgstr "El lugar preferido para elipzar la cadena, si el renderizador de celdas no tiene suficiente espacio para mostrar la cadena completa"
+msgid "The preferred place to ellipsize the string, if the cell renderer does not have enough room to display the entire string"
+msgstr ""
 
-msgid ""
-"How to break the string into multiple lines, if the cell renderer does not "
-"have enough room to display the entire string"
-msgstr "Cómo romper la cadena en múltiples líneas, si el renderizador de celdas no tiene suficiente espacio para mostrar la cadena completa"
+msgid "How to break the string into multiple lines, if the cell renderer does not have enough room to display the entire string"
+msgstr "如果该行无法显示完整的字符串,应该如何将其拆分为多行"
 
 msgid ""
 "Render the subtitle over the video.\n"
 "\n"
 "The subtitle will be part of the video and can not be disabled."
-msgstr "Renderizar el subtítulo sobre el video\n\nEl subtítulo se pegará al video y no se podrá deshabilitar."
+msgstr ""
+"在视频上渲染字幕。\n"
+"\n"
+"字幕将成为视频的一部,并且无法禁止显示。"
 
 msgid "<b>Burned In</b>"
-msgstr "<b>Pegado</b>"
+msgstr "<b>烧录</b>"
 
 msgid ""
 "Set the default output subtitle track.\n"
@@ -372,10 +390,10 @@ msgid ""
 "\n"
 "This is useful for creating a \"forced\" track\n"
 "in your output."
-msgstr "Elegir la pista de subtítulos predeterminada.\n\nLa mayoría de los reproductores mostrarán\nesta pista de subtítulos al reproducir el video.\n\nEsto es útil para crear una pista \"forzada\" en la salida."
+msgstr ""
 
 msgid "<b>Default</b>"
-msgstr "<b>Predeterminada</b>"
+msgstr "<b>默认</b>"
 
 msgid ""
 "Use only subtitles that have been flagged\n"
@@ -384,10 +402,16 @@ msgid ""
 "\"Forced\" subtitles are usually used to show\n"
 "subtitles during scenes where someone is speaking\n"
 "a foreign language."
-msgstr "Usar solo subtítulos que se hayan marcado\ncomo forzados en la pista de origen\n\nLos subtítulos \"forzados\" se utilizan habitualmente \npara mostrarlos en escenas donde alguien hable un\nidioma extranjero."
+msgstr ""
+"只使用标记为强制\n"
+"使用的字幕轨道\n"
+"\n"
+"强制使用的字幕通常\n"
+"用于视频中在说外语\n"
+"的时候。"
 
 msgid "<b>Forced Only</b>"
-msgstr "<b>Solo forzado</b>"
+msgstr "<b>只使用强制显示字幕</b>"
 
 msgid ""
 "Add (or subtract) an offset (in milliseconds)\n"
@@ -396,13 +420,19 @@ msgid ""
 "Often, the start of an external SRT file\n"
 "does not coincide with the start of the video.\n"
 "This setting allows you to synchronize the files."
-msgstr "Añadir (o restar) un desplazamiento (en milisegundos)\nal inicio de la pista de subtítulo SRT \n\nA menudo, el inicio de un archivo SRT externo\nno coincide con el inicio del video\nEsta configuración le permite sincronizar los archivos."
+msgstr ""
+"增加(或减少) SRT 字幕\n"
+"显示的时间偏移(单位是毫秒)\n"
+"\n"
+"有时候,外挂 SRT 字幕\n"
+"与视频不同步。\n"
+"这个设置可以使它们同步。"
 
 msgid "<b>SRT Offset</b>"
-msgstr "<b>Desplazamiento SRT</b>"
+msgstr "<b>SRT 字幕时间偏移</b>"
 
 msgid "Off"
-msgstr "Desactivado"
+msgstr "关闭"
 
 msgid ""
 "The source subtitle track\n"
@@ -416,22 +446,23 @@ msgid ""
 "subtitles that may correspond to a foreign\n"
 "language scene.  This option is best used in\n"
 "conjunction with the \"Forced\" option."
-msgstr "La pista de subtítulos de origen\n\nPuedes elegir cualquiera de los subtítulos\nreconocidos en el archivo de origen.\n\nAdemás, hay una opción especial de pista\n\"Búsqueda de audio extranjero\". Esta opción añadirá\nun pase extra a la codificación que busca\nsubtítulos que pueden corresponder a una escena\nen un idioma extranjero. Esta opción se utiliza mejor en\njunto con la opción \"Forzado\"."
+msgstr ""
 
 msgid "<b>Track</b>"
-msgstr "<b>Pista</b>"
+msgstr "轨道"
 
 msgid "About HandBrake"
-msgstr "Acerca de HandBrake"
+msgstr "关于 HandBrake"
 
 msgid ""
-"Copyright © 2008 - 2013 John Stebbins\n"
-"Copyright © 2004 - 2013, HandBrake Devs"
-msgstr "Copyright © 2008 - 2013 John Stebbins\nCopyright © 2004 - 2013, HandBrake Devs"
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
+msgstr ""
+"Copyright © 2008 - 2016 John Stebbins\n"
+"Copyright © 2004 - 2016, HandBrake Devs"
 
-msgid ""
-"HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
-msgstr "HandBrake es un transcodificador de vídeo multi-hilo, multi-plataforma, licenciado bajo la GPL."
+msgid "HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder."
+msgstr "HandBrake 是一个遵循GPL许可,多平台,多线程的视频编码器。"
 
 msgid "http://handbrake.fr"
 msgstr "http://handbrake.fr"
@@ -442,290 +473,369 @@ msgid ""
 "HandBrake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n"
 "\n"
 "You should have received a copy of the GNU General Public License along with Glade; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."
-msgstr "HandBrake is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nHandBrake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Glade; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."
+msgstr ""
+"HandBrake 是一款自由软件;您可以在 自由软件基金会发布的 GNU 通用公共许可证(第2版,或更新的版本)下再分发或者修改。\n"
+"HandBrake 希望能够帮到您,但无任何形式的担保责任,其包括但不限于,就适售性以及特定目的的适用性为默示性担保。详情参见 GNU 通用公共许可证全文。\n"
+"\n"
+"您应当随程序收到了 GNU 通用公共许可证的一份拷贝;如果没有,您可以写信到 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 索取。"
 
 msgid "_Minimize/Maximize"
-msgstr "_Minimizar/Maximizar"
+msgstr "最小化/最大化(_M)"
 
 msgid "_Pause Queue"
-msgstr "_Pausar cola"
+msgstr "暂停队列(_P)"
 
 msgid "_Quit"
-msgstr "Salir (_q)"
+msgstr "退出(_Q)"
 
 msgid "_About"
-msgstr "_Acerca de"
+msgstr "关于(_A)"
 
 msgid "HandBrake"
 msgstr "HandBrake"
 
 msgid "_File"
-msgstr "_Archivo"
+msgstr "文件(_F)"
 
 msgid "_Source"
-msgstr "_Origen"
+msgstr "源文件(_S)"
 
 msgid "Single _Title"
-msgstr "Un _título "
+msgstr ""
 
 msgid "_Destination"
-msgstr "_Destino"
+msgstr "目标文件(_D)"
 
 msgid "_Preferences"
-msgstr "_Preferencias"
+msgstr "首选项(_P)"
 
 msgid "_Queue"
-msgstr "_Cola"
+msgstr "队列(_Q)"
 
 msgid "_Add"
-msgstr "_Agregar"
+msgstr "添加(_A)"
 
 msgid "Add _Multiple"
-msgstr "Agregar _múltiple"
+msgstr "添加多个(_M)"
 
 msgid "_Start"
-msgstr "_Empezar"
+msgstr "开始(_S)"
 
 msgid "_Pause"
-msgstr "_Pausar"
+msgstr "暂停(_P)"
 
 msgid "_View"
-msgstr "_Ver"
+msgstr "视图(_V)"
 
 msgid "HandBrake For _Dumbies"
-msgstr "HandBrake para _novatos"
+msgstr "初学者使用 HandBrake (_D)"
 
 msgid "_Show Presets"
-msgstr "Mostrar pre_selecciones"
+msgstr "显示预设(_S)"
 
 msgid "_Preview"
-msgstr "Vista _previa"
+msgstr "预览(_P)"
 
 msgid "_Activity Window"
-msgstr "Ventana de _actividad"
+msgstr "活动日志窗口(_A)"
 
 msgid "Show _Queue"
-msgstr "Mostrar _cola"
+msgstr "显示队列(_Q)"
 
 msgid "_Presets"
-msgstr "_Preselecciones"
+msgstr "预设值(_P)"
 
 msgid "_Save"
-msgstr "_Guardar"
+msgstr "保存(_S)"
 
 msgid "_Delete"
-msgstr "_Eliminar"
+msgstr "删除(_D)"
 
 msgid "_Make Default"
-msgstr "Dejar como predeter_minado"
+msgstr "设为默认(_M)"
 
 msgid "_New Folder"
-msgstr "Carpeta _nueva"
+msgstr "新建文件夹(_N)"
 
 msgid "_Export"
-msgstr "_Exportar"
+msgstr "导出(_E)"
 
 msgid "_Import"
-msgstr "_Importar"
+msgstr "导入(_I)"
 
 msgid "_Update Built-in Presets"
-msgstr "Act_ualizar preselecciones por defecto"
+msgstr "更新内建预设(_U)"
 
 msgid "_Help"
-msgstr "_Ayuda"
+msgstr "帮助(_H)"
 
 msgid "_Guide"
-msgstr "_Guía"
+msgstr "手册(_G)"
 
 msgid "Start Encoding"
-msgstr "Empezar a codificar"
+msgstr "开始编码"
 
 msgid "Start"
-msgstr "Empezar"
+msgstr "开始"
 
 msgid "Pause Encoding"
-msgstr "Pausar codificación"
+msgstr "暂停编码"
 
 msgid "Pause"
-msgstr "Pausar"
+msgstr "暂停"
 
 msgid "Add to Queue"
-msgstr "Agregar a cola"
+msgstr "添加到队列"
 
 msgid "Enqueue"
-msgstr "Encolar"
+msgstr "排队"
 
 msgid "Show Queue"
-msgstr "Mostrar cola"
+msgstr "显示队列"
 
 msgid "Queue"
-msgstr "Cola"
+msgstr "队列"
+
+msgid "Failed to find widget"
+msgstr ""
+
+msgid "Choose Destination"
+msgstr ""
+
+#, c-format
+msgid "%s%sPreset: %s"
+msgstr ""
+
+#, c-format
+msgid "Queue (%d)"
+msgstr ""
+
+msgid "Updating preview\n"
+msgstr ""
+
+msgid "Update Check"
+msgstr ""
+
+msgid "Error while reading activity from pipe"
+msgstr ""
+
+msgid "Updating chapter row ui"
+msgstr ""
+
+#, c-format
+msgid "udev: Failed to lookup device %s"
+msgstr ""
+
+msgid "Cache Volume Names"
+msgstr ""
+
+#, c-format
+msgid "DBUS cannot connect: %s"
+msgstr ""
+
+#, c-format
+msgid "Could not get DBUS proxy: %s"
+msgstr ""
+
+msgid "Delete All"
+msgstr ""
+
+msgid "Delete all items in the queue."
+msgstr ""
+
+msgid ""
+"<b>Anamorphic Modes:</b>\n"
+"<small><tt>\n"
+"None   - Force pixel aspect ratio to 1:1.\n"
+"Loose  - Align dimensions to chosen 'Alignment' value\n"
+"         and pick pixel aspect ratio that preserves the\n"
+"         original display aspect ratio\n"
+"Strict - Keep original source dimensions and pixel\n"
+"         aspect ratio</tt></small>"
+msgstr ""
 
 msgid ""
 "Open Picture Settings and Preview window.\n"
 "Here you can adjust cropping, resolution, aspect ratio, and filters."
-msgstr "Abrir ventana de Ajustes de imagen y Vista previa\nAquí puedes ajustar el recorte, la resolución, la razón de aspecto y los filtros."
+msgstr ""
+"打开图像设置和预览窗口。\n"
+"在这里,您可以调整裁剪,分辨率,宽高比和过滤器。"
 
 msgid "Preview"
-msgstr "Vista previa"
+msgstr "预览"
 
 msgid "Show Activity Window"
-msgstr "Mostrar Ventana de actividad"
+msgstr "显示活动日志窗口"
 
 msgid "Activity"
-msgstr "Actividad"
+msgstr "活动日志"
 
 msgid "<b>Source:</b>"
-msgstr "<b>Origen:</b>"
+msgstr "<b>源文件:</b>"
 
 msgid "None"
-msgstr "Ninguno"
+msgstr "无"
+
+msgid "Foreign Audio Subtitle Track"
+msgstr ""
+
+msgid "First Selected Track"
+msgstr ""
+
+msgid "Foreign Audio, then First Selected Track"
+msgstr ""
 
 msgid "Title:"
-msgstr "Título:"
+msgstr "标题:"
 
 msgid ""
 "Set the title to encode.\n"
 "By default the longest title is chosen.\n"
 "This is often the feature title of a DVD."
-msgstr "Elige el título a codificar.\nPor defecto, se elige el título más largo.\nA menudo, es la película del DVD."
+msgstr ""
 
 msgid "Angle:"
-msgstr "Ángulo"
+msgstr "角度:"
 
 msgid "For multi-angle DVD's, select the desired angle to encode."
-msgstr "Para DVDs multi-ángulos, elige el ángulo deseado."
+msgstr "用于在多角度的 DVD 中,选择所希望的角度来进行编码。"
 
 msgid "Reset All Titles"
-msgstr "Reiniciar todos los títulos"
+msgstr "重置所有标题"
 
 msgid "Apply current settings to all titles"
-msgstr "Aplicar los ajustes actuales a todos los títulos"
+msgstr "对所有标题应用当前设置"
 
 msgid "Range of title to encode. Can be chapters, seconds, or frames."
-msgstr "El rango del título a codificar. Pueden ser capítulos, segundos, o cuadros."
+msgstr "需要编码的标题范围。可以是章节,秒或帧。"
 
 msgid "Set the first chapter to encode."
-msgstr "Elige el primer capítulo a codificar."
+msgstr "设置起始章节"
 
 msgid "Set the last chapter to encode."
-msgstr "Elige el último capítulo a codificar."
+msgstr "设置终止章节"
 
 msgid "Duration:"
-msgstr "Duración"
+msgstr "持续时长:"
+
+msgid "hh:mm:ss"
+msgstr ""
 
 msgid "<b>Destination</b>"
-msgstr "<b>Destino</b>"
+msgstr "<b>目标</b>"
 
 msgid "File:"
-msgstr "Archivo:"
+msgstr "文件:"
 
 msgid "Destination filename for your encode."
-msgstr "Nombre del archivo de destino."
+msgstr "编码的目标文件名。"
 
 msgid "Destination directory for your encode."
-msgstr "Directorio de destino de tu codificación."
+msgstr "编码的目标文件夹。"
 
 msgid "Destination Directory"
-msgstr "Directorio de destino"
+msgstr "目标文件夹"
 
 msgid "Format:"
-msgstr "Formato:"
+msgstr "格式:"
 
 msgid "Format to mux encoded tracks to."
-msgstr "Formato al cual hacer el mux de las pistas codificadas."
+msgstr ""
 
 msgid "iPod 5G Support"
-msgstr "Soporte iPod 5G"
+msgstr "iPod 5G 支持"
 
 msgid "Add iPod Atom needed by some older iPods."
-msgstr "Agregar \"átomo\" iPod requerido por algunos iPods antiguos."
+msgstr ""
 
 msgid "Web optimized"
-msgstr "Optimizado para web"
+msgstr "为网络观看做优化"
 
 msgid ""
 "Optimize the layout of the MP4 file for progressive download.\n"
 "This allows a player to initiate playback before downloading the entire file."
-msgstr "Optimizar el diseño del archivo MP4 para facilitar la descarga progresiva.\nPermite a un reproductor empezar con la reproducción antes de descargar todo el archivo."
+msgstr ""
 
 msgid "Large file (>4GB)"
-msgstr "Archivo grande (>4GB)"
+msgstr "大文件 (>4GB)"
 
 msgid ""
 "Allow 64 bit MP4 file which can be over 4GB.\n"
 "\n"
 "<b>Caution:</b> This option may break device compatibility."
-msgstr "Permitir archivos MP4 de 64 bit que pueden ser mas de 4GB.\n\n<b>Precaución:</b> Esta opción puede romper la compatibilidad de dispositivos."
+msgstr ""
 
 msgid "<b>Presets List</b>"
-msgstr "<b>Lista de preselecciones</b>"
+msgstr "<b>预设列表</b>"
 
 msgid "Source Codec:"
-msgstr "Códec de origen"
+msgstr "源文件编码:"
+
+msgid "--"
+msgstr ""
 
 msgid "Dimensions:"
-msgstr "Dimensiones"
+msgstr "尺寸:"
 
 msgid "Aspect: "
-msgstr "Aspecto"
+msgstr "长宽比:"
 
 msgid "Frame Rate:"
-msgstr "Tasa de cuadros"
+msgstr "帧率:"
 
 msgid "<b>Source Picture Parameters</b>"
-msgstr "<b>Parámetros de la imagen de origen</b>"
+msgstr "<b>源图像参数</b>"
 
 msgid "Autocrop:"
-msgstr "Recorte automático:"
+msgstr "自动裁剪"
 
 msgid "Crop:"
-msgstr "Recorte:"
+msgstr "裁剪:"
 
 msgid "Crop Dimensions:"
-msgstr "Dimensiones del recorte:"
+msgstr "裁剪尺寸:"
 
 msgid "<b>Cropping</b>"
-msgstr "<b>Recorte</b>"
+msgstr "<b>裁剪</b>"
 
 msgid "Scale Dimensions:"
-msgstr "Dimensiones de escala:"
+msgstr "缩放尺寸:"
 
 msgid "Optimal for Source:"
-msgstr "Óptimo para origen"
+msgstr ""
 
 msgid "Anamorphic:"
-msgstr "Anamórfico:"
+msgstr "变形:"
 
 msgid "<b>Scaling</b>"
-msgstr "<b>Escala</b>"
+msgstr "<b>缩放</b>"
 
 msgid "Presentation Dimensions:"
-msgstr "Dimensiones de presentación:"
+msgstr "演示尺寸:"
 
 msgid "Summary"
-msgstr "Resumen"
+msgstr "摘要"
 
 msgid "Left Crop"
-msgstr "Recorte izquierdo"
+msgstr "左剪裁"
 
 msgid "Top Crop"
-msgstr "Recorte superior"
+msgstr "顶部裁剪"
 
 msgid "Bottom Crop"
-msgstr "Recorte inferior"
+msgstr "底部裁剪"
 
 msgid "Right Crop"
-msgstr "Recorte derecho"
+msgstr "右剪裁"
 
 msgid "Auto Crop"
-msgstr "Recorte automático"
+msgstr "自动剪裁"
 
 msgid "Automatically crop black borders around edges of the video."
-msgstr "Recortar automáticamente los bordes negros alrededor del video."
+msgstr "自动裁剪黑边。"
 
 msgid "Loose Crop"
-msgstr "Recorte suelto"
+msgstr ""
 
 msgid ""
 "When picture settings require that the image\n"
@@ -733,31 +843,31 @@ msgid ""
 "of pixels, this setting will crop a few extra pixels\n"
 "instead of doing exact cropping and then scaling to\n"
 "the required multiple."
-msgstr "Cuando los ajustes de imagen requieren que las dimensiones \nde la imagen sean redondeados a un numero múltiplo\nde píxeles, esta opción recortará unos pocos píxeles extra\nen vez de recortar exactamente y luego escalar al\nmúltiplo requerido."
+msgstr ""
 
 msgid "width:"
-msgstr "ancho:"
+msgstr "宽:"
 
 msgid ""
 "This is the width that the video will be stored at.\n"
 "The actual display dimensions will differ if the pixel aspect ratio is not 1:1."
-msgstr "Este es el ancho con el cual se almacenará el video.\nLas dimensiones de presentación serán distintas si la razón de aspecto de los pixeles no es 1:1."
+msgstr ""
 
 msgid "height:"
-msgstr "alto:"
+msgstr "高"
 
 msgid ""
 "This is the height that the video will be stored at.\n"
 "The actual display dimensions will differ if the pixel aspect ratio is not 1:1."
-msgstr "Esta es la altura con el cual se almacenará el video.\nLas dimensiones de presentación serán distintas si la razón de aspecto de los pixeles no es 1:1."
+msgstr ""
 
 msgid "Optimal for source"
-msgstr "Óptimo para origen"
+msgstr ""
 
 msgid ""
 "If enabled, select the 'optimal' storage resolution.\n"
 "This will be the resolution that most closely matches the source resolution after cropping."
-msgstr "Si está habilitado, selecciona la resolución \"óptima\" de almacenamiento. \nEsta será la resolución que más se acerque la resolución de la fuente después de recortar."
+msgstr ""
 
 msgid ""
 "<b>Anamorphic Modes:</b>\n"
@@ -768,35 +878,33 @@ msgid ""
 "     original display aspect ratio\n"
 "Strict - Keep original source dimensions and pixel\n"
 "     aspect ratio</tt></small>"
-msgstr "<b>Modos Anamorficos :</b>\n<small><tt>\nNinguno   - Fuerza la razón de aspecto de píxel 1:1.\nLibre  - Alinea las dimensiones al valor de 'Alineación' elegido\ny selecciona razón de aspecto de píxel que preserva la\nrazón de aspecto de visualización original\nEstricto - Mantiene las dimensiones y razón de aspecto de píxel\nde origen</tt></small>"
+msgstr ""
 
 msgid "Alignment:"
-msgstr "Alineación:"
+msgstr "对齐方式:"
 
 msgid ""
 "Align storage dimensions to multiples of this value.\n"
 "\n"
 "This setting is only necessary for compatibility with some devices.\n"
 "You should use 2 unless you experience compatibility issues."
-msgstr "Alinear las dimensiones de almacenamiento a múltiplos de este valor. \n\nEste ajuste sólo es necesario para la compatibilidad con algunos dispositivos. \nDebes usar 2 a menos que tengas problemas de compatibilidad."
+msgstr ""
 
 msgid "<b>Storage Geometry</b>"
-msgstr "<b>Geometría en almacenamiento</b>"
+msgstr ""
 
-msgid ""
-"This is the display width. It is the result of scaling the storage "
-"dimensions by the pixel aspect."
-msgstr "Este es el ancho de presentación. Es el resultado de la ampliación de las dimensiones de almacenamiento por el aspecto de los pixeles."
+msgid "This is the display width. It is the result of scaling the storage dimensions by the pixel aspect."
+msgstr ""
 
 msgid "Pixel Aspect:"
-msgstr "Aspecto de pixeles:"
+msgstr "像素宽高比:"
 
 msgid ""
 "Pixel aspect defines the shape of the pixels.\n"
 "\n"
 "A 1:1 ratio defines a square pixel.  Other values define rectangular shapes.\n"
 "Players will scale the image in order to achieve the specified aspect."
-msgstr "El aspecto de los pixeles define la forma de éstos.\n\nUna razón de aspecto de 1:1 significa un pixel cuadrado. Otros valores harán los pixeles rectangulares.\nLos reproductores escalarán la imagen para llegar al aspecto especificado."
+msgstr ""
 
 msgid ":"
 msgstr ":"
@@ -805,73 +913,75 @@ msgid ""
 "Pixel aspect defines the shape of the pixels.\n"
 "A 1:1 ratio defines a square pixel.  Other values define rectangular shapes.\n"
 "Players will scale the image in order to achieve the specified aspect."
-msgstr "El aspecto de los pixeles define la forma de éstos.\nUna razón de aspecto de 1:1 significa un pixel cuadrado. Otros valores harán los pixeles rectangulares.\nLos reproductores escalarán la imagen para llegar al aspecto especificado."
+msgstr ""
 
 msgid "Keep Aspect"
-msgstr "Mantener aspecto"
+msgstr "保持宽高比"
 
-msgid ""
-"If enabled, the original display aspect of the source will be maintained."
-msgstr "Si se activa, se mantendrá el aspecto de presentación original del origen."
+msgid "If enabled, the original display aspect of the source will be maintained."
+msgstr ""
 
 msgid "Display Aspect:"
-msgstr "Aspecto de pantalla:"
+msgstr "显示宽高比:"
+
+msgid "--:--"
+msgstr ""
 
 msgid "<b>Display Geometry</b>"
-msgstr "<b>Geometría de pantalla</b>"
+msgstr ""
 
 msgid "Grayscale"
-msgstr "En escala de grises"
+msgstr "灰度"
 
 msgid "If enabled, filter colour components out of video."
-msgstr "Si está activado, se eliminarán los colores del video."
+msgstr "如果启用,将过滤输出文件的色彩部分"
 
 msgid "Deblock:"
-msgstr "Deblock:"
+msgstr "去块滤波"
 
 msgid ""
 "The deblocking filter removes a common type of compression artifact.\n"
 "If your source exhibits 'blockiness', this filter may help clean it up."
-msgstr "El filtro deblock elimina un tipo común de artefacto de compresión. \nSi el origen se ve 'pixelado', este filtro puede ayudar un poco."
+msgstr ""
 
 msgid "Denoise Filter:"
-msgstr "Atenuar ruido:"
+msgstr "降噪滤镜"
 
 msgid ""
 "Denoise filtering reduces or removes the appearance of noise and grain.\n"
 "Film grain and other types of high frequency noise are difficult to compress.\n"
 "Using this filter on such sources can result in smaller file sizes."
-msgstr "Este filtro reduce o elimina la aparición del ruido y el grano. \nEl grano de la película y otros tipos de ruido de alta frecuencia son difíciles de comprimir. \nEl uso de este filtro desde dichos orígenes puede resultar en archivos más pequeños."
+msgstr ""
 
 msgid "Denoise Preset:"
-msgstr "Preselección de Atenuar ruido:"
+msgstr "降噪预设"
 
 msgid "Denoise Tune:"
-msgstr "Ajustar Atenuar ruido:"
+msgstr ""
 
 msgid ""
 "Custom denoise filter string format\n"
 "\n"
 "SpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma"
-msgstr "Formato de cadena de filtro Atenuar ruido personalizado\n\nSpatialLuma:SpatialChroma:TemporalLuma:TemporalChroma"
+msgstr ""
 
 msgid "Detelecine:"
-msgstr "Eliminar telecinado:"
+msgstr ""
 
 msgid ""
 "This filter removes 'combing' artifacts that are the result of telecining.\n"
 "\n"
 "Telecining is a process that adjusts film framerates that are 24fps to NTSC video frame rates which are 30fps."
-msgstr "Este filtro elimina los artefactos de \"peine\" que pueden aparecer a causa del telecinado.\n\nEl telecinado es un proceso que ajusta la tasa de cuadros de película que son 24fps NTSC a velocidades de fotogramas de vídeo que son 30fps."
+msgstr ""
 
 msgid ""
 "Custom detelecine filter string format\n"
 "\n"
 "JunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity"
-msgstr "Formato de cadena de filtro Eliminar telecinado personalizado\n\nJunkLeft:JunkRight:JunkTop:JunkBottom:StrictBreaks:MetricPlane:Parity"
+msgstr ""
 
 msgid "Decomb"
-msgstr "Eliminar \"peine\""
+msgstr ""
 
 msgid ""
 "Choose decomb or deinterlace filter options.\n"
@@ -881,18 +991,18 @@ msgid ""
 "\n"
 "The classic deinterlace filter is applied to all frames.\n"
 "Frames that are not interlaced will suffer some quality degradation."
-msgstr "Elige las opciones del filtro Eliminar \"peine\" o Desentrelazado. \n\nEl filtro Eliminar \"peine\" desentrelaza selectivamente cuadros que parecen estar entrelazados. \nEsto preservará la calidad en cuadros que no están entrelazados. \n\nEl filtro Desentrelazado clásico se aplica a todos los cuadros. \nLos cuadros que no están entrelazados sufrirán una degradación de la calidad."
+msgstr ""
 
 msgid "Deinterlace"
-msgstr "Desentrelazado"
+msgstr "隔行扫描"
 
 msgid "Decomb:"
-msgstr "Eliminar \"peine\""
+msgstr ""
 
 msgid ""
 "The decomb filter selectively deinterlaces frames that appear to be interlaced.\n"
 "This will preserve quality in frames that are not interlaced."
-msgstr "El filtro Eliminar \"peine\" desentrelaza selectivamente cuadros que parecen estar entrelazados. \nEsto preservará la calidad en cuadros que no están entrelazados. "
+msgstr ""
 
 msgid ""
 "Custom decomb filter string format\n"
@@ -900,80 +1010,83 @@ msgid ""
 "Mode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:\n"
 "BlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:\n"
 "ErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity"
-msgstr "Formato de cadena de filtro Eliminar \"peine\" personalizado\n\nMode:SpatialMetric:MotionThresh:SpatialThresh:BlockThresh:BlockWidth:\nBlockHeight:MagnitudeThres:VarianceThres:LaplacianThresh:DilationThresh:\nErosionThresh:NoiseThresh:MaxSearchDistance:PostProcessing:Parity"
+msgstr ""
 
 msgid "Deinterlace:"
-msgstr "Desentrelazado"
+msgstr "隔行扫描:"
 
 msgid ""
 "The classic deinterlace filter is applied to all frames.\n"
 "Frames that are not interlaced will suffer some quality degradation."
-msgstr "El filtro Desentrelazado clásico se aplica a todos los cuadros. \nLos cuadros que no están entrelazados sufrirán una degradación de la calidad."
+msgstr ""
 
 msgid ""
 "Custom deinterlace filter string format\n"
 "\n"
 "YadifMode:YadifParity:McdintMode:McdeintQp"
-msgstr "Formato de cadena de filtro Desentrelazado personalizado\n\nYadifMode:YadifParity:McdintMode:McdeintQp"
+msgstr ""
 
 msgid "<b>Filters</b>"
-msgstr "<b>Filtros</b>"
+msgstr "<b>过滤器</b>"
 
 msgid "Picture"
-msgstr "Imagen"
+msgstr "图像"
 
 msgid "Video Encoder:"
-msgstr "Codificador de video"
+msgstr "视频编码器:"
 
 msgid "Available video encoders."
-msgstr "Codificadores de video disponibles"
+msgstr "可用的视频编码器。"
 
 msgid "Framerate:"
-msgstr "Tasa de cuadros"
+msgstr "帧率:"
 
 msgid ""
 "Output framerate.\n"
 "\n"
 "'Same as source' is recommended. If your source video has\n"
 "a variable framerate, 'Same as source' will preserve it."
-msgstr "Velocidad de fotograma de salida.\n\n'Igual que origen' es recomendado. Si tu video de origen tiene \nuna velocidad de fotograma variable, 'Igual que origen' lo preservará."
+msgstr ""
 
 msgid "Constant Framerate"
-msgstr "Velocidad de fotograma constante"
+msgstr "固定帧率"
 
 msgid "Same as source"
-msgstr "Igual que origen"
+msgstr "与源视频相同"
 
 msgid "kbps"
 msgstr "kbps"
 
 msgid "(variable)"
-msgstr "(variable)"
+msgstr "(动态)"
 
 msgid "(constant)"
-msgstr "(constante)"
+msgstr "(固定)"
 
 msgid "Enables constant framerate output."
-msgstr "Activa velocidad de fotograma de salida constante."
+msgstr ""
 
 msgid "Peak Framerate (VFR)"
-msgstr "Pico de velocidad de fotograma (VFR)"
+msgstr "峰值帧率 (VFR)"
 
 msgid ""
 "Enables variable framerate output with a peak\n"
 "rate determined by the framerate setting.\n"
 "\n"
 "VFR is not compatible with some players."
-msgstr "Activa velocidad de fotograma variable de salida con un rango\npico determinado por el ajuste de velocidad de fotograma.\n\nVFR no es compatible con algunos reproductores."
+msgstr ""
 
 msgid "Variable Framerate"
-msgstr "Velocidad de fotograma variable"
+msgstr "动态帧率"
 
 msgid ""
 "Enables variable framerate output.\n"
 "\n"
 "VFR is not compatible with some players."
-msgstr "Activa velocidad de fotograma variable de salida.\n\nVFR no es compatible con algunos reproductores."
+msgstr ""
+"启用动态帧率。\n"
+"\n"
+"一些播放器与动态帧率不兼容。"
 
 msgid ""
 "Set the desired quality factor.\n"
@@ -991,10 +1104,10 @@ msgid ""
 msgstr ""
 
 msgid "Constant Quality:"
-msgstr ""
+msgstr "恒定画质:"
 
 msgid "Bitrate (kbps):    "
-msgstr ""
+msgstr "码率 (kbps):    "
 
 msgid ""
 "Set the average bitrate.\n"
@@ -1005,7 +1118,7 @@ msgid ""
 msgstr ""
 
 msgid "2-Pass Encoding"
-msgstr ""
+msgstr "二次编码"
 
 msgid ""
 "Perform 2 Pass Encoding.\n"
@@ -1016,24 +1129,25 @@ msgid ""
 msgstr ""
 
 msgid "Turbo First Pass"
-msgstr ""
+msgstr "加快首次编码"
 
-msgid ""
-"During the 1st pass of a 2 pass encode, use settings that speed things "
-"along."
+msgid "During the 1st pass of a 2 pass encode, use settings that speed things along."
 msgstr ""
 
 msgid "Use Advanced Options"
-msgstr ""
+msgstr "使用高级视频选项"
 
 msgid ""
 "Use advanced options Tab for x264 settings.\n"
 "\n"
 "Use at your own risk!"
 msgstr ""
+"使用高级视频选项卡中的设置。\n"
+"\n"
+"风险自负!"
 
 msgid "Preset:"
-msgstr ""
+msgstr "预设:"
 
 msgid ""
 "Adjusts encoder settings to trade off compression efficiency against encoding speed.\n"
@@ -1045,7 +1159,7 @@ msgid ""
 msgstr ""
 
 msgid "Tune:"
-msgstr ""
+msgstr "优化:"
 
 msgid ""
 "Tune settings to optimize for common scenarios.\n"
@@ -1056,16 +1170,19 @@ msgid ""
 msgstr ""
 
 msgid "Fast Decode"
-msgstr ""
+msgstr "快速解码"
 
 msgid ""
 "Reduce decoder CPU usage.\n"
 "\n"
 "Set this if your device is struggling to play the output (dropped frames)."
 msgstr ""
+"减少编码 CPU 消耗。\n"
+"\n"
+"如果您的输出在设备上播放不流畅(掉帧),请勾选此选项。"
 
 msgid "Zero Latency"
-msgstr ""
+msgstr "零延迟"
 
 msgid ""
 "Minimize latency between input to encoder and output of decoder.\n"
@@ -1077,7 +1194,7 @@ msgid ""
 msgstr ""
 
 msgid "Profile:"
-msgstr ""
+msgstr "规格:"
 
 msgid ""
 "Sets and ensures compliance with the specified profile.\n"
@@ -1086,7 +1203,7 @@ msgid ""
 msgstr ""
 
 msgid "Level:"
-msgstr ""
+msgstr "级别:"
 
 msgid ""
 "Sets and ensures compliance with the specified level.\n"
@@ -1095,7 +1212,7 @@ msgid ""
 msgstr ""
 
 msgid "More Settings:"
-msgstr ""
+msgstr "更多设置:"
 
 msgid ""
 "Additional encoder settings.\n"
@@ -1104,22 +1221,22 @@ msgid ""
 msgstr ""
 
 msgid "Video"
-msgstr ""
+msgstr "视频"
 
 msgid "Selection Behavior:"
-msgstr ""
+msgstr "选择行为:"
 
 msgid "Remove"
-msgstr ""
+msgstr "移除"
 
 msgid "Available Languages"
-msgstr ""
+msgstr "可用语言"
 
 msgid "Selected Languages"
-msgstr ""
+msgstr "已选择语言"
 
 msgid "Use only first encoder for secondary audio"
-msgstr ""
+msgstr "仅使用第一编码器,用于辅助音频"
 
 msgid ""
 "Only the primary audio track will be encoded with the full encoder list.\n"
@@ -1127,88 +1244,132 @@ msgid ""
 msgstr ""
 
 msgid "Auto Passthru:"
-msgstr ""
+msgstr "自动复制流:"
 
 msgid "MP3"
-msgstr ""
+msgstr "MP3"
 
 msgid ""
 "Enable this if your playback device supports MP3.\n"
 "This permits MP3 passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
+msgid "AAC"
+msgstr ""
+
 msgid ""
 "Enable this if your playback device supports AAC.\n"
 "This permits AAC passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
+msgid "AC-3"
+msgstr ""
+
 msgid ""
 "Enable this if your playback device supports AC-3.\n"
 "This permits AC-3 passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
+msgid "DTS"
+msgstr ""
+
 msgid ""
 "Enable this if your playback device supports DTS.\n"
 "This permits DTS passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
+msgid "DTS-HD"
+msgstr ""
+
 msgid ""
 "Enable this if your playback device supports DTS-HD.\n"
 "This permits DTS-HD passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
-msgid "Passthru Fallback:"
+msgid "EAC-3"
 msgstr ""
 
 msgid ""
-"Set the audio codec to encode with when a suitable track can not be found "
-"for audio passthru."
+"Enable this if your playback device supports EAC-3.\n"
+"This permits EAC-3 passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
-msgid "<b>Audio Encoder Settings:</b>"
+msgid "TrueHD"
+msgstr ""
+
+msgid ""
+"Enable this if your playback device supports TrueHD.\n"
+"This permits TrueHD passthru to be selected when automatic passthru selection is enabled."
 msgstr ""
 
+msgid "FLAC"
+msgstr ""
+
+msgid ""
+"Enable this if your playback device supports FLAC.\n"
+"This permits FLAC passthru to be selected when automatic passthru selection is enabled."
+msgstr ""
+
+msgid "Passthru Fallback:"
+msgstr ""
+
+msgid "Set the audio codec to encode with when a suitable track can not be found for audio passthru."
+msgstr ""
+
+msgid "<b>Audio Encoder Settings:</b>"
+msgstr "<b>音频编码设置:</b>"
+
 msgid "Each selected source track will be encoded with all selected encoders"
 msgstr ""
 
 msgid "Encoder"
-msgstr ""
+msgstr "编码"
 
 msgid "Bitrate/Quality"
-msgstr ""
+msgstr "比特率/质量"
 
 msgid "Mixdown"
-msgstr ""
+msgstr "混音"
 
 msgid "Samplerate"
-msgstr ""
+msgstr "采样率"
 
 msgid "Gain"
+msgstr "增益"
+
+msgid "DRC"
 msgstr ""
 
 msgid "Audio Defaults"
-msgstr ""
+msgstr "默认音频"
 
 msgid "Add new audio settings to the list"
-msgstr ""
+msgstr "添加新的音频设置至列表"
 
 msgid "Add All"
-msgstr ""
+msgstr "全部添加"
 
 msgid "Add all audio tracks to the list"
-msgstr ""
+msgstr "将所有音轨到列表"
 
 msgid "Reload Defaults"
-msgstr ""
+msgstr "重载默认"
 
 msgid "Reload all audio settings from defaults"
-msgstr ""
+msgstr "重新加载所有音频的默认设置"
 
 msgid "Audio List"
+msgstr "音频列表"
+
+msgid ""
+"Create a list of languages you would like to select subtitles for.\n"
+"\n"
+"The first language in this list is your \"preferred\" language and will be used\n"
+"for determining subtitle selection settings when there is foreign audio."
 msgstr ""
 
 msgid "Preferred Language: None"
-msgstr ""
+msgstr "首选语言:无"
 
 msgid "Add Foreign Audio Search Pass"
 msgstr ""
@@ -1221,37 +1382,72 @@ msgstr ""
 msgid "Add subtitle track if default audio is foreign"
 msgstr ""
 
-msgid ""
-"When the default audio track is not your preferred language, add a subtitle "
-"track."
+msgid "When the default audio track is not your preferred language, add a subtitle track."
 msgstr ""
 
 msgid "Add Closed Captions when available"
 msgstr ""
 
+msgid "Closed captions are text subtitles that can be added to any container as a soft subtitle track"
+msgstr ""
+
+msgid "Burn-In Behavior:"
+msgstr ""
+
 msgid ""
-"Closed captions are text subtitles that can be added to any container as a "
-"soft subtitle track (not burned)"
+"Set the behavior of subtitle \"Burn-In\".\n"
+"\n"
+"Burned-In subtitles are part of the video and can not be disabled during playback.\n"
+"Only one subtitle track can be burned! Since conflicts can occur, the first chosen wins."
 msgstr ""
 
-msgid "Subtitle Defaults"
+msgid "Burn-In for deficient players:"
 msgstr ""
 
-msgid "Add new subtitle settings to the list"
+msgid "DVD Subtitles"
 msgstr ""
 
-msgid "Add all subtitle tracks to the list"
+msgid ""
+"Burn the first selected DVD subtitle track. All other DVD subtitle tracks will be discarded.\n"
+"Use this option if your player software or device does not support DVD subtitles.\n"
+"\n"
+"Only one subtitle track can be burned! Since conflicts can occur, the first chosen wins."
 msgstr ""
 
-msgid "Reload all subtitle settings from defaults"
+msgid "Blu-ray Subtitles"
 msgstr ""
 
-msgid "Subtitle List"
+msgid ""
+"Burn the first selected Blu-ray subtitle track. All other Blu-ray subtitle tracks will be discarded.\n"
+"Use this option if your player software or device does not support Blu-ray subtitles.\n"
+"\n"
+"Only one subtitle track can be burned! Since conflicts can occur, the first chosen wins."
 msgstr ""
 
-msgid "<small>Reference Frames:</small>"
+msgid "<small>* Only one of the above subtitle burn options will be applied, starting with the top.</small>"
 msgstr ""
 
+msgid "Only one subtitle track can be burned! Since conflicts can occur, the first chosen wins."
+msgstr ""
+
+msgid "Subtitle Defaults"
+msgstr "默认字幕"
+
+msgid "Add new subtitle settings to the list"
+msgstr "新增的字幕添加到列表"
+
+msgid "Add all subtitle tracks to the list"
+msgstr "将所有字幕轨道到列表"
+
+msgid "Reload all subtitle settings from defaults"
+msgstr "从默认设置加载所有字幕设置"
+
+msgid "Subtitle List"
+msgstr "字幕列表"
+
+msgid "<small>Reference Frames:</small>"
+msgstr "<small>参考帧范围:</small>"
+
 msgid ""
 "Sane values are ~1-6.  The more you add, the better the compression, but the slower the encode.\n"
 "Cel animation tends to benefit from more reference frames a lot more than film content.\n"
@@ -1262,7 +1458,7 @@ msgid ""
 msgstr ""
 
 msgid "<small>Maximum B-Frames:</small>"
-msgstr ""
+msgstr "<small>最长B帧序列长:</small>"
 
 msgid ""
 "Sane values are ~2-5.  This specifies the maximum number of sequential B-frames that the encoder can use.\n"
@@ -1275,7 +1471,7 @@ msgid ""
 msgstr ""
 
 msgid "<small>Pyramidal B-Frames:</small>"
-msgstr ""
+msgstr "<small>B帧金字塔序列:</small>"
 
 msgid ""
 "B-pyramid improves compression by creating a pyramidal structure (hence the name)\n"
@@ -1285,7 +1481,7 @@ msgid ""
 msgstr ""
 
 msgid "<small>Weighted P-Frames:</small>"
-msgstr ""
+msgstr "<small>加权P帧:</small>"
 
 msgid ""
 "Performs extra analysis to decide upon weighting parameters for each frame.\n"
@@ -1299,7 +1495,7 @@ msgid ""
 msgstr ""
 
 msgid "8x8 Transform"
-msgstr ""
+msgstr "8x8 变换"
 
 msgid ""
 "The 8x8 transform is the single most useful feature of x264 in terms of compression-per-speed.\n"
@@ -1323,7 +1519,7 @@ msgid ""
 msgstr ""
 
 msgid "<small><b>Encoding Features</b></small>"
-msgstr ""
+msgstr "<small><b>编码特性</b></small>"
 
 msgid "<small>Motion Est. Method:</small>"
 msgstr ""
@@ -1450,7 +1646,7 @@ msgid ""
 msgstr ""
 
 msgid "Deblocking: "
-msgstr ""
+msgstr "去区块效应:"
 
 msgid ""
 "H.264 deblocking filter.\n"
@@ -1467,7 +1663,7 @@ msgid ""
 msgstr ""
 
 msgid "No DCT Decimate"
-msgstr ""
+msgstr "禁用DCT跳过"
 
 msgid ""
 "x264 normally zeroes out nearly-empty data blocks to save bits to\n"
@@ -1498,49 +1694,49 @@ msgid "<small><b>Current x264 Advanced Option String</b></small>"
 msgstr ""
 
 msgid "Advanced Video"
-msgstr ""
+msgstr "高级视频"
 
 msgid "Chapter Markers"
-msgstr ""
+msgstr "章节标记"
 
 msgid "Add chapter markers to output file."
-msgstr ""
+msgstr "添加章节标记到输出文件。"
 
 msgid "Chapters"
-msgstr ""
+msgstr "章节"
 
 msgid "Actors:"
-msgstr ""
+msgstr "演员:"
 
 msgid "Director:"
-msgstr ""
+msgstr "导演:"
 
 msgid "Release Date:"
-msgstr ""
+msgstr "发布日期:"
 
 msgid "Comment:"
-msgstr ""
+msgstr "评论:"
 
 msgid "Genre:"
-msgstr ""
+msgstr "种类:"
 
 msgid "Description:"
-msgstr ""
+msgstr "描述:"
 
 msgid "Plot:"
-msgstr ""
+msgstr "剧情:"
 
 msgid "Tags"
-msgstr ""
+msgstr "标签"
 
 msgid "Settings"
-msgstr ""
+msgstr "设置"
 
 msgid "Edit"
-msgstr ""
+msgstr "编辑"
 
 msgid "Reload"
-msgstr ""
+msgstr "重新加载"
 
 msgid ""
 "Mark selected queue entry as pending.\n"
@@ -1548,24 +1744,41 @@ msgid ""
 msgstr ""
 
 msgid "Reload All"
-msgstr ""
+msgstr "全部重载"
 
 msgid ""
 "Mark all queue entries as pending.\n"
 "Resets all queue jobs to pending and ready to run again."
 msgstr ""
 
-msgid "OK"
+msgid "Save Queue"
 msgstr ""
 
-msgid "Select All"
+msgid ""
+"Save the current queue of encode jobs to a file.\n"
+"This file may be reloaded at a later time to edit your jobs and re-encode."
 msgstr ""
 
+msgid "Load Queue File"
+msgstr ""
+
+msgid "Load a previously saved queue file."
+msgstr ""
+
+msgid "Cancel"
+msgstr "取消"
+
+msgid "OK"
+msgstr "确定"
+
+msgid "Select All"
+msgstr "全选"
+
 msgid "Mark all titles for adding to the queue"
 msgstr ""
 
 msgid "Clear All"
-msgstr ""
+msgstr "清除所有"
 
 msgid "Unmark all titles"
 msgstr ""
@@ -1577,45 +1790,43 @@ msgid "Select this title for adding to the queue.\n"
 msgstr ""
 
 msgid "Preferences"
-msgstr ""
+msgstr "首选项"
 
 msgid "Automatically check for updates"
-msgstr ""
+msgstr "自动检查更新"
 
 msgid "When all encodes are complete"
-msgstr ""
+msgstr "当所有编码完成后"
 
 msgid "Use automatic naming (uses modified source name)"
-msgstr ""
+msgstr "使用自动命名(使用修改后的源名称)"
 
 msgid "Auto-Name Template"
-msgstr ""
+msgstr "自动命名模板"
 
-msgid ""
-"Available Options: {source} {title} {chapters} {date} {time} {quality} "
-"{bitrate}"
-msgstr ""
+msgid "Available Options: {source} {title} {chapters} {date} {time} {quality} {bitrate}"
+msgstr "可用选项: {source} {title} {chapters} {date} {time} {quality} {bitrate}"
 
 msgid "Use iPod/iTunes friendly (.m4v) file extension for MP4"
 msgstr ""
 
 msgid "Number of previews"
-msgstr ""
+msgstr "预览数"
 
 msgid "Filter short titles (seconds)"
 msgstr ""
 
 msgid "Show system tray icon"
-msgstr ""
+msgstr "显示系统托盘图标"
 
 msgid "General"
-msgstr ""
+msgstr "普通"
 
 msgid "Constant Quality fractional granularity"
 msgstr ""
 
 msgid "Use dvdnav (instead of libdvdread)"
-msgstr ""
+msgstr "使用 dvdnav(代替 libdvdread)"
 
 msgid "Put individual encode logs in same location as movie"
 msgstr ""
@@ -1630,13 +1841,13 @@ msgid "Scale down High Definition previews"
 msgstr ""
 
 msgid "Automatically Scan DVD when loaded"
-msgstr ""
+msgstr "DVD 装载时自动扫描"
 
 msgid "Scans the DVD whenever a new disc is loaded"
-msgstr ""
+msgstr "当有新碟装载时扫描 DVD"
 
 msgid "Hide Advanced Video Options Tab"
-msgstr ""
+msgstr "隐藏高级视频选项标签"
 
 msgid ""
 "Use advanced video options at your own risk.\n"
@@ -1645,7 +1856,7 @@ msgid ""
 msgstr ""
 
 msgid "Delete completed jobs from queue"
-msgstr ""
+msgstr "删除队列中已完成的作业"
 
 msgid ""
 "By default, completed jobs remain in the queue and are marked as complete.\n"
@@ -1653,31 +1864,31 @@ msgid ""
 msgstr ""
 
 msgid "Allow Tweaks"
-msgstr ""
+msgstr "允许 Tweaks"
 
 msgid "Allow HandBrake For Dummies"
 msgstr ""
 
 msgid "Advanced"
-msgstr ""
+msgstr "高级"
 
 msgid "Folder Name:"
-msgstr ""
+msgstr "文件夹名称:"
 
 msgid "<b>Description</b>"
-msgstr ""
+msgstr "<b>描述</b>"
 
 msgid "Preset Name:"
-msgstr ""
+msgstr "预设名称:"
 
 msgid "<b>Custom Picture Dimensions</b>"
-msgstr ""
+msgstr "<b>自定义图像尺寸</b>"
 
 msgid "Maximum Width:"
-msgstr ""
+msgstr "最大宽度:"
 
 msgid "Enable maximum width limit."
-msgstr ""
+msgstr "启用最大宽度限制."
 
 msgid ""
 "This is the maximum width that the video will be stored at.\n"
@@ -1687,7 +1898,7 @@ msgid ""
 msgstr ""
 
 msgid "Maximum Height:"
-msgstr ""
+msgstr "最大高度:"
 
 msgid "Enable maximum height limit."
 msgstr ""
@@ -1700,57 +1911,55 @@ msgid ""
 msgstr ""
 
 msgid "Select preview frames."
-msgstr ""
+msgstr "选择预览画面。"
 
-msgid ""
-"Encode and play a short sequence of video starting from the current preview "
-"position."
+msgid "Encode and play a short sequence of video starting from the current preview position."
 msgstr ""
 
 msgid "<b>Duration:</b>"
-msgstr ""
+msgstr "<b>持续时间:</b>"
 
 msgid "Set the duration of the live preview in seconds."
-msgstr ""
+msgstr "以秒为单位设置实时预览时间。"
 
 msgid "Show Crop"
-msgstr ""
+msgstr "显示裁剪"
 
 msgid "Show Cropped area of the preview"
-msgstr ""
+msgstr "显示预览中被裁剪部分"
 
 msgid "Fullscreen"
-msgstr ""
+msgstr "全屏"
 
 msgid "View Fullscreen Preview"
-msgstr ""
+msgstr "查看全屏预览"
 
 msgid "Title Number:"
-msgstr ""
+msgstr "标题编号:"
 
 msgid "Detected DVD devices:"
-msgstr ""
+msgstr "侦测到 DVD 设备:"
 
 msgid "Setting:"
-msgstr ""
+msgstr "设置:"
 
 msgid "Import SRT"
-msgstr ""
+msgstr "导入 SRT"
 
 msgid "Enable settings to import an SRT subtitle file"
 msgstr ""
 
 msgid "Embedded Subtitle List"
-msgstr ""
+msgstr "内嵌字幕列表"
 
 msgid "Enable settings to select embedded subtitles"
-msgstr ""
+msgstr "允许设置选择的内嵌字幕"
 
 msgid "Character Code"
-msgstr ""
+msgstr "字符编码"
 
 msgid "Offset (ms)"
-msgstr ""
+msgstr "延迟(毫秒)"
 
 msgid ""
 "Set the language of this subtitle.\n"
@@ -1766,42 +1975,44 @@ msgid ""
 msgstr ""
 
 msgid "Select the SRT file to import."
-msgstr ""
+msgstr "选择要导入的 SRT 文件。"
 
 msgid "Srt File"
-msgstr ""
+msgstr "Srt 文件"
 
 msgid "Adjust the offset in milliseconds between video and SRT timestamps"
 msgstr ""
 
 msgid "Track"
-msgstr ""
+msgstr "字幕轨"
 
 msgid "List of subtitle tracks available from your source."
-msgstr ""
+msgstr "您的源文件内所有可用的字幕轨列表。"
 
 msgid "Forced Subtitles Only"
 msgstr ""
 
 msgid "Burn into video"
-msgstr ""
+msgstr "烧录进视频"
 
 msgid ""
 "Render the subtitle over the video.\n"
 "The subtitle will be part of the video and can not be disabled."
 msgstr ""
+"在视频中显示该字幕。\n"
+"字幕将作为视频的一部分,并且不能被禁用。"
 
 msgid "Set Default Track"
-msgstr ""
+msgstr "设置默认轨"
 
 msgid "Source Track"
-msgstr ""
+msgstr "源音轨"
 
 msgid "List of audio tracks available from your source."
-msgstr ""
+msgstr "您的源文件内可用的音频轨列表。"
 
 msgid "Track Name:"
-msgstr ""
+msgstr "音轨名称:"
 
 msgid ""
 "Set the audio track name.\n"
@@ -1813,7 +2024,7 @@ msgid "Mix"
 msgstr ""
 
 msgid "Sample Rate"
-msgstr ""
+msgstr "采样率"
 
 msgid ""
 "<b>Dynamic Range Compression:</b> Adjust the dynamic range of the output audio track.\n"
@@ -1823,37 +2034,45 @@ msgid ""
 msgstr ""
 
 msgid "Enable bitrate setting"
-msgstr ""
+msgstr "启用码率设置"
 
 msgid "Enable quality setting"
-msgstr ""
+msgstr "启用质量设置"
 
-msgid ""
-"<b>Quality:</b> For output codec's that support it, adjust the quality of "
-"the output."
+msgid "<b>Quality:</b> For output codec's that support it, adjust the quality of the output."
 msgstr ""
 
 msgid "00.0"
-msgstr ""
+msgstr "00.0"
 
-msgid ""
-"<b>Audio Gain:</b> Adjust the amplification or attenuation of the output "
-"audio track."
-msgstr "<b>Ganancia de Audio:</b> Ajusta la amplificación o atenuación de la pista de salida de audio"
+msgid "<b>Audio Gain:</b> Adjust the amplification or attenuation of the output audio track."
+msgstr ""
 
 msgid "Skip This Version"
-msgstr ""
+msgstr "跳过此版本"
 
 msgid "Remind Me Later"
-msgstr ""
+msgstr "稍后提醒我"
 
 msgid "<b>A new version of HandBrake is available!</b>"
-msgstr ""
+msgstr "<b>有新版本的 HandBrake 可用!</b>"
 
 msgid "HandBrake xxx is now available (you have yyy)."
-msgstr ""
+msgstr "HandBrake xxx 现在可用 (您拥有 yyy)。"
 
 msgid "<b>Release Notes</b>"
+msgstr "<b>发行说明</b>"
+
+msgid "Burn-In Behavior*:"
+msgstr ""
+
+msgid "Burn-In for deficient players*:"
+msgstr ""
+
+msgid "_Cancel"
+msgstr ""
+
+msgid "_Open"
 msgstr ""
 
 msgid "First Track Matching Selected Languages"
@@ -1863,64 +2082,64 @@ msgid "All Tracks Matching Selected Languages"
 msgstr ""
 
 msgid "Chapters:"
-msgstr ""
+msgstr "章节:"
 
 msgid "Seconds:"
-msgstr ""
+msgstr "秒:"
 
 msgid "Frames:"
-msgstr ""
+msgstr "帧:"
 
 msgid "Do Nothing"
-msgstr ""
+msgstr "啥都不干"
 
 msgid "Show Notification"
-msgstr ""
+msgstr "显示通知"
 
 msgid "Quit Handbrake"
-msgstr ""
+msgstr "退出 Handbrake"
 
 msgid "Put Computer To Sleep"
-msgstr ""
+msgstr "计算机转入休眠"
 
 msgid "Shutdown Computer"
-msgstr ""
+msgstr "关闭计算机"
 
 msgid "Week"
-msgstr ""
+msgstr "星期"
 
 msgid "Month"
-msgstr ""
+msgstr "月"
 
 msgid "Year"
-msgstr ""
+msgstr "年"
 
 msgid "Immortal"
 msgstr ""
 
 msgid "Never"
-msgstr ""
+msgstr "从不"
 
 msgid "Daily"
-msgstr ""
+msgstr "每天"
 
 msgid "Weekly"
-msgstr ""
+msgstr "每周"
 
 msgid "Monthly"
-msgstr ""
+msgstr "每月"
 
 msgid "Default"
-msgstr ""
+msgstr "默认"
 
 msgid "Fast"
-msgstr ""
+msgstr "快速"
 
 msgid "Slow"
-msgstr ""
+msgstr "慢"
 
 msgid "Slower"
-msgstr ""
+msgstr "较慢"
 
 msgid "Ultralight"
 msgstr ""
@@ -1935,7 +2154,7 @@ msgid "Strong"
 msgstr ""
 
 msgid "Film"
-msgstr ""
+msgstr "电影"
 
 msgid "Grain"
 msgstr ""
@@ -1944,7 +2163,7 @@ msgid "High Motion"
 msgstr ""
 
 msgid "Animation"
-msgstr ""
+msgstr "动画"
 
 msgid "Spatial"
 msgstr ""
@@ -1953,16 +2172,16 @@ msgid "Temporal"
 msgstr ""
 
 msgid "Automatic"
-msgstr ""
+msgstr "自动"
 
 msgid "Optimal"
-msgstr ""
+msgstr "最佳"
 
 msgid "Normal"
-msgstr ""
+msgstr "正常"
 
 msgid "Simple"
-msgstr ""
+msgstr "简单"
 
 msgid "Smart"
 msgstr ""
@@ -1983,60 +2202,60 @@ msgid "Hadamard Exhaustive"
 msgstr ""
 
 msgid "Most"
-msgstr ""
+msgstr "大多数"
 
 msgid "Some"
-msgstr ""
+msgstr "一些"
 
 msgid "All"
-msgstr ""
+msgstr "所有"
 
 msgid "Encode only"
-msgstr ""
+msgstr "仅支持编码"
 
 msgid "Always"
-msgstr ""
+msgstr "总是"
 
 msgid "(NTSC Film)"
-msgstr ""
+msgstr "(NTSC 电影)"
 
 msgid "(PAL Film/Video)"
-msgstr ""
+msgstr "(PAL 电影/视频)"
 
 msgid "(NTSC Video)"
-msgstr ""
+msgstr "(NTSC 视频)"
 
 msgid "%d - %02dh%02dm%02ds - %s"
-msgstr ""
+msgstr "%d - %02dh%02dm%02ds - %s"
 
 msgid "%d (%05d.MPLS) - %02dh%02dm%02ds"
-msgstr ""
+msgstr "%d (%05d.MPLS) - %02dh%02dm%02ds"
 
 msgid "%d (%05d.MPLS) - Unknown Length"
-msgstr ""
+msgstr "%d (%05d.MPLS) - Unknown Length"
 
 msgid "%d - %02dh%02dm%02ds"
-msgstr ""
+msgstr "%d - %02dh%02dm%02ds"
 
 msgid "%d - Unknown Length"
 msgstr ""
 
 msgid "No Titles"
-msgstr ""
+msgstr "无标题"
 
 msgid "No Audio"
-msgstr ""
+msgstr "无音频"
 
 msgid "Foreign Audio Search"
 msgstr ""
 
 #, c-format
 msgid "Chapter %2d"
-msgstr ""
+msgstr "章节 %2d"
 
 #, c-format
 msgid "N/A"
-msgstr ""
+msgstr "N/A"
 
 #, c-format
 msgid ""
@@ -2058,6 +2277,9 @@ msgid ""
 "\n"
 "%s\n"
 msgstr ""
+"错误的 Decomb 设置:\n"
+"\n"
+"%s\n"
 
 msgid ""
 "Theora is not supported in the MP4 container.\n"
@@ -2067,7 +2289,7 @@ msgid ""
 msgstr ""
 
 msgid "Continue"
-msgstr ""
+msgstr "继续"
 
 msgid "No title found.\n"
 msgstr ""
@@ -2118,54 +2340,54 @@ msgid ""
 msgstr ""
 
 msgid "Index"
-msgstr ""
+msgstr "序号"
 
 msgid "Duration"
-msgstr ""
+msgstr "持续时长"
 
 msgid "Title"
-msgstr ""
+msgstr "标题"
 
 msgid "Job Information"
-msgstr ""
+msgstr "作业信息"
 
 msgid "Track Information"
-msgstr ""
+msgstr "轨信息"
 
 msgid "Preset Name"
-msgstr ""
+msgstr "预设名称"
 
 msgid "The device or file to encode"
 msgstr ""
 
 msgid "The preset values to use for encoding"
-msgstr ""
+msgstr "用于编码的预设值"
 
 msgid "Spam a lot"
 msgstr ""
 
 msgid "- Transcode media formats"
-msgstr ""
+msgstr "- 转码的媒体格式"
 
 msgid "Globals"
-msgstr ""
+msgstr "全局"
 
 msgid "Presets"
-msgstr ""
+msgstr "预设值"
 
 msgid "Folder"
-msgstr ""
+msgstr "文件夹"
 
 #, c-format
 msgid "%s path: (%s)"
-msgstr ""
+msgstr "%s 路径: (%s)"
 
 #, c-format
 msgid "%s indices: len %d"
 msgstr ""
 
 msgid "Type"
-msgstr ""
+msgstr "类型"
 
 msgid "Failed to find parent folder when adding child."
 msgstr ""
@@ -2175,14 +2397,14 @@ msgstr ""
 
 #, c-format
 msgid "Can't map language value: (%s)"
-msgstr ""
+msgstr "不能映射语言值: (%s)"
 
 #, c-format
 msgid "Can't map value: (%s)"
-msgstr ""
+msgstr "不能映射值: (%s)"
 
 msgid "Subtitles"
-msgstr ""
+msgstr "字幕"
 
 msgid ""
 "%s: Folder already exists.\n"
@@ -2195,35 +2417,38 @@ msgid ""
 msgstr ""
 
 msgid "Import Preset"
-msgstr ""
+msgstr "导入预设"
 
 msgid "All (*)"
-msgstr ""
+msgstr "所有 (*)"
 
 msgid "Presets (*.plist)"
-msgstr ""
+msgstr "预设(*.plist)"
 
 msgid "Export Preset"
-msgstr ""
+msgstr "导出预设"
 
 msgid ""
 "Confirm deletion of %s:\n"
 "\n"
 "%s"
 msgstr ""
+"确认删除 %s:\n"
+"\n"
+"%s"
 
 msgid "folder"
-msgstr ""
+msgstr "文件夹"
 
 msgid "preset"
-msgstr ""
+msgstr "预设"
 
 msgid "No selection???  Perhaps unselected."
-msgstr ""
+msgstr "无选择???  也许是不选。"
 
 #, c-format
 msgid "Gstreamer Error: %s"
-msgstr ""
+msgstr "Gstreamer 出错: %s"
 
 #, c-format
 msgid ""
@@ -2234,26 +2459,23 @@ msgid ""
 msgstr ""
 
 msgid "Done"
-msgstr ""
+msgstr "完成"
 
 msgid "Windowed"
-msgstr ""
+msgstr "窗口"
 
 msgid "Seconds"
-msgstr ""
+msgstr "秒"
 
 msgid "Frames"
-msgstr ""
+msgstr "帧"
 
 #, c-format
-msgid ""
-"<big><b>%s</b></big> <small>(Title %d, %s %d through %d, 2 Video Passes) -->"
-" %s</small>"
+msgid "<big><b>%s</b></big> <small>(Title %d, %s %d through %d, 2 Video Passes) --> %s</small>"
 msgstr ""
 
 #, c-format
-msgid ""
-"<big><b>%s</b></big> <small>(Title %d, %s %d through %d) --> %s</small>"
+msgid "<big><b>%s</b></big> <small>(Title %d, %s %d through %d) --> %s</small>"
 msgstr ""
 
 #, c-format
@@ -2273,19 +2495,19 @@ msgstr ""
 
 #, c-format
 msgid "%sChapter Markers"
-msgstr ""
+msgstr "%s章节标记"
 
 #, c-format
 msgid "%siPod 5G Support"
-msgstr ""
+msgstr "%siPod 5G 支持"
 
 #, c-format
 msgid "%sWeb Optimized"
-msgstr ""
+msgstr "%s网站优化"
 
 #, c-format
 msgid "%sLarge File Size (>4GB)"
-msgstr ""
+msgstr "%s大文件 (>4GB)"
 
 #, c-format
 msgid "<b>Destination:</b> <small>%s</small>\n"
@@ -2312,7 +2534,7 @@ msgstr ""
 
 #, c-format
 msgid ", Display %d x %d"
-msgstr ""
+msgstr ", 显示 %d x %d"
 
 msgid "<b>Filters:</b><small>"
 msgstr ""
@@ -2343,7 +2565,7 @@ msgstr ""
 
 #, c-format
 msgid "<b>Video:</b> <small>%s"
-msgstr ""
+msgstr "<b>视频:</b> <small>%s"
 
 #, c-format
 msgid ", Framerate: %s %s"
@@ -2358,30 +2580,30 @@ msgid ", Framerate: %s (constant frame rate)"
 msgstr ""
 
 msgid "Error"
-msgstr ""
+msgstr "错误"
 
 msgid "Bitrate:"
-msgstr ""
+msgstr "码率:"
 
 msgid "Bitrate"
-msgstr ""
+msgstr "码率"
 
 msgid "Quality"
-msgstr ""
+msgstr "质量"
 
 msgid "<b>Turbo 1st Pass:</b> <small>On</small>\n"
 msgstr ""
 
 #, c-format
 msgid "<b>Video Options:</b> <small>Preset: %s</small>"
-msgstr ""
+msgstr "<b>视频选项:</b> <small>预设 %s</small>"
 
 msgid "<small> - Tune: "
-msgstr ""
+msgstr "<small> - 调整: "
 
 #, c-format
 msgid "<small> - Profile: %s</small>"
-msgstr ""
+msgstr "<small> - 配置文件: %s</small>"
 
 #, c-format
 msgid "<small> - Level: %s</small>"
@@ -2389,18 +2611,18 @@ msgstr ""
 
 #, c-format
 msgid "<b>Advanced Options:</b> <small>%s</small>\n"
-msgstr ""
+msgstr "<b>高级选项:</b> <small>%s</small>\n"
 
 msgid "<b>Audio:</b> <small>"
-msgstr ""
+msgstr "<b>音频:</b> <small>"
 
 #, c-format
 msgid "<b>Audio Tracks: %d</b><small>"
-msgstr ""
+msgstr "<b>音轨: %d</b><small>"
 
 #, c-format
 msgid "Bitrate: %d"
-msgstr ""
+msgstr "码率: %d"
 
 #, c-format
 msgid "%s --> Encoder: %s"
@@ -2411,11 +2633,11 @@ msgid "%s --> Encoder: %s, Mixdown: %s, SampleRate: %s, %s"
 msgstr ""
 
 msgid "<b>Subtitle:</b> "
-msgstr ""
+msgstr "<b>字幕:</b> "
 
 #, c-format
 msgid "<b>Subtitle Tracks: %d</b>\n"
-msgstr ""
+msgstr "<b>字幕轨道:%d</b>\n"
 
 msgid " (Force)"
 msgstr ""
@@ -2424,7 +2646,7 @@ msgid " (Burn)"
 msgstr ""
 
 msgid " (Default)"
-msgstr ""
+msgstr " (默认)"
 
 #, c-format
 msgid "<small> %s (%s), %s, Offset (ms) %d%s</small>\n"
@@ -2439,7 +2661,7 @@ msgid ""
 msgstr ""
 
 msgid "Overwrite"
-msgstr ""
+msgstr "覆盖"
 
 #, c-format
 msgid ""
@@ -2447,6 +2669,9 @@ msgid ""
 "\n"
 "This is not a valid directory."
 msgstr ""
+"目标: %s\n"
+"\n"
+"这不是一个有效的目录。"
 
 #, c-format
 msgid ""
@@ -2454,6 +2679,9 @@ msgid ""
 "\n"
 "Can not read or write the directory."
 msgstr ""
+"目标: %s\n"
+"\n"
+"不能读取或写入该目录。"
 
 #, c-format
 msgid ""
@@ -2461,9 +2689,12 @@ msgid ""
 "\n"
 "Encode may be incomplete if you proceed.\n"
 msgstr ""
+"目标文件系统几乎已满: %uM 空闲\n"
+"\n"
+"如果您继续的话,编码可能不完整。\n"
 
 msgid "Proceed"
-msgstr ""
+msgstr "继续"
 
 #, c-format
 msgid ""
@@ -2472,6 +2703,10 @@ msgid ""
 "File already exists.\n"
 "Do you want to overwrite?"
 msgstr ""
+"目标: %s\n"
+"\n"
+"文件已经存在。\n"
+"您是否想覆盖它?"
 
 msgid ""
 "<span foreground='red' weight='bold'>Duplicate destination files detected.\n"
@@ -2479,7 +2714,7 @@ msgid ""
 msgstr ""
 
 msgid "No Title"
-msgstr ""
+msgstr "无标题 "
 
 msgid ""
 "There is another title with the same destination file name.\n"
@@ -2488,28 +2723,28 @@ msgid ""
 msgstr ""
 
 msgid "Stop"
-msgstr ""
+msgstr "停止"
 
 msgid "Stop Encoding"
-msgstr ""
+msgstr "停止编码"
 
 msgid "Resume"
-msgstr ""
+msgstr "继续"
 
 msgid "Resume Encoding"
-msgstr ""
+msgstr "继续编码"
 
 msgid "S_top Queue"
-msgstr ""
+msgstr "停止队列(_T)"
 
 msgid "_Start Queue"
-msgstr ""
+msgstr "开始队列(_S)"
 
 msgid "_Resume Queue"
-msgstr ""
+msgstr "继续队列(_R)"
 
 msgid "Resume Queue"
-msgstr ""
+msgstr "继续队列"
 
 msgid ""
 "You are currently encoding.  What would you like to do?\n"
@@ -2524,64 +2759,64 @@ msgid ""
 msgstr ""
 
 msgid "No"
-msgstr ""
+msgstr "不"
 
 msgid "Yes"
-msgstr ""
+msgstr "是"
 
 #, c-format
 msgid "Usage: %s infile [outfile]\n"
-msgstr ""
+msgstr "使用: %s 内部文件 [外部文件]\n"
 
 #, c-format
 msgid "Offset: %dms"
-msgstr ""
+msgstr "偏移: %dms"
 
 msgid "Burned Into Video"
-msgstr ""
+msgstr "刻录到视频"
 
 msgid "Passthrough"
-msgstr ""
+msgstr "通过"
 
 msgid "through"
-msgstr ""
+msgstr "直到"
 
 msgid "(Forced Subtitles Only)"
 msgstr ""
 
 msgid "(Default)"
-msgstr ""
+msgstr "(默认)"
 
 msgid "Error!"
-msgstr ""
+msgstr "错误!"
 
 #, c-format
 msgid "Preferred Language: %s"
-msgstr ""
+msgstr "首选语言: %s"
 
 #, c-format
 msgid "Add %s subtitle track if default audio is not %s"
-msgstr ""
+msgstr "添加 %s 如果默认音频是不是字幕轨道 %s"
 
 #, c-format
 msgid "Type %s"
-msgstr ""
+msgstr "类型 %s"
 
 #, c-format
 msgid "Type %s value %s"
-msgstr ""
+msgstr "存在 %s 的值 %s"
 
 #, c-format
 msgid "Type %s value %d"
-msgstr ""
+msgstr "类型 %s 的值 %d"
 
 #, c-format
 msgid "Type %s value %<PRId64>"
-msgstr ""
+msgstr "类型 %s 的值 %<PRId64>"
 
 #, c-format
 msgid "Type %s value %f"
-msgstr ""
+msgstr "类型 %s 的值 %f"
 
 #, c-format
 msgid ""
@@ -2590,6 +2825,9 @@ msgid ""
 "Expanded Options:\n"
 "\"%s\""
 msgstr ""
+"%s\n"
+"扩展选项::\n"
+"\"%s\""
 
 #, c-format
 msgid ""
@@ -2598,9 +2836,13 @@ msgid ""
 "Expanded Options:\n"
 "\"\""
 msgstr ""
+"%s\n"
+"\n"
+"扩展选项::\n"
+"\"\""
 
 msgid "Any"
-msgstr ""
+msgstr "任何"
 
 msgid "0: SAD, no subpel"
 msgstr ""
@@ -2630,7 +2872,7 @@ msgid "11: No early terminations in analysis"
 msgstr ""
 
 msgid "Your names"
-msgstr ""
+msgstr "您的名称"
 
 msgid "Your emails"
-msgstr ""
+msgstr "您的邮箱"
diff --git a/gtk/src/appcast.c b/gtk/src/appcast.c
index 43e45b6..1132f66 100644
--- a/gtk/src/appcast.c
+++ b/gtk/src/appcast.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * appcast.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * appcast.c is free software.
  *
@@ -9,6 +9,17 @@
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * appcast.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <stdio.h>
diff --git a/gtk/src/appcast.h b/gtk/src/appcast.h
index 06e54fa..8d32a3d 100644
--- a/gtk/src/appcast.h
+++ b/gtk/src/appcast.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * appcast.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * appcast.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * appcast.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_GHB_APPCAST_H_)
 #define _GHB_APPCAST_H_
 
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index 4aef136..0137b9f 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * audiohandler.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * audiohandler.c is free software.
  *
@@ -9,6 +9,17 @@
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * audiohandler.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <glib/gi18n.h>
diff --git a/gtk/src/audiohandler.h b/gtk/src/audiohandler.h
index b0afdac..0014c3b 100644
--- a/gtk/src/audiohandler.h
+++ b/gtk/src/audiohandler.h
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * audiohandler.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * audiohandler.h is free software.
  *
@@ -10,7 +10,7 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
- * callbacks.h is distributed in the hope that it will be useful,
+ * audiohandler.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index afe0a56..e92c7ed 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * callbacks.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * callbacks.c is free software.
  *
@@ -9,6 +9,17 @@
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * callbacks.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/gtk/src/callbacks.h b/gtk/src/callbacks.h
index 50d3005..31dd16a 100644
--- a/gtk/src/callbacks.h
+++ b/gtk/src/callbacks.h
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * callbacks.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * callbacks.h is free software.
  *
diff --git a/gtk/src/composite_example.c b/gtk/src/composite_example.c
index 7918b30..f241ede 100644
--- a/gtk/src/composite_example.c
+++ b/gtk/src/composite_example.c
@@ -1,3 +1,26 @@
+/*
+ * compositor_example.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * compositor_example.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * compositor_example.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <gtk/gtk.h>
 #include "ghbcompositor.h"
 
diff --git a/gtk/src/create_resources.c b/gtk/src/create_resources.c
index 3bd3c23..47f03b2 100644
--- a/gtk/src/create_resources.c
+++ b/gtk/src/create_resources.c
@@ -1,3 +1,26 @@
+/*
+ * create_resources.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * create_resources.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * create_resources.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/gtk/src/ghb-dvd.c b/gtk/src/ghb-dvd.c
index a616040..0a587d5 100644
--- a/gtk/src/ghb-dvd.c
+++ b/gtk/src/ghb-dvd.c
@@ -1,40 +1,24 @@
-/***************************************************************************
- *            ghb-dvd.c
- *
- *  Sat Apr 19 11:12:53 2008
- *  Copyright  2008-2015  John Stebbins
- *  <john at stebbins dot name>
- ****************************************************************************/
-
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * ghb-dvd.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * ghb-dvd.c is free software.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
- */
-
-// Well, I waisted a bit of time on this.  It seems libhb has a function for
-// this that I hadn't discovered yet. hb_dvd_name().
-
-// I borrowed most of this from the udev utility vol_id
-// Here is the authors copyright.
-/*
- * volume_id - reads filesystem label and uuid
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
  *
- * Copyright (C) 2004 Kay Sievers <kay.sievers at vrfy.org>
+ * ghb-dvd.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms of the GNU General Public License as published by the
- *  Free Software Foundation version 2 of the License.
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #if defined(_WIN32)
diff --git a/gtk/src/ghb-dvd.h b/gtk/src/ghb-dvd.h
index f556d01..016adc7 100644
--- a/gtk/src/ghb-dvd.h
+++ b/gtk/src/ghb-dvd.h
@@ -1,17 +1,24 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * ghb-dvd.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * ghb-dvd.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghb-dvd.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #if !defined(_GHB_DVD_H_)
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 2a3d976..f406d63 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -346,8 +346,8 @@ conjunction with the "Forced" option.</property>
     <property name="skip_pager_hint">True</property>
     <property name="program_name">HandBrake</property>
     <property name="version">0.9.2</property>
-    <property name="copyright" translatable="yes">Copyright © 2008 - 2015 John Stebbins
-Copyright © 2004 - 2015, HandBrake Devs</property>
+    <property name="copyright" translatable="yes">Copyright © 2008 - 2016 John Stebbins
+Copyright © 2004 - 2016, HandBrake Devs</property>
     <property name="comments" translatable="yes">HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.</property>
     <property name="website">http://handbrake.fr</property>
     <property name="website_label" translatable="yes">http://handbrake.fr</property>
@@ -1562,7 +1562,6 @@ This allows a player to initiate playback before downloading the entire file.</p
                 <property name="shadow_type">none</property>
                 <property name="margin-right">6</property>
                 <property name="margin-bottom">6</property>
-                <signal name="size-allocate" handler="presets_frame_size_allocate_cb" swapped="no"/>
                 <child>
                   <object class="GtkScrolledWindow" id="presets_scroll">
                     <property name="visible">True</property>
diff --git a/gtk/src/ghbcellrenderertext.c b/gtk/src/ghbcellrenderertext.c
index deef928..b110340 100644
--- a/gtk/src/ghbcellrenderertext.c
+++ b/gtk/src/ghbcellrenderertext.c
@@ -1,20 +1,25 @@
-/* gtkcellrenderertext.c
- * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb at redhat.com>
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gtkcellrenderertext.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * ghbcellrenderer.c is free software.
  *
- * This library is distributed in the hope that it will be useful,
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghbcellrenderer.c is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <config.h>
diff --git a/gtk/src/ghbcellrenderertext.h b/gtk/src/ghbcellrenderertext.h
index 4d6176f..f08eaca 100644
--- a/gtk/src/ghbcellrenderertext.h
+++ b/gtk/src/ghbcellrenderertext.h
@@ -16,6 +16,28 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+/*
+ * ghbcellrenderertext.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * callbacks.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghbcellrenderertext.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
 
 #ifndef __GHB_CELL_RENDERER_TEXT_H__
 #define __GHB_CELL_RENDERER_TEXT_H__
diff --git a/gtk/src/ghbcompat.h b/gtk/src/ghbcompat.h
index 4e95951..0c5ddbb 100644
--- a/gtk/src/ghbcompat.h
+++ b/gtk/src/ghbcompat.h
@@ -1,3 +1,26 @@
+/*
+ * ghbcompat.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * ghbcompat.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghbcompat.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #if !defined(_GHB_COMPAT_H_)
 #define _GHB_COMPAT_H_
 
diff --git a/gtk/src/ghbcompositor.c b/gtk/src/ghbcompositor.c
index 4e7353d..a3c08c6 100644
--- a/gtk/src/ghbcompositor.c
+++ b/gtk/src/ghbcompositor.c
@@ -25,6 +25,29 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
+/*
+ * ghbcompositor.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * compositor.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghbcompositor.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <config.h>
 #include <stdlib.h>
 #include "ghbcompat.h"
diff --git a/gtk/src/ghbcompositor.h b/gtk/src/ghbcompositor.h
index 7f6914e..c298d81 100644
--- a/gtk/src/ghbcompositor.h
+++ b/gtk/src/ghbcompositor.h
@@ -24,6 +24,30 @@
  * files for a list of changes.  These files are distributed with
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
+
+/*
+ * ghbcompositor.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * ghbcompositor.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ghbcompositor.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #ifndef __GHB_COMPOSITOR_H__
 #define __GHB_COMPOSITOR_H__
 
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index ab8d0dc..b6f650e 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1,26 +1,26 @@
-/***************************************************************************
- *            hb-backend.c
- *
- *  Fri Mar 28 10:38:44 2008
- *  Copyright  2008-2015  John Stebbins
- *  <john at stebbins dot name>
- ****************************************************************************/
-
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * hb-backend.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * hb-backend.c is free software.
  *
- * This program is distributed in the hope that it will be useful,
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * hb-backend.c is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #define _GNU_SOURCE
 #include <limits.h>
 #include <math.h>
diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h
index 4d946fc..865d714 100644
--- a/gtk/src/hb-backend.h
+++ b/gtk/src/hb-backend.h
@@ -1,17 +1,24 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * hb-backend.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * hb-backend.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * hb-backend.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #if !defined(_HBBACKEND_H_)
diff --git a/gtk/src/icons.c b/gtk/src/icons.c
index aef0b05..c27a5c8 100644
--- a/gtk/src/icons.c
+++ b/gtk/src/icons.c
@@ -1,3 +1,26 @@
+/*
+ * icons.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * icons.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * icons.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include "ghbcompat.h"
 #include "values.h"
 #include "resources.h"
diff --git a/gtk/src/icons.h b/gtk/src/icons.h
index 2dbe85c..2a86870 100644
--- a/gtk/src/icons.h
+++ b/gtk/src/icons.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * icons.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * icons.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * icons.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_GHB_ICONS_H_)
 #define _GHB_ICONS_H_
 
diff --git a/gtk/src/ini_to_plist.c b/gtk/src/ini_to_plist.c
index fd20323..6f7ec54 100644
--- a/gtk/src/ini_to_plist.c
+++ b/gtk/src/ini_to_plist.c
@@ -1,3 +1,26 @@
+/*
+ * ini_to_plist.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * ini_to_plist.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * ini_to_plist.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <glib.h>
 #include <glib-object.h>
 #include <glib/gstdio.h>
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 8d63dd2..d367cc3 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * main.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * main.c is free software.
  *
diff --git a/gtk/src/marshalers.c b/gtk/src/marshalers.c
index 39c6d36..eb7079c 100644
--- a/gtk/src/marshalers.c
+++ b/gtk/src/marshalers.c
@@ -1,3 +1,25 @@
+/*
+ * marshalers.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * marshalers.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * marshalers.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
 
 #include    <glib-object.h>
 
diff --git a/gtk/src/marshalers.h b/gtk/src/marshalers.h
index 0eec752..b005c43 100644
--- a/gtk/src/marshalers.h
+++ b/gtk/src/marshalers.h
@@ -1,3 +1,25 @@
+/*
+ * marshalers.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * marshalers.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * marshalers.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
 
 #ifndef __ghb_marshal_MARSHAL_H__
 #define __ghb_marshal_MARSHAL_H__
diff --git a/gtk/src/plist.c b/gtk/src/plist.c
index 9581b77..c1f43f7 100644
--- a/gtk/src/plist.c
+++ b/gtk/src/plist.c
@@ -1,3 +1,26 @@
+/*
+ * plist.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * plist.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * plist.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
diff --git a/gtk/src/plist.h b/gtk/src/plist.h
index 8b24988..11ce159 100644
--- a/gtk/src/plist.h
+++ b/gtk/src/plist.h
@@ -1,3 +1,26 @@
+/*
+ * plist.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * plist.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * plist.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #if !defined(_PLIST_H_)
 #define _PLIST_H_
 
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 6d3b099..dc43d0f 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * presets.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * presets.c is free software.
  *
@@ -10,6 +10,16 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
+ * presets.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1082,6 +1092,8 @@ ghb_select_preset2(
             if (gtk_tree_model_get_iter_first(store, &iter))
                 gtk_tree_selection_select_iter (selection, &iter);
         }
+        // Make the selection visible in scroll window if it is not.
+        gtk_tree_view_scroll_to_cell(treeview, path, NULL, FALSE, 0, 0);
         gtk_tree_path_free(path);
     }
 }
@@ -4252,26 +4264,6 @@ ghb_clear_presets_selection(signal_user_data_t *ud)
 }
 
 G_MODULE_EXPORT void
-presets_frame_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, signal_user_data_t *ud)
-{
-    GtkTreeView *treeview;
-    GtkTreeSelection *selection;
-    GtkTreeModel *store;
-    GtkTreeIter iter;
-
-    treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
-    selection = gtk_tree_view_get_selection(treeview);
-    if (gtk_tree_selection_get_selected(selection, &store, &iter))
-    {
-        GtkTreePath *path;
-        path = gtk_tree_model_get_path (store, &iter);
-        // Make the parent visible in scroll window if it is not.
-        gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0);
-        gtk_tree_path_free(path);
-    }
-}
-
-G_MODULE_EXPORT void
 presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
 {
     GValue *preset;
diff --git a/gtk/src/presets.h b/gtk/src/presets.h
index add5eac..2dd8849 100644
--- a/gtk/src/presets.h
+++ b/gtk/src/presets.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * presets.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * presets.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * presets.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_GHB_PRESETS_H_)
 #define _GHB_PRESETS_H_
 
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 2497e72..ddb135f 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * preview.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * preview.c is free software.
  *
@@ -10,7 +10,18 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
+ * preview.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #include <unistd.h>
 #include <glib.h>
 #include <glib/gstdio.h>
diff --git a/gtk/src/preview.h b/gtk/src/preview.h
index bca4b64..1163333 100644
--- a/gtk/src/preview.h
+++ b/gtk/src/preview.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * preview.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * preview.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * preview.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_GHB_PREVIEW_H_)
 #define _GHB_PREVIEW_H_
 
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index 84c7773..45c803f 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -1,14 +1,25 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * callbacks.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * queuehandler.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * callbacks.c is free software.
+ * queuehandler.c is free software.
  *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * queuehandler.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include "ghbcompat.h"
@@ -1608,6 +1619,12 @@ queue_drag_motion_cb(
     GtkTreeSelection *select;
     GtkWidget *widget;
 
+    int height;
+
+    height = gtk_widget_get_allocated_height(GTK_WIDGET(tv));
+    if (y <= 6 || y >= height - 6)
+        return FALSE;
+
     widget = gtk_drag_get_source_widget(ctx);
     if (widget == NULL || widget != GTK_WIDGET(tv))
         return TRUE;
diff --git a/gtk/src/queuehandler.h b/gtk/src/queuehandler.h
index 2b1a188..0bbb857 100644
--- a/gtk/src/queuehandler.h
+++ b/gtk/src/queuehandler.h
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * queuehandler.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * queuehandler.h is free software.
  *
@@ -10,7 +10,7 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
- * callbacks.h is distributed in the hope that it will be useful,
+ * queuehandler.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
diff --git a/gtk/src/quotestring.c b/gtk/src/quotestring.c
index f29969b..09f0667 100644
--- a/gtk/src/quotestring.c
+++ b/gtk/src/quotestring.c
@@ -1,3 +1,26 @@
+/*
+ * quotestring.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * quotestring.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * quotestring.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include <stdio.h>
 #include <string.h>
 #include <libgen.h>
diff --git a/gtk/src/renderer_button.c b/gtk/src/renderer_button.c
index 1eb1408..7b1f051 100644
--- a/gtk/src/renderer_button.c
+++ b/gtk/src/renderer_button.c
@@ -1,3 +1,26 @@
+/*
+ * render_button.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * render_button.c is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * render_button.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #include "marshalers.h"
 #include "renderer_button.h"
 
diff --git a/gtk/src/renderer_button.h b/gtk/src/renderer_button.h
index 4c2f1f9..f8e65f3 100644
--- a/gtk/src/renderer_button.h
+++ b/gtk/src/renderer_button.h
@@ -1,3 +1,26 @@
+/*
+ * render_button.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
+ *
+ * render_button.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * render_button.h is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
+ */
+
 #ifndef _RENDERER_BUTTON_H_
 #define _RENDERER_BUTTON_H_
 
diff --git a/gtk/src/resources.c b/gtk/src/resources.c
index d0b5dee..916c22c 100644
--- a/gtk/src/resources.c
+++ b/gtk/src/resources.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * resources.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * resources.c is free software.
  *
@@ -10,7 +10,18 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
+ * resources.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #include <glib.h>
 #include <glib-object.h>
 #include <glib/gstdio.h>
diff --git a/gtk/src/resources.h b/gtk/src/resources.h
index c9378ac..878e864 100644
--- a/gtk/src/resources.h
+++ b/gtk/src/resources.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * resources.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * resources.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * resources.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_RESOURCES_H_)
 #define _RESOURCES_H_
 
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index a12d71c..738a6dc 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * settings.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * settings.c is free software.
  *
@@ -10,7 +10,18 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
+ * settings.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #include <fcntl.h>
 #include <unistd.h>
 #include <glib.h>
diff --git a/gtk/src/settings.h b/gtk/src/settings.h
index 2367bcb..e130614 100644
--- a/gtk/src/settings.h
+++ b/gtk/src/settings.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * settings.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * settings.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * settings.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_SETTINGS_H_)
 #define _SETTINGS_H_
 
diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c
index 960fdb0..fedd85c 100644
--- a/gtk/src/subtitlehandler.c
+++ b/gtk/src/subtitlehandler.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * subtitlehandler.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * subtitlehandler.c is free software.
  *
@@ -9,6 +9,17 @@
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * subtitlehandler.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <glib/gi18n.h>
@@ -513,7 +524,7 @@ ghb_set_pref_subtitle_settings(signal_user_data_t *ud, const hb_title_t *title,
         // is foreign language.
         foreign_audio_search = FALSE;
         track = ghb_find_subtitle_track(title, pref_lang, 0);
-        if (track > 0)
+        if (track >= 0)
         {
             used[track] = TRUE;
             subtitle_add_track(ud, settings, title, track, mux->format,
diff --git a/gtk/src/subtitlehandler.h b/gtk/src/subtitlehandler.h
index 597d82f..ad7d3c4 100644
--- a/gtk/src/subtitlehandler.h
+++ b/gtk/src/subtitlehandler.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * subtitlehandler.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * audiohandler.h is free software.
+ * subtitlehandler.h is free software.
  *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
- * callbacks.h is distributed in the hope that it will be useful,
+ * subtitlehandler.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
diff --git a/gtk/src/values.c b/gtk/src/values.c
index 39f7303..f9dc2be 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -1,15 +1,25 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * presets.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * values.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * presets.c is free software.
+ * values.c is free software.
  *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
+ * values.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <glib.h>
diff --git a/gtk/src/values.h b/gtk/src/values.h
index f58b2db..c1e54a7 100644
--- a/gtk/src/values.h
+++ b/gtk/src/values.h
@@ -1,18 +1,26 @@
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * values.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * This program is distributed in the hope that it will be useful,
+ * values.h is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * values.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Library General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
+ * along with callbacks.h.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
+
 #if !defined(_GHB_VALUES_H_)
 #define _GHB_VALUES_H_
 
diff --git a/gtk/src/videohandler.c b/gtk/src/videohandler.c
index 2f955a3..19414eb 100644
--- a/gtk/src/videohandler.c
+++ b/gtk/src/videohandler.c
@@ -1,14 +1,25 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * callbacks.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * videohandler.c
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * callbacks.c is free software.
+ * videohandler.c is free software.
  *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * videohandler.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <glib/gi18n.h>
diff --git a/gtk/src/videohandler.h b/gtk/src/videohandler.h
index b649f93..da3af3b 100644
--- a/gtk/src/videohandler.h
+++ b/gtk/src/videohandler.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
- * audiohandler.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * videohandler.h
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
- * audiohandler.h is free software.
+ * videohandler.h is free software.
  *
  * You may redistribute it and/or modify it under the terms of the
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
- * callbacks.h is distributed in the hope that it will be useful,
+ * videohandler.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index 4da46ea..53a3757 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * x264handler.c
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * x264handler.c is free software.
  *
@@ -9,6 +9,17 @@
  * GNU General Public License, as published by the Free Software
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
+ *
+ * x264handler.c is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with main.c.  If not, write to:
+ *  The Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor
+ *  Boston, MA  02110-1301, USA.
  */
 
 #include <glib/gi18n.h>
diff --git a/gtk/src/x264handler.h b/gtk/src/x264handler.h
index b827e56..d5a354e 100644
--- a/gtk/src/x264handler.h
+++ b/gtk/src/x264handler.h
@@ -1,7 +1,7 @@
 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 /*
  * x264handler.h
- * Copyright (C) John Stebbins 2008-2015 <stebbins at stebbins>
+ * Copyright (C) John Stebbins 2008-2016 <stebbins at stebbins>
  *
  * x264handler.h is free software.
  *
@@ -10,7 +10,7 @@
  * Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
- * callbacks.h is distributed in the hope that it will be useful,
+ * x264handler.h is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU General Public License for more details.
diff --git a/libhb/audio_remap.c b/libhb/audio_remap.c
index d1efcc3..27684f7 100644
--- a/libhb/audio_remap.c
+++ b/libhb/audio_remap.c
@@ -1,6 +1,6 @@
 /* audio_remap.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/audio_remap.h b/libhb/audio_remap.h
index b778f1f..77a4190 100644
--- a/libhb/audio_remap.h
+++ b/libhb/audio_remap.h
@@ -1,6 +1,6 @@
 /* audio_remap.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/audio_resample.c b/libhb/audio_resample.c
index e223d98..7f0885d 100644
--- a/libhb/audio_resample.c
+++ b/libhb/audio_resample.c
@@ -1,6 +1,6 @@
 /* audio_resample.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/audio_resample.h b/libhb/audio_resample.h
index d86013f..6457a4a 100644
--- a/libhb/audio_resample.h
+++ b/libhb/audio_resample.h
@@ -1,6 +1,6 @@
 /* audio_resample.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/batch.c b/libhb/batch.c
index 3aca6b0..4c4f24c 100644
--- a/libhb/batch.c
+++ b/libhb/batch.c
@@ -1,6 +1,6 @@
 /* batch.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/bd.c b/libhb/bd.c
index 0397e4e..a82cf68 100644
--- a/libhb/bd.c
+++ b/libhb/bd.c
@@ -1,6 +1,6 @@
 /* dvd.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/bits.h b/libhb/bits.h
index 80d9ce1..c34d608 100644
--- a/libhb/bits.h
+++ b/libhb/bits.h
@@ -1,6 +1,6 @@
 /* bits.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/colormap.c b/libhb/colormap.c
index 6f1b0f1..dfed44f 100644
--- a/libhb/colormap.c
+++ b/libhb/colormap.c
@@ -1,6 +1,6 @@
 /* colormap.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/colormap.h b/libhb/colormap.h
index a46f22c..8ff55b5 100644
--- a/libhb/colormap.h
+++ b/libhb/colormap.h
@@ -1,6 +1,6 @@
 /* colormap.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/common.c b/libhb/common.c
index 17dc0d4..ac48f14 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -1,6 +1,6 @@
 /* common.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/common.h b/libhb/common.h
index 6ab5e8c..2e2ce73 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -1,6 +1,6 @@
 /* common.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -1147,7 +1147,6 @@ extern hb_work_object_t hb_encx265;
 extern hb_work_object_t hb_decavcodeca;
 extern hb_work_object_t hb_decavcodecv;
 extern hb_work_object_t hb_declpcm;
-extern hb_work_object_t hb_enclame;
 extern hb_work_object_t hb_encvorbis;
 extern hb_work_object_t hb_muxer;
 extern hb_work_object_t hb_encca_aac;
diff --git a/libhb/cropscale.c b/libhb/cropscale.c
index 23964a7..a9ab446 100644
--- a/libhb/cropscale.c
+++ b/libhb/cropscale.c
@@ -1,6 +1,6 @@
 /* cropscale.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -202,6 +202,12 @@ static hb_buffer_t* crop_scale( hb_filter_private_t * pv, hb_buffer_t * in )
             pv->pix_fmt   = in->f.fmt;
         }
         
+        if (pv->context == NULL)
+        {
+            hb_buffer_close(&out);
+            return NULL;
+        }
+
         // Scale pic_crop into pic_render according to the
         // context set up above
         sws_scale(pv->context,
diff --git a/libhb/deblock.c b/libhb/deblock.c
index 1d50fc5..a695dc6 100644
--- a/libhb/deblock.c
+++ b/libhb/deblock.c
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2005 Michael Niedermayer <michaelni at gmx.at>
+ Copyright (C) 2005-2016 Michael Niedermayer <michaelni at gmx.at>
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 2029aa2..2ae59b2 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1,6 +1,6 @@
 /* decavcodec.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -537,6 +537,14 @@ static int decavcodecaWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
     hb_work_private_t * pv = w->private_data;
     hb_buffer_t * in = *buf_in;
 
+    // libavcodec/mpeg12dec.c requires buffers to be zero padded.
+    // If not zero padded, it can get stuck in an infinite loop.
+    // It's likely there are other decoders that expect the same.
+    if (in->data != NULL)
+    {
+        memset(in->data + in->size, 0, in->alloc - in->size);
+    }
+
     if ( in->size <= 0 )
     {
         /* EOF on input stream - send it downstream & say that we're done */
@@ -1810,6 +1818,14 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
     *buf_in = NULL;
     *buf_out = NULL;
 
+    // libavcodec/mpeg12dec.c requires buffers to be zero padded.
+    // If not zero padded, it can get stuck in an infinite loop.
+    // It's likely there are other decoders that expect the same.
+    if (in->data != NULL)
+    {
+        memset(in->data + in->size, 0, in->alloc - in->size);
+    }
+
     /* if we got an empty buffer signaling end-of-stream send it downstream */
     if ( in->size == 0 )
     {
diff --git a/libhb/deccc608sub.c b/libhb/deccc608sub.c
index d573627..b55ad0e 100644
--- a/libhb/deccc608sub.c
+++ b/libhb/deccc608sub.c
@@ -1,6 +1,6 @@
 /* deccc608sub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/deccc608sub.h b/libhb/deccc608sub.h
index 129236b..cd20180 100644
--- a/libhb/deccc608sub.h
+++ b/libhb/deccc608sub.h
@@ -1,6 +1,6 @@
 /* deccc608sub.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/declpcm.c b/libhb/declpcm.c
index 4475310..cc13e95 100644
--- a/libhb/declpcm.c
+++ b/libhb/declpcm.c
@@ -1,6 +1,6 @@
 /* declpcm.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decomb.c b/libhb/decomb.c
index 375ac53..eb6f0a3 100644
--- a/libhb/decomb.c
+++ b/libhb/decomb.c
@@ -1,6 +1,6 @@
 /* decomb.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decpgssub.c b/libhb/decpgssub.c
index 99ed8be..3615f68 100644
--- a/libhb/decpgssub.c
+++ b/libhb/decpgssub.c
@@ -1,6 +1,6 @@
 /* decpgssub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c
index 74d153f..9173fff 100644
--- a/libhb/decsrtsub.c
+++ b/libhb/decsrtsub.c
@@ -1,6 +1,6 @@
 /* decsrtsub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -475,7 +475,6 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
             {
                 long length;
                 char *p, *q;
-                int  line = 1;
                 uint64_t start_time = ( pv->current_entry.start +
                                         pv->subtitle->config.offset ) * 90;
                 uint64_t stop_time = ( pv->current_entry.stop +
@@ -494,7 +493,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
 
                 for (q = p = pv->current_entry.text; *p != '\0'; p++)
                 {
-                    if (*p == '\n' || *p == '\r')
+                    if (*p == '\r')
                     {
                         if (*(p + 1) == '\n' || *(p + 1) == '\r' ||
                             *(p + 1) == '\0')
@@ -503,18 +502,8 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
                             length--;
                             continue;
                         }
-                        else if (line == 1)
-                        {
-                            // replace '\r' with '\n'
-                            *q   = '\n';
-                            line = 2;
-                        }
-                        else
-                        {
-                            // all subtitles on two lines tops
-                            // replace line breaks with spaces
-                            *q = ' ';
-                        }
+                        // replace '\r' with '\n'
+                        *q   = '\n';
                         q++;
                     }
                     else
@@ -552,7 +541,6 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
     {
         long length;
         char *p, *q;
-        int  line = 1;
         uint64_t start_time = ( pv->current_entry.start +
                                 pv->subtitle->config.offset ) * 90;
         uint64_t stop_time = ( pv->current_entry.stop +
@@ -569,7 +557,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
 
         for (q = p = pv->current_entry.text; *p != '\0'; p++)
         {
-            if (*p == '\n' || *p == '\r')
+            if (*p == '\r')
             {
                 if (*(p + 1) == '\n' || *(p + 1) == '\r' || *(p + 1) == '\0')
                 {
@@ -577,18 +565,8 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv )
                     length--;
                     continue;
                 }
-                else if (line == 1)
-                {
-                    // replace '\r' with '\n'
-                    *q   = '\n';
-                    line = 2;
-                }
-                else
-                {
-                    // all subtitles on two lines tops
-                    // replace line breaks with spaces
-                    *q = ' ';
-                }
+                // replace '\r' with '\n'
+                *q   = '\n';
                 q++;
             }
             else
diff --git a/libhb/decsrtsub.h b/libhb/decsrtsub.h
index 0660164..e69a380 100644
--- a/libhb/decsrtsub.h
+++ b/libhb/decsrtsub.h
@@ -1,6 +1,6 @@
 /* decsrtsub.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decssasub.c b/libhb/decssasub.c
index 3aec3a0..3e9ad70 100644
--- a/libhb/decssasub.c
+++ b/libhb/decssasub.c
@@ -1,6 +1,6 @@
 /* decssasub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decssasub.h b/libhb/decssasub.h
index 1f67dc2..6201010 100644
--- a/libhb/decssasub.h
+++ b/libhb/decssasub.h
@@ -1,6 +1,6 @@
 /* decssasub.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dectx3gsub.c b/libhb/dectx3gsub.c
index 19c2821..5b8a6b5 100644
--- a/libhb/dectx3gsub.c
+++ b/libhb/dectx3gsub.c
@@ -1,6 +1,6 @@
 /* dectx3gsub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decutf8sub.c b/libhb/decutf8sub.c
index 8cecfe0..1d17b02 100644
--- a/libhb/decutf8sub.c
+++ b/libhb/decutf8sub.c
@@ -1,6 +1,6 @@
 /* decutf8sub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c
index 7109b50..ff846e6 100644
--- a/libhb/decvobsub.c
+++ b/libhb/decvobsub.c
@@ -1,6 +1,6 @@
 /* decvobsub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/deinterlace.c b/libhb/deinterlace.c
index 44ff88d..27ad5e3 100644
--- a/libhb/deinterlace.c
+++ b/libhb/deinterlace.c
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2006 Michael Niedermayer <michaelni at gmx.at>
+ Copyright (C) 2006-2016 Michael Niedermayer <michaelni at gmx.at>
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff --git a/libhb/demuxmpeg.c b/libhb/demuxmpeg.c
index 988b1ca..f9d1f29 100644
--- a/libhb/demuxmpeg.c
+++ b/libhb/demuxmpeg.c
@@ -1,6 +1,6 @@
 /* demuxmpeg.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/denoise.c b/libhb/denoise.c
index 9308d04..b668a21 100644
--- a/libhb/denoise.c
+++ b/libhb/denoise.c
@@ -1,6 +1,6 @@
 /*
- Copyright (c) 2003 Daniel Moreno <comac AT comac DOT darktech DOT org>
- Copyright (c) 2012 Loren Merritt
+ Copyright (c) 2003-2016 Daniel Moreno <comac AT comac DOT darktech DOT org>
+ Copyright (c) 2012-2016 Loren Merritt
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff --git a/libhb/detelecine.c b/libhb/detelecine.c
index e6b3e7c..e314125 100644
--- a/libhb/detelecine.c
+++ b/libhb/detelecine.c
@@ -1,6 +1,6 @@
 /* detelecine.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dvd.c b/libhb/dvd.c
index bd611f7..b28e94d 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -1,6 +1,6 @@
 /* dvd.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dvd.h b/libhb/dvd.h
index 24f4f1e..bf9fddf 100644
--- a/libhb/dvd.h
+++ b/libhb/dvd.h
@@ -1,6 +1,6 @@
 /* dvd.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 771b068..d58ee1d 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -1,6 +1,6 @@
 /* dvdnav.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dxva2api.c b/libhb/dxva2api.c
index 9cfd809..31f54e3 100644
--- a/libhb/dxva2api.c
+++ b/libhb/dxva2api.c
@@ -1,6 +1,6 @@
 /* dxva2api.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/dxva2api.h b/libhb/dxva2api.h
index 14ea80a..6d03b34 100644
--- a/libhb/dxva2api.h
+++ b/libhb/dxva2api.h
@@ -1,6 +1,6 @@
 /* dxva2api.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/eedi2.c b/libhb/eedi2.c
index 9b2c6c1..8881ac7 100644
--- a/libhb/eedi2.c
+++ b/libhb/eedi2.c
@@ -1,6 +1,6 @@
 /* eedi2.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/eedi2.h b/libhb/eedi2.h
index 85c385b..65c988a 100644
--- a/libhb/eedi2.h
+++ b/libhb/eedi2.h
@@ -1,6 +1,6 @@
 /* eedi2.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 04d3bf9..a505852 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 2d22857..da151cc 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -1,6 +1,6 @@
 /* encavcodec.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index 7242867..ad1edac 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -1,6 +1,6 @@
 /* encavcodecaudio.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -115,6 +115,10 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
             }
             break;
 
+        case HB_ACODEC_LAME:
+            codec_name = "libmp3lame";
+            break;
+
         default:
             hb_error("encavcodecaInit: unsupported codec (0x%x)",
                      audio->config.out.codec);
diff --git a/libhb/enclame.c b/libhb/enclame.c
deleted file mode 100644
index ef34b40..0000000
--- a/libhb/enclame.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* enclame.c
-
-   Copyright (c) 2003-2015 HandBrake Team
-   This file is part of the HandBrake source code
-   Homepage: <http://handbrake.fr/>.
-   It may be used under the terms of the GNU General Public License v2.
-   For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
- */
-#include "hb.h"
-
-#include "lame/lame.h"
-
-int  enclameInit( hb_work_object_t *, hb_job_t * );
-int  enclameWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** );
-void enclameClose( hb_work_object_t * );
-
-hb_work_object_t hb_enclame =
-{
-    WORK_ENCLAME,
-    "MP3 encoder (libmp3lame)",
-    enclameInit,
-    enclameWork,
-    enclameClose
-};
-
-struct hb_work_private_s
-{
-    hb_job_t   * job;
-
-    /* LAME handle */
-    lame_global_flags * lame;
-
-    int             out_discrete_channels;
-    unsigned long   input_samples;
-    unsigned long   output_bytes;
-    uint8_t       * buf;
-
-    hb_list_t     * list;
-    int64_t         pts;
-};
-
-int enclameInit( hb_work_object_t * w, hb_job_t * job )
-{
-    hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
-    hb_audio_t * audio = w->audio;
-
-    w->private_data = pv;
-
-    pv->job   = job;
-
-    hb_log( "enclame: opening libmp3lame" );
-
-    pv->lame = lame_init();
-    // use ABR
-    lame_set_scale( pv->lame, 32768.0 );
-    if( audio->config.out.compression_level >= 0 )
-    {
-        lame_set_quality( pv->lame, audio->config.out.compression_level );
-    }
-    if( audio->config.out.bitrate > 0 )
-    {
-        lame_set_VBR( pv->lame, vbr_abr );
-        lame_set_VBR_mean_bitrate_kbps( pv->lame, audio->config.out.bitrate );
-    }
-    else if( audio->config.out.quality >= 0 )
-    {
-        lame_set_brate( pv->lame, 0 );
-        lame_set_VBR( pv->lame, vbr_default );
-        lame_set_VBR_quality( pv->lame, audio->config.out.quality );
-    }
-    lame_set_in_samplerate( pv->lame, audio->config.out.samplerate );
-    lame_set_out_samplerate( pv->lame, audio->config.out.samplerate );
-
-    pv->out_discrete_channels = hb_mixdown_get_discrete_channel_count( audio->config.out.mixdown );
-    // Lame's default encoding mode is JOINT_STEREO.  This subtracts signal
-    // that is "common" to left and right (within some threshold) and encodes
-    // it separately.  This improves quality at low bitrates, but hurts 
-    // imaging (channel separation) at higher bitrates.  So if the bitrate
-    // is suffeciently high, use regular STEREO mode.
-    if ( pv->out_discrete_channels == 1 )
-    {
-        lame_set_mode( pv->lame, MONO );
-        lame_set_num_channels( pv->lame, 1 );
-    }
-    else if ( audio->config.out.bitrate >= 128 )
-    {
-        lame_set_mode( pv->lame, STEREO );
-    }
-    lame_init_params( pv->lame );
-
-    pv->input_samples = 1152 * pv->out_discrete_channels;
-    pv->output_bytes = LAME_MAXMP3BUFFER;
-    pv->buf  = malloc( pv->input_samples * sizeof( float ) );
-    audio->config.out.samples_per_frame = 1152;
-
-    pv->list = hb_list_init();
-    pv->pts  = AV_NOPTS_VALUE;
-
-    return 0;
-}
-
-/***********************************************************************
- * Close
- ***********************************************************************
- *
- **********************************************************************/
-void enclameClose( hb_work_object_t * w )
-{
-    hb_work_private_t * pv = w->private_data;
-
-    lame_close( pv->lame );
-    hb_list_empty( &pv->list );
-    free( pv->buf );
-    free( pv );
-    w->private_data = NULL;
-}
-
-/***********************************************************************
- * Encode
- ***********************************************************************
- *
- **********************************************************************/
-static hb_buffer_t * Encode( hb_work_object_t * w )
-{
-    hb_work_private_t * pv = w->private_data;
-    hb_audio_t * audio = w->audio;
-    hb_buffer_t * buf;
-    float samples[2][1152];
-    uint64_t pts, pos;
-    int      i, j;
-
-    if( hb_list_bytes( pv->list ) < pv->input_samples * sizeof( float ) )
-    {
-        return NULL;
-    }
-
-    hb_list_getbytes( pv->list, pv->buf, pv->input_samples * sizeof( float ),
-                      &pts, &pos);
-
-    for( i = 0; i < 1152; i++ )
-    {
-        for( j = 0; j < pv->out_discrete_channels; j++ )
-        {
-            samples[j][i] = ((float *) pv->buf)[(pv->out_discrete_channels * i + j)];
-        }
-    }
-
-    buf             = hb_buffer_init( pv->output_bytes );
-    buf->s.start    = pts + 90000 * pos / pv->out_discrete_channels / sizeof( float ) / audio->config.out.samplerate;
-    buf->s.duration = (double)90000 * 1152 / audio->config.out.samplerate;
-    buf->s.stop     = buf->s.start + buf->s.duration;
-    pv->pts = buf->s.stop;
-    buf->size  = lame_encode_buffer_float( 
-            pv->lame, samples[0], samples[1],
-            1152, buf->data, LAME_MAXMP3BUFFER );
-
-    buf->s.type = AUDIO_BUF;
-    buf->s.frametype = HB_FRAME_AUDIO;
-
-    if( !buf->size )
-    {
-        /* Encoding was successful but we got no data. Try to encode
-           more */
-        hb_buffer_close( &buf );
-        return Encode( w );
-    }
-    else if( buf->size < 0 )
-    {
-        hb_log( "enclame: lame_encode_buffer failed" );
-        hb_buffer_close( &buf );
-        return NULL;
-    }
-    return buf;
-}
-
-/***********************************************************************
- * Work
- ***********************************************************************
- *
- **********************************************************************/
-int enclameWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
-                 hb_buffer_t ** buf_out )
-{
-    hb_work_private_t * pv = w->private_data;
-    hb_audio_t * audio = w->audio;
-    hb_buffer_t * in = *buf_in;
-    hb_buffer_t * buf;
-
-    if ( (*buf_in)->size <= 0 )
-    {
-        /* EOF on input - send it downstream & say we're done */
-
-        buf = hb_buffer_init( pv->output_bytes );
-        buf->size = lame_encode_flush( pv->lame, buf->data, LAME_MAXMP3BUFFER );
-        buf->s.start = pv->pts;
-        buf->s.stop  = buf->s.start + 90000 * 1152 / audio->config.out.samplerate;
-
-        buf->s.type = AUDIO_BUF;
-        buf->s.frametype = HB_FRAME_AUDIO;
-
-        if( buf->size <= 0 )
-        {
-            hb_buffer_close( &buf );
-        }
-
-        // Add the flushed data
-        *buf_out = buf;
-
-        // Add the eof
-        if ( buf )
-        {
-            buf->next = in;
-        }
-        else
-        {
-            *buf_out = in;
-        }
-
-        *buf_in = NULL;
-        return HB_WORK_DONE;
-    }
-
-    hb_list_add( pv->list, *buf_in );
-    *buf_in = NULL;
-
-    *buf_out = buf = Encode( w );
-
-    while( buf )
-    {
-        buf->next = Encode( w );
-        buf       = buf->next;
-    }
-
-    return HB_WORK_OK;
-}
-
diff --git a/libhb/enctheora.c b/libhb/enctheora.c
index e3f9788..37042cc 100644
--- a/libhb/enctheora.c
+++ b/libhb/enctheora.c
@@ -1,6 +1,6 @@
 /* enctheora.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encvobsub.c b/libhb/encvobsub.c
index e9aefac..3d9f888 100644
--- a/libhb/encvobsub.c
+++ b/libhb/encvobsub.c
@@ -1,6 +1,6 @@
 /* encvobsub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c
index 226c8ff..e06afba 100644
--- a/libhb/encvorbis.c
+++ b/libhb/encvorbis.c
@@ -1,6 +1,6 @@
 /* encvorbis.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encx264.c b/libhb/encx264.c
index e268350..9523ea9 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -1,6 +1,6 @@
 /* encx264.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encx264.h b/libhb/encx264.h
index eadad68..6b8dff2 100644
--- a/libhb/encx264.h
+++ b/libhb/encx264.h
@@ -1,6 +1,6 @@
 /* encx264.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/encx265.c b/libhb/encx265.c
index 378f554..8e274ec 100644
--- a/libhb/encx265.c
+++ b/libhb/encx265.c
@@ -1,6 +1,6 @@
 /* encx265.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -279,6 +279,9 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
     job->areBframes = (param->bframes > 0) + (param->bframes   > 0 &&
                                               param->bBPyramid > 0);
 
+    /* Reset global variables before opening a new encoder */
+    x265_cleanup();
+
     pv->x265 = x265_encoder_open(param);
     if (pv->x265 == NULL)
     {
diff --git a/libhb/fifo.c b/libhb/fifo.c
index 4461eac..56575e8 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -1,6 +1,6 @@
 /* fifo.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/h264_common.h b/libhb/h264_common.h
index fda77fe..86c0d4d 100644
--- a/libhb/h264_common.h
+++ b/libhb/h264_common.h
@@ -1,6 +1,6 @@
 /* h264_common.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/h265_common.h b/libhb/h265_common.h
index cc1b387..5076be8 100644
--- a/libhb/h265_common.h
+++ b/libhb/h265_common.h
@@ -1,6 +1,6 @@
 /* h265_common.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/hb.c b/libhb/hb.c
index dd2aa78..a23c117 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -1,6 +1,6 @@
 /* hb.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -222,7 +222,7 @@ hb_sws_get_context(int srcW, int srcH, enum AVPixelFormat srcFormat,
                       1 << 16 ); // saturation
 
         if (sws_init_context(ctx, NULL, NULL) < 0) {
-            fprintf(stderr, "Cannot initialize resampling context\n");
+            hb_error("Cannot initialize resampling context");
             sws_freeContext(ctx);
             ctx = NULL;
         } 
@@ -503,15 +503,68 @@ hb_handle_t * hb_init_dl( int verbose, int update_check )
     return h;
 }
 
+// Make sure these strings at least exist in the executable even though
+// they may not all be visible in the frontend.
+static const char* hb_title          = HB_PROJECT_TITLE;
+static const char* hb_name           = HB_PROJECT_NAME;
+static const char* hb_website        = HB_PROJECT_URL_WEBSITE;
+static const char* hb_community      = HB_PROJECT_URL_COMMUNITY;
+static const char* hb_irc            = HB_PROJECT_URL_IRC;
+static const char* hb_version        = HB_PROJECT_VERSION;
+static const int   hb_build          = HB_PROJECT_BUILD;
+static const char* hb_repo_url       = HB_PROJECT_REPO_URL;
+static const char* hb_repo_tag       = HB_PROJECT_REPO_TAG;
+static const int   hb_repo_rev       = HB_PROJECT_REPO_REV;
+static const char* hb_repo_hash      = HB_PROJECT_REPO_HASH;
+static const char* hb_repo_branch    = HB_PROJECT_REPO_BRANCH;
+static const char* hb_repo_remote    = HB_PROJECT_REPO_REMOTE;
+static const char* hb_repo_type      = HB_PROJECT_REPO_TYPE;
+
+const char * hb_get_full_description()
+{
+    static char * desc = NULL;
+    if (desc == NULL)
+    {
+        desc = hb_strdup_printf("%s\n"
+                                "\tWebsite:     %s\n"
+                                "\tForum:       %s\n"
+                                "\tIRC:         %s\n"
+                                "\tBuild Type:  %s\n"
+                                "\tRepository:  %s\n"
+                                "\tRelease Tag: %s\n"
+                                "\tRevision:    %d\n"
+                                "\tCommit Hash: %s\n"
+                                "\tBranch:      %s\n"
+                                "\tRemote:      %s",
+                                hb_title, hb_website, hb_community, hb_irc,
+                                hb_repo_type, hb_repo_url, hb_repo_tag, hb_repo_rev,
+                                hb_repo_hash, hb_repo_branch, hb_repo_remote);
+    }
+    return desc;
+}
 
 /**
  * Returns current version of libhb.
  * @param h Handle to hb_handle_t.
  * @return character array of version number.
  */
-char * hb_get_version( hb_handle_t * h )
+const char * hb_get_version( hb_handle_t * h )
 {
-    return HB_PROJECT_VERSION;
+    // Silence compiler warnings for unused variables
+    ((void)(hb_title));
+    ((void)(hb_name));
+    ((void)(hb_website));
+    ((void)(hb_community));
+    ((void)(hb_irc));
+    ((void)(hb_version));
+    ((void)(hb_repo_url));
+    ((void)(hb_repo_tag));
+    ((void)(hb_repo_rev));
+    ((void)(hb_repo_hash));
+    ((void)(hb_repo_branch));
+    ((void)(hb_repo_remote));
+    ((void)(hb_repo_type));
+    return hb_version;
 }
 
 /**
@@ -521,7 +574,7 @@ char * hb_get_version( hb_handle_t * h )
  */
 int hb_get_build( hb_handle_t * h )
 {
-    return HB_PROJECT_BUILD;
+    return hb_build;
 }
 
 /**
@@ -1095,12 +1148,18 @@ void hb_set_anamorphic_size2(hb_geometry_t *src_geo,
             if (maxWidth && (width > maxWidth))
             {
                 width  = maxWidth;
-                height = MULTIPLE_MOD(width / dar, mod);
+                if (keep_display_aspect)
+                {
+                    height = MULTIPLE_MOD(width / dar, mod);
+                }
             }
             if (maxHeight && (height > maxHeight))
             {
                 height  = maxHeight;
-                width = MULTIPLE_MOD(height * dar, mod);
+                if (keep_display_aspect)
+                {
+                    width = MULTIPLE_MOD(height * dar, mod);
+                }
             }
             dst_par_num = dst_par_den = 1;
         } break;
@@ -1191,7 +1250,8 @@ void hb_set_anamorphic_size2(hb_geometry_t *src_geo,
                 // But otherwise, PAR and DAR will change the least
                 // if we stay as close as possible to the requested
                 // storage aspect.
-                if (!keep_display_aspect)
+                if (!keep_display_aspect &&
+                    (maxHeight == 0 || height < maxHeight))
                 {
                     height = width / storage_aspect + 0.5;
                     height = MULTIPLE_MOD(height, mod);
@@ -1201,7 +1261,8 @@ void hb_set_anamorphic_size2(hb_geometry_t *src_geo,
             {
                 height = maxHeight;
                 // Ditto, see comment above
-                if (!keep_display_aspect)
+                if (!keep_display_aspect &&
+                    (maxWidth == 0 || width < maxWidth))
                 {
                     width = height * storage_aspect + 0.5;
                     width  = MULTIPLE_MOD(width, mod);
@@ -1720,7 +1781,6 @@ int hb_global_init()
     hb_register(&hb_encca_aac);
     hb_register(&hb_encca_haac);
 #endif
-    hb_register(&hb_enclame);
     hb_register(&hb_enctheora);
     hb_register(&hb_encvorbis);
     hb_register(&hb_encx264);
@@ -1744,6 +1804,9 @@ void hb_global_close()
     char dirname[1024];
     DIR * dir;
     struct dirent * entry;
+
+    /* OpenCL library (dynamically loaded) */
+    hb_ocl_close();
     
     /* Find and remove temp folder */
     memset( dirname, 0, 1024 );
diff --git a/libhb/hb.h b/libhb/hb.h
index 743a2cc..07236cf 100644
--- a/libhb/hb.h
+++ b/libhb/hb.h
@@ -1,6 +1,6 @@
 /* hb.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -29,7 +29,8 @@ hb_handle_t * hb_init( int verbose, int update_check );
 hb_handle_t * hb_init_dl ( int verbose, int update_check ); // hb_init for use with dylib
 
 /* hb_get_version() */
-char        * hb_get_version( hb_handle_t * );
+const char  * hb_get_full_description();
+const char  * hb_get_version( hb_handle_t * );
 int           hb_get_build( hb_handle_t * );
 
 /* hb_check_update()
diff --git a/libhb/hb_dict.c b/libhb/hb_dict.c
index 48d5c6a..fa6d58e 100644
--- a/libhb/hb_dict.c
+++ b/libhb/hb_dict.c
@@ -1,6 +1,6 @@
 /* hb_dict.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/hb_dict.h b/libhb/hb_dict.h
index daa3b39..6967852 100644
--- a/libhb/hb_dict.h
+++ b/libhb/hb_dict.h
@@ -1,6 +1,6 @@
 /* hb_dict.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/hbffmpeg.h b/libhb/hbffmpeg.h
index ff65bd6..b641a75 100644
--- a/libhb/hbffmpeg.h
+++ b/libhb/hbffmpeg.h
@@ -1,6 +1,6 @@
 /* hbffmpeg.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/internal.h b/libhb/internal.h
index 7e23799..7c1126e 100644
--- a/libhb/internal.h
+++ b/libhb/internal.h
@@ -1,6 +1,6 @@
 /* internal.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/lang.c b/libhb/lang.c
index a336268..07696dc 100644
--- a/libhb/lang.c
+++ b/libhb/lang.c
@@ -1,6 +1,6 @@
 /* lang.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/lang.h b/libhb/lang.h
index 0b35357..9c91344 100644
--- a/libhb/lang.h
+++ b/libhb/lang.h
@@ -1,6 +1,6 @@
 /* lang.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index 28270ec..02b0562 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -1,6 +1,6 @@
 /* muxavformat.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -121,7 +121,7 @@ static int avformatInit( hb_mux_object_t * m )
     hb_mux_data_t * track;
     int meta_mux;
     int max_tracks;
-    int ii, ret;
+    int ii, jj, ret;
 
     const char *muxer_name = NULL;
 
@@ -602,6 +602,56 @@ static int avformatInit( hb_mux_object_t * m )
         }
     }
 
+    // Check for audio track associations
+    for (ii = 0; ii < hb_list_count(job->list_audio); ii++)
+    {
+        audio = hb_list_item(job->list_audio, ii);
+        switch (audio->config.out.codec & HB_ACODEC_MASK)
+        {
+            case HB_ACODEC_FFAAC:
+            case HB_ACODEC_CA_AAC:
+            case HB_ACODEC_CA_HAAC:
+            case HB_ACODEC_FDK_AAC:
+            case HB_ACODEC_FDK_HAAC:
+                break;
+
+            default:
+            {
+                // Mark associated fallback audio tracks for any non-aac track
+                for(jj = 0; jj < hb_list_count( job->list_audio ); jj++ )
+                {
+                    hb_audio_t    * fallback;
+                    int             codec;
+
+                    if (ii == jj) continue;
+
+                    fallback = hb_list_item( job->list_audio, jj );
+                    codec = fallback->config.out.codec & HB_ACODEC_MASK;
+                    if (fallback->config.in.track == audio->config.in.track &&
+                        (codec == HB_ACODEC_FFAAC ||
+                         codec == HB_ACODEC_CA_AAC ||
+                         codec == HB_ACODEC_CA_HAAC ||
+                         codec == HB_ACODEC_FDK_AAC ||
+                         codec == HB_ACODEC_FDK_HAAC))
+                    {
+                        hb_mux_data_t * fallback_track;
+                        int           * sd;
+
+                        track = audio->priv.mux_data;
+                        fallback_track = fallback->priv.mux_data;
+                        sd = (int*)av_stream_new_side_data(track->st,
+                                                     AV_PKT_DATA_FALLBACK_TRACK,
+                                                     sizeof(int));
+                        if (sd != NULL)
+                        {
+                            *sd = fallback_track->st->index;
+                        }
+                    }
+                }
+            } break;
+        }
+    }
+
     char * subidx_fmt =
         "size: %dx%d\n"
         "org: %d, %d\n"
@@ -915,7 +965,7 @@ static int avformatInit( hb_mux_object_t * m )
     time_t now = time(NULL);
     struct tm * now_utc = gmtime(&now);
     char now_8601[24];
-    strftime(now_8601, sizeof(now_8601), "%FT%TZ", now_utc);
+    strftime(now_8601, sizeof(now_8601), "%Y-%m-%dT%H:%M:%SZ", now_utc);
     av_dict_set(&m->oc->metadata, "creation_time", now_8601, 0);
 
     ret = avformat_write_header(m->oc, &av_opts);
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c
index 884df0c..cdd6b9a 100644
--- a/libhb/muxcommon.c
+++ b/libhb/muxcommon.c
@@ -1,6 +1,6 @@
 /* muxcommon.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -780,7 +780,7 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
                                       uint8_t *style_atoms, uint16_t *stylesize)
 {
     uint16_t utf8_count = 0;         // utf8 count from start of subtitle
-    int consumed, in_pos = 0, out_pos = 0, len, ii, lines;
+    int consumed, in_pos = 0, out_pos = 0, len, ii;
     style_context_t ctx;
     hb_subtitle_style_t style;
     char *text, *tmp;
@@ -803,7 +803,6 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
 
     while (input[in_pos] != '\0')
     {
-        lines = 1;
         text = hb_ssa_to_text((char*)input + in_pos, &consumed, &style);
         if (text == NULL)
             break;
@@ -818,18 +817,6 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
                 hb_deep_log( 3, "mux: Counted %d UTF-8 chrs within subtitle",
                                  utf8_count);
             }
-            // By default tx3g only supports 2 lines of text
-            // To support more lines, we must enable the virtical placement
-            // flag in the tx3g atom and add tbox atoms to the sample
-            // data to set the vertical placement for each subtitle.
-            // Although tbox defines a rectangle, the QT spec says
-            // that only the vertical placement is honored (bummer).
-            if (text[ii] == '\n')
-            {
-                lines++;
-                if (lines > 2)
-                    text[ii] = ' ';
-            }
             len++;
         }
         strcpy((char*)output+out_pos, text);
diff --git a/libhb/nal_units.c b/libhb/nal_units.c
index 0589e02..c64f38c 100644
--- a/libhb/nal_units.c
+++ b/libhb/nal_units.c
@@ -1,6 +1,6 @@
 /* nal_units.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code.
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/nal_units.h b/libhb/nal_units.h
index 3beb42d..f5cd09e 100644
--- a/libhb/nal_units.h
+++ b/libhb/nal_units.h
@@ -1,6 +1,6 @@
 /* nal_units.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code.
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/nlmeans.c b/libhb/nlmeans.c
index f5cfd56..17c78cb 100644
--- a/libhb/nlmeans.c
+++ b/libhb/nlmeans.c
@@ -1,7 +1,7 @@
 /* nlmeans.c
 
-   Copyright (c) 2013 Dirk Farin
-   Copyright (c) 2003-2014 HandBrake Team
+   Copyright (c) 2013-2016 Dirk Farin
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/oclnv12toyuv.c b/libhb/oclnv12toyuv.c
index 6f2cf66..d15af25 100644
--- a/libhb/oclnv12toyuv.c
+++ b/libhb/oclnv12toyuv.c
@@ -1,6 +1,6 @@
 /* oclnv12toyuv.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/oclnv12toyuv.h b/libhb/oclnv12toyuv.h
index 3757e2d..05fb6c6 100644
--- a/libhb/oclnv12toyuv.h
+++ b/libhb/oclnv12toyuv.h
@@ -1,6 +1,6 @@
 /* oclnv12toyuv.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/oclscale.c b/libhb/oclscale.c
index c771a1f..8198220 100644
--- a/libhb/oclscale.c
+++ b/libhb/oclscale.c
@@ -1,6 +1,6 @@
 /* oclscale.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/opencl.c b/libhb/opencl.c
index c74b675..ed6eaee 100644
--- a/libhb/opencl.c
+++ b/libhb/opencl.c
@@ -1,6 +1,6 @@
 /* opencl.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/opencl.h b/libhb/opencl.h
index e19bfb8..1f0104a 100644
--- a/libhb/opencl.h
+++ b/libhb/opencl.h
@@ -1,6 +1,6 @@
 /* opencl.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/openclkernels.h b/libhb/openclkernels.h
index 5ab5124..3b2a57d 100644
--- a/libhb/openclkernels.h
+++ b/libhb/openclkernels.h
@@ -1,6 +1,6 @@
 /* openclkernels.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/openclwrapper.c b/libhb/openclwrapper.c
index 2adb183..38750ae 100644
--- a/libhb/openclwrapper.c
+++ b/libhb/openclwrapper.c
@@ -1,6 +1,6 @@
 /* openclwrapper.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -668,6 +668,7 @@ int hb_release_opencl_env( GPUEnv *gpu_info )
     }
 
     isInited = 0;
+    useBuffers = 0;
     gpu_info->isUserCreated = 0;
 
     return 1;
diff --git a/libhb/openclwrapper.h b/libhb/openclwrapper.h
index 77e1b45..7a5a890 100644
--- a/libhb/openclwrapper.h
+++ b/libhb/openclwrapper.h
@@ -1,6 +1,6 @@
 /* openclwrapper.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/param.c b/libhb/param.c
index 308308d..2c335f2 100644
--- a/libhb/param.c
+++ b/libhb/param.c
@@ -1,6 +1,6 @@
 /* param.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/ports.c b/libhb/ports.c
index f2622f8..f3f89b0 100644
--- a/libhb/ports.c
+++ b/libhb/ports.c
@@ -1,6 +1,6 @@
 /* ports.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/ports.h b/libhb/ports.h
index c964cf6..dd7694e 100644
--- a/libhb/ports.h
+++ b/libhb/ports.h
@@ -1,6 +1,6 @@
 /* ports.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/project.h.m4 b/libhb/project.h.m4
index 7e70b5b..ae54f25 100644
--- a/libhb/project.h.m4
+++ b/libhb/project.h.m4
@@ -21,12 +21,14 @@ dnl
 <<#>>define HB_PROJECT_VERSION_HEX     0x<<>>__HB_version_hex<<>>LL
 <<#>>define HB_PROJECT_BUILD           __HB_build
 <<#>>define HB_PROJECT_REPO_URL        "__HB_repo_url"
-<<#>>define HB_PROJECT_REPO_ROOT       "__HB_repo_root"
-<<#>>define HB_PROJECT_REPO_UUID       "__HB_repo_uuid"
+<<#>>define HB_PROJECT_REPO_TAG        "__HB_repo_tag"
 <<#>>define HB_PROJECT_REPO_REV        __HB_repo_rev
-<<#>>define HB_PROJECT_REPO_DATE       "__HB_repo_date"
-<<#>>define HB_PROJECT_REPO_OFFICIAL   __HB_repo_official
+<<#>>define HB_PROJECT_REPO_HASH       "__HB_repo_hash"
+<<#>>define HB_PROJECT_REPO_BRANCH     "__HB_repo_branch"
+<<#>>define HB_PROJECT_REPO_REMOTE     "__HB_repo_remote"
 <<#>>define HB_PROJECT_REPO_TYPE       "__HB_repo_type"
+<<#>>define HB_PROJECT_REPO_OFFICIAL   __HB_repo_official
+<<#>>define HB_PROJECT_REPO_DATE       "__HB_repo_date"
 
 <<#>>define HB_PROJECT_BUILD_SPEC      "__BUILD_spec"
 <<#>>define HB_PROJECT_BUILD_MACHINE   "__BUILD_machine"
diff --git a/libhb/qsv_common.c b/libhb/qsv_common.c
index e7f8f4e..8116ada 100644
--- a/libhb/qsv_common.c
+++ b/libhb/qsv_common.c
@@ -1,6 +1,6 @@
 /* qsv_common.c
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code.
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/qsv_common.h b/libhb/qsv_common.h
index cd7254e..81a27e1 100644
--- a/libhb/qsv_common.h
+++ b/libhb/qsv_common.h
@@ -1,6 +1,6 @@
 /* qsv_common.h
  *
- * Copyright (c) 2003-2015 HandBrake Team
+ * Copyright (c) 2003-2016 HandBrake Team
  * This file is part of the HandBrake source code.
  * Homepage: <http://handbrake.fr/>.
  * It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/qsv_filter.c b/libhb/qsv_filter.c
index c0e0e0b..46859dd 100644
--- a/libhb/qsv_filter.c
+++ b/libhb/qsv_filter.c
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/qsv_filter.h b/libhb/qsv_filter.h
index e55a85c..363456d 100644
--- a/libhb/qsv_filter.h
+++ b/libhb/qsv_filter.h
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/qsv_filter_pp.c b/libhb/qsv_filter_pp.c
index c9323bf..09c4bdc 100644
--- a/libhb/qsv_filter_pp.c
+++ b/libhb/qsv_filter_pp.c
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/qsv_filter_pp.h b/libhb/qsv_filter_pp.h
index e703703..95a61c3 100644
--- a/libhb/qsv_filter_pp.h
+++ b/libhb/qsv_filter_pp.h
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/qsv_memory.c b/libhb/qsv_memory.c
index a01b502..8a21e97 100644
--- a/libhb/qsv_memory.c
+++ b/libhb/qsv_memory.c
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/qsv_memory.h b/libhb/qsv_memory.h
index 2d0f512..c53d704 100644
--- a/libhb/qsv_memory.h
+++ b/libhb/qsv_memory.h
@@ -1,6 +1,6 @@
 /* ********************************************************************* *\
 
-Copyright (C) 2013 Intel Corporation.  All rights reserved.
+Copyright (C) 2013-2016 Intel Corporation.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/libhb/reader.c b/libhb/reader.c
index 8a9b167..5d1655c 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -1,6 +1,6 @@
 /* reader.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/rendersub.c b/libhb/rendersub.c
index cd63db6..751848b 100644
--- a/libhb/rendersub.c
+++ b/libhb/rendersub.c
@@ -1,6 +1,6 @@
 /* rendersub.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/rotate.c b/libhb/rotate.c
index 8849204..0fe9266 100644
--- a/libhb/rotate.c
+++ b/libhb/rotate.c
@@ -1,6 +1,6 @@
 /* rorate.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/scan.c b/libhb/scan.c
index 09928a9..5023f97 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -1,6 +1,6 @@
 /* scan.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/stream.c b/libhb/stream.c
index 6498331..0c30f52 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -1,6 +1,6 @@
 /* stream.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/sync.c b/libhb/sync.c
index 82d3bc3..69cad65 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -1,6 +1,6 @@
 /* sync.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/taskset.c b/libhb/taskset.c
index 285db16..d285bda 100644
--- a/libhb/taskset.c
+++ b/libhb/taskset.c
@@ -1,6 +1,6 @@
 /* taskset.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/taskset.h b/libhb/taskset.h
index 12b86fe..c05245d 100644
--- a/libhb/taskset.h
+++ b/libhb/taskset.h
@@ -1,6 +1,6 @@
 /* taskset.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/update.c b/libhb/update.c
index 4b7322c..54300e3 100644
--- a/libhb/update.c
+++ b/libhb/update.c
@@ -1,6 +1,6 @@
 /* update.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/vadxva2.c b/libhb/vadxva2.c
index d391897..52f69b8 100644
--- a/libhb/vadxva2.c
+++ b/libhb/vadxva2.c
@@ -1,6 +1,6 @@
 /* vadxva2.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/vadxva2.h b/libhb/vadxva2.h
index 43f5047..2a6eb0b 100644
--- a/libhb/vadxva2.h
+++ b/libhb/vadxva2.h
@@ -1,6 +1,6 @@
 /* vadxva2.h
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/vfr.c b/libhb/vfr.c
index 182c252..fbd2597 100644
--- a/libhb/vfr.c
+++ b/libhb/vfr.c
@@ -1,6 +1,6 @@
 /* vfr.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
diff --git a/libhb/work.c b/libhb/work.c
index 596912f..ab33bf0 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1,6 +1,6 @@
 /* work.c
 
-   Copyright (c) 2003-2015 HandBrake Team
+   Copyright (c) 2003-2016 HandBrake Team
    This file is part of the HandBrake source code
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License v2.
@@ -138,8 +138,8 @@ hb_work_object_t* hb_codec_encoder(int codec)
     }
     switch (codec)
     {
-        case HB_ACODEC_AC3:     return hb_get_work(WORK_ENCAVCODEC_AUDIO);
-        case HB_ACODEC_LAME:    return hb_get_work(WORK_ENCLAME);
+        case HB_ACODEC_AC3:
+        case HB_ACODEC_LAME:    return hb_get_work(WORK_ENCAVCODEC_AUDIO);
         case HB_ACODEC_VORBIS:  return hb_get_work(WORK_ENCVORBIS);
         case HB_ACODEC_CA_AAC:  return hb_get_work(WORK_ENC_CA_AAC);
         case HB_ACODEC_CA_HAAC: return hb_get_work(WORK_ENC_CA_HAAC);
@@ -564,12 +564,23 @@ static void do_job(hb_job_t *job)
 
     job->list_work = hb_list_init();
 
-    /* OpenCL */
+    /*
+     * OpenCL
+     *
+     * Note: we delay hb_ocl_init until here, since they're no point it loading
+     * the library if we aren't going to use it. But we only call hb_ocl_close
+     * in hb_global_close, since un/reloading the library each run is wasteful.
+     */
     if (job->use_opencl && (hb_ocl_init() || hb_init_opencl_run_env(0, NULL, "-I.")))
     {
         hb_log("work: failed to initialize OpenCL environment, using fallback");
+        hb_release_opencl_run_env();
         job->use_opencl = 0;
-        hb_ocl_close();
+    }
+    else
+    {
+        // we're not (re-)using OpenCL here, we can release the environment
+        hb_release_opencl_run_env();
     }
 
     hb_log( "starting job" );
@@ -802,6 +813,12 @@ static void do_job(hb_job_t *job)
                                    &vpp_settings[2], &vpp_settings[3],
                                    &vpp_settings[4], &vpp_settings[5]);
                         }
+                        // VPP crop/scale takes precedence over OpenCL scale too
+                        if (job->use_opencl)
+                        {
+                            hb_release_opencl_run_env();
+                            job->use_opencl = 0;
+                        }
                         hb_list_rem(job->list_filter, filter);
                         hb_filter_close(&filter);
                         break;
@@ -1652,12 +1669,6 @@ cleanup:
     }
 
     hb_buffer_pool_free();
-          
-    /* OpenCL: must be closed *after* freeing the buffer pool */
-    if (job->use_opencl)
-    {
-        hb_ocl_close();
-    }
     
     hb_job_close( &job );
 }
diff --git a/make/configure.py b/make/configure.py
index a825f64..8598826 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -16,6 +16,7 @@ import re
 import subprocess
 import sys
 import time
+from datetime import datetime, timedelta
 
 from optparse import OptionGroup
 from optparse import OptionGroup
@@ -159,12 +160,12 @@ class Configure( object ):
             if os.access( name, os.X_OK ):
                 return name
             return None
-        
+
         if not os.environ.has_key( 'PATH' ) or os.environ[ 'PATH' ] == '':
             path = os.defpath
         else:
             path = os.environ['PATH']
-        
+
         for dir in path.split( os.pathsep ):
             f = os.path.join( dir, name )
             if os.access( f, os.X_OK ):
@@ -317,7 +318,7 @@ class ShellProbe( Action ):
 ##
 ## returns true if feature successfully compiles
 ##
-##   
+##
 class CCProbe( Action ):
     def __init__( self, pretext, command, test_file ):
         super( CCProbe, self ).__init__( 'probe', pretext )
@@ -358,7 +359,7 @@ class CCProbe( Action ):
 ##
 ## returns true if feature successfully compiles
 ##
-##   
+##
 class LDProbe( Action ):
     def __init__( self, pretext, command, lib, test_file ):
         super( LDProbe, self ).__init__( 'probe', pretext )
@@ -444,7 +445,7 @@ class HostTupleProbe( ShellProbe, list ):
 
         if self.match( '*-*-cygwin*' ):
             self.systemf = self[2][0].upper() + self[2][1:]
-            
+
     ## glob-match against spec
     def match( self, *specs ):
         for spec in specs:
@@ -519,7 +520,7 @@ class IfHost( object ):
 
     def __nonzero__( self ):
         return self.value != None
-        
+
     def __str__( self ):
         return self.value
 
@@ -551,7 +552,7 @@ class ArchAction( Action ):
     def _action( self ):
         self.fail = False
 
-        ## some match on system should be made here; otherwise we signal a warning. 
+        ## some match on system should be made here; otherwise we signal a warning.
         if host.match( '*-*-cygwin*' ):
             pass
         elif host.match( '*-*-darwin11.*' ):
@@ -673,74 +674,83 @@ class SelectMode( dict ):
 ## Builds are classed into one of the following types:
 ##
 ##  release
-##      must be built from official svn with '/tags/' in the url
+##      must be built from official git at version tag
 ##  developer
-##      must be built from official svn but is not a release
-##  unofficial
-##      all other builds
+##      must be built from official git but is not a release
 ##
 class RepoProbe( ShellProbe ):
     def __init__( self ):
-        svn = 'svn'
-
-        ## Possible the repo was created using an incompatible version than what is
-        ## available in PATH when probe runs. Workaround by checking for file
-        ## .svn/HANDBRAKE_REPO_PROBE which points to a preferred svn executable.
+        # Find script that creates repo info
         try:
-            hrp = os.path.join( cfg.src_dir, '.svn', 'HANDBRAKE_REPO_PROBE' )
-            if os.path.isfile( hrp ) and os.path.getsize( hrp ) > 0:
-                file = cfg.open( hrp, 'r' )
-                line = file.readline().strip()
-                file.close()
-                if line:
-                    svn = line
+            repo_info = os.path.join( cfg.src_dir, 'scripts', 'repo-info.sh' )
+            if not os.path.isfile( repo_info ):
+                cfg.errln( 'Missing required script %s\n', repo_info )
+                sys.exit( 1 )
         except:
-            pass
+            sys.exit( 1 )
 
-        super( RepoProbe, self ).__init__( 'svn info', '%s info %s' % (svn,cfg.src_dir) )
+        super( RepoProbe, self ).__init__( 'repo info', '%s %s' %
+                                            (repo_info, cfg.src_dir) )
 
-        self.url       = 'svn://nowhere.com/project/unknown'
-        self.root      = 'svn://nowhere.com/project'
+        self.url       = 'git://nowhere.com/project/unknown'
+        self.tag       = ''
+        self.tag_hash  = 'deadbeaf'
         self.branch    = 'unknown'
-        self.uuid      = '00000000-0000-0000-0000-000000000000';
+        self.remote    = 'unknown'
         self.rev       = 0
-        self.date      = '0000-00-00 00:00:00 -0000'
+        self.hash      = 'deadbeaf'
+        self.shorthash = 'deadbea'
+        self.date      = datetime(1, 1, 1)
         self.official  = 0
-        self.type      = 'unofficial'
+        self.type      = 'developer'
 
     def _parseSession( self ):
         for line in self.session:
             ## grok fields
-            m = re.match( '([^:]+):\\s+(.+)', line )
+            m = re.match( '([^\=]+)\=(.*)', line )
             if not m:
                 continue
 
             (name,value) = m.groups()
-            if name == 'URL':
+            if name == 'URL' and value != '':
                 self.url = value
-            elif name == 'Repository Root':
-                self.root = value
-            elif name == 'Repository UUID':
-                self.uuid = value
-            elif name == 'Revision':
+            elif name == 'TAG':
+                self.tag = value
+            elif name == 'TAG_HASH':
+                self.tag_hash = value
+            elif name == 'BRANCH':
+                self.branch = value
+            elif name == 'REMOTE':
+                self.remote = value
+            elif name == 'REV':
                 self.rev = int( value )
-            elif name == 'Last Changed Date':
-                # strip chars in parens
-                if value.find( ' (' ):
-                    self.date = value[0:value.find(' (')]
+            elif name == 'DATE':
+                self.date = datetime.strptime(value[0:19], "%Y-%m-%d %H:%M:%S")
+
+                # strptime can't handle UTC offset
+                m = re.match( '^([-+]?[0-9]{2})([0-9]{2})$', value[20:])
+                (hh, mn) = m.groups()
+                utc_off_hour   = int(hh)
+                utc_off_minute = int(mn)
+                if utc_off_hour >= 0:
+                    utc_off = utc_off_hour * 60 + utc_off_minute
                 else:
-                    self.date = value
+                    utc_off = utc_off_hour * 60 - utc_off_minute
+                delta = timedelta(minutes=utc_off)
+                self.date = self.date - delta
+
+            elif name == 'HASH':
+                self.hash = value
+                self.shorthash = value[:7]
 
-        ## grok branch
-        i = self.url.rfind( '/' )
-        if i != -1 and i < len(self.url)-1:
-            self.branch = self.url[i+1:]
+        # type-classification via repository URL
+        official_url = 'https://github.com/HandBrake/HandBrake.git' # HTTPS
+        if self.url == 'git at github.com:HandBrake/HandBrake.git':    # SSH
+            self.url = official_url
 
-        # type-classification via repository UUID
-        if self.uuid == 'b64f7644-9d1e-0410-96f1-a4d463321fa5':
+        if self.url == official_url:
             self.official = 1
-            m = re.match( '([^:]+)://([^/]+)/(.+)', self.url )
-            if m and re.match( '.*tags/.*', m.group( 3 )):
+            if not options.snapshot and self.hash == self.tag_hash:
                 self.type = 'release'
             else:
                 self.type = 'developer'
@@ -748,12 +758,12 @@ class RepoProbe( ShellProbe ):
         self.msg_end = self.url
 
     def _failSession( self ):
-        # Look for svn info in version file.
+        # Look for repo info in version file.
         #
         # Version file would be created manually by source packager.
         # e.g.
-        # $ svn info HandBrake > HandBrake/version.txt
-        # $ tar -czf handbrake-source.tgz --exclude .svn HandBrake
+        # $ HandBrake/scripts/repo-info.sh HandBrake > HandBrake/version.txt
+        # $ tar -czf handbrake-source.tgz --exclude .git HandBrake
         cfg.infof( 'probe: version.txt...' )
         try:
             hvp = os.path.join( cfg.src_dir, 'version.txt' )
@@ -793,8 +803,11 @@ class Project( Action ):
         self.name_upper = self.name.upper()
 
         self.vmajor = 0
-        self.vminor = 10
-        self.vpoint = 2
+        self.vminor = 0
+        self.vpoint = 0
+        self.spoint = 0
+        self.suffix = ''
+        self.special = ''
 
     def _action( self ):
         ## add architecture to URL only for Mac
@@ -803,24 +816,52 @@ class Project( Action ):
         else:
             url_arch = ''
 
-        if repo.type == 'release':
-            self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint)
-            url_ctype = ''
-            url_ntype = 'stable'
-            self.build = time.strftime('%Y%m%d') + '00'
-            self.title = '%s %s (%s)' % (self.name,self.version,self.build)
-        elif repo.type == 'developer':
-            self.version = '%dsvn' % (repo.rev)
+        suffix = ''
+        if repo.tag != '':
+            m = re.match( '^([0-9]+)\.([0-9]+)\.([0-9]+)-?(.*)?$', repo.tag )
+            if not m:
+                cfg.errln( 'Invalid repo tag format %s\n', repo.tag )
+                sys.exit( 1 )
+            (vmajor, vminor, vpoint, suffix) = m.groups()
+            self.vmajor = int(vmajor)
+            self.vminor = int(vminor)
+            self.vpoint = int(vpoint)
+            self.suffix = suffix
+
+        if repo.type != 'release' or options.snapshot:
+            self.version = repo.date.strftime("%Y%m%d%H%M%S")
+            self.version += '-%s' % (repo.shorthash)
+            if repo.branch != '':
+                self.version += '-%s' % (repo.branch)
+
+            self.debversion = repo.date.strftime("%Y%m%d%H%M%S")
+            self.debversion += '-%s' % (repo.shorthash)
+            if repo.branch != '':
+                self.debversion += '-%s' % (repo.branch)
+
             url_ctype = '_unstable'
             url_ntype = 'unstable'
             self.build = time.strftime('%Y%m%d') + '01'
-            self.title = '%s svn%d (%s)' % (self.name,repo.rev,self.build)
+            self.title = '%s %s (%s)' % (self.name,self.version,self.build)
         else:
-            self.version = 'rev%d' % (repo.rev)
-            url_ctype = '_unofficial'
-            url_ntype = 'unofficial'
-            self.build = time.strftime('%Y%m%d') + '99'
-            self.title = '%s rev%d (%s)' % (self.name,repo.rev,self.build)
+            m = re.match('^([a-zA-Z]+)\.([0-9]+)$', suffix)
+            if not m:
+                # Regular release
+                self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint)
+                self.debversion = '%d.%d.%d' % (self.vmajor, self.vminor, self.vpoint)
+                url_ctype = ''
+                url_ntype = 'stable'
+            else:
+                (special, spoint,) = m.groups()
+                self.special = special
+                self.spoint = int(spoint)
+                self.version = '%d.%d.%d-%s.%d' % (self.vmajor,self.vminor,self.vpoint, self.special, self.spoint)
+                self.debversion = '%d.%d.%d~%s.%d' % (self.vmajor, self.vminor, self.vpoint, self.special, self.spoint)
+                url_ctype = '_unstable'
+                url_ntype = 'unstable'
+
+            self.build = time.strftime('%Y%m%d') + '00'
+            self.title = '%s %s (%s)' % (self.name,self.version,self.build)
 
         self.url_appcast = 'https://handbrake.fr/appcast%s%s.xml' % (url_ctype,url_arch)
         self.url_appnote = 'https://handbrake.fr/appcast/%s.html' % (url_ntype)
@@ -1206,7 +1247,7 @@ def createCLI():
 
     h = IfHost( 'enable HWD features', '*-*-*', none=optparse.SUPPRESS_HELP ).value
     grp.add_option( '--enable-hwd', default=False, action='store_true', help=h )
-    
+
     h = IfHost( 'enable use of x265 encoding', '*-*-*', none=optparse.SUPPRESS_HELP ).value
     grp.add_option( '--enable-x265', default=True, action='store_true', help=h )
     grp.add_option( '--disable-x265', dest="enable_x265", action='store_false' )
@@ -1276,6 +1317,13 @@ def createCLI():
     for select in SelectTool.selects:
         select.cli_add_option( grp )
     cli.add_option_group( grp )
+
+    ## add build options
+    grp = OptionGroup( cli, 'Build Options' )
+    grp.add_option( '--snapshot', default=False, action='store_true',
+                    help='Force a snapshot build' )
+    cli.add_option_group( grp )
+
     return cli
 
 ###############################################################################
@@ -1647,19 +1695,23 @@ int main()
     doc.add( 'HB.version.major',  project.vmajor )
     doc.add( 'HB.version.minor',  project.vminor )
     doc.add( 'HB.version.point',  project.vpoint )
+    doc.add( 'HB.version.suffix', project.suffix )
     doc.add( 'HB.version',        project.version )
+    doc.add( 'HB.debversion',     project.debversion )
     doc.add( 'HB.version.hex',    '%04x%02x%02x%08x' % (project.vmajor,project.vminor,project.vpoint,repo.rev) )
 
     doc.add( 'HB.build', project.build )
 
     doc.add( 'HB.repo.url',       repo.url )
-    doc.add( 'HB.repo.root',      repo.root )
-    doc.add( 'HB.repo.branch',    repo.branch )
-    doc.add( 'HB.repo.uuid',      repo.uuid )
+    doc.add( 'HB.repo.tag',       repo.tag )
     doc.add( 'HB.repo.rev',       repo.rev )
-    doc.add( 'HB.repo.date',      repo.date )
-    doc.add( 'HB.repo.official',  repo.official )
+    doc.add( 'HB.repo.hash',      repo.hash )
+    doc.add( 'HB.repo.shorthash', repo.shorthash )
+    doc.add( 'HB.repo.branch',    repo.branch )
+    doc.add( 'HB.repo.remote',    repo.remote )
     doc.add( 'HB.repo.type',      repo.type )
+    doc.add( 'HB.repo.official',  repo.official )
+    doc.add( 'HB.repo.date',      repo.date.strftime("%Y-%m-%d %H:%M:%S") )
 
     doc.addBlank()
     doc.add( 'HOST.spec',    host.spec )
@@ -1700,7 +1752,7 @@ int main()
     doc.add( 'BUILD/',  cfg.build_final + os.sep )
     doc.add( 'PREFIX',  cfg.prefix_final )
     doc.add( 'PREFIX/', cfg.prefix_final + os.sep )
-    
+
     doc.addBlank()
     doc.add( 'FEATURE.local_yasm', int( options.enable_local_yasm ))
     doc.add( 'FEATURE.local_autotools', int( options.enable_local_autotools ))
@@ -1850,7 +1902,7 @@ except AbortError, x:
     try:
         cfg.record_log()
     except:
-        pass        
-    sys.exit( 1 )    
+        pass
+    sys.exit( 1 )
 
 sys.exit( 0 )
diff --git a/make/include/tool.defs b/make/include/tool.defs
index 29f45e9..3efe5d8 100644
--- a/make/include/tool.defs
+++ b/make/include/tool.defs
@@ -11,3 +11,4 @@ WGET.exe  = wget
 MV.exe    = mv
 ZIP.exe   = zip
 LN.exe    = ln
+GIT.exe   = git
diff --git a/pkg/linux/debian/control.quantal b/pkg/linux/debian/control.vivid
similarity index 72%
copy from pkg/linux/debian/control.quantal
copy to pkg/linux/debian/control.vivid
index c113619..fd2e7b2 100644
--- a/pkg/linux/debian/control.quantal
+++ b/pkg/linux/debian/control.vivid
@@ -2,7 +2,7 @@ Source: handbrake
 Section: graphics
 Priority: optional
 Maintainer: John Stebbins <jstebbins.hb at gmail.com>
-Build-Depends: debhelper (>= 6), autotools-dev, libtool, libgudev-1.0-dev, intltool, autoconf, yasm (>= 1.1.0), libbz2-dev, zlib1g-dev, libgtk-3-dev, libwebkitgtk-3.0-dev, libnotify-dev, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, wget, python (>= 2.6), libappindicator3-dev, libfribidi-dev (>= 0.19.0), libxml2-dev, libogg-dev, libtheora-dev, libvorbis-dev, libsamplerate0-dev, libfreetype6-dev, libfontconfig1-dev, libass-dev
+Build-Depends: debhelper (>= 6), autotools-dev, libtool, libtool-bin, libgudev-1.0-dev, intltool, autoconf, yasm (>= 1.2.0), cmake, libbz2-dev, zlib1g-dev, libgtk-3-dev, libwebkitgtk-3.0-dev, libnotify-dev, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, wget, python (>= 2.6), libappindicator3-dev, libfribidi-dev (>= 0.19.0), libxml2-dev, libogg-dev, libtheora-dev, libvorbis-dev, libsamplerate0-dev, libfreetype6-dev, libfontconfig1-dev, libass-dev, libmp3lame-dev, libx264-dev
 Standards-Version: 3.8.4
 Homepage: http://www.handbrake.fr/
 
diff --git a/pkg/linux/debian/control.quantal b/pkg/linux/debian/control.wily
similarity index 72%
copy from pkg/linux/debian/control.quantal
copy to pkg/linux/debian/control.wily
index c113619..fd2e7b2 100644
--- a/pkg/linux/debian/control.quantal
+++ b/pkg/linux/debian/control.wily
@@ -2,7 +2,7 @@ Source: handbrake
 Section: graphics
 Priority: optional
 Maintainer: John Stebbins <jstebbins.hb at gmail.com>
-Build-Depends: debhelper (>= 6), autotools-dev, libtool, libgudev-1.0-dev, intltool, autoconf, yasm (>= 1.1.0), libbz2-dev, zlib1g-dev, libgtk-3-dev, libwebkitgtk-3.0-dev, libnotify-dev, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, wget, python (>= 2.6), libappindicator3-dev, libfribidi-dev (>= 0.19.0), libxml2-dev, libogg-dev, libtheora-dev, libvorbis-dev, libsamplerate0-dev, libfreetype6-dev, libfontconfig1-dev, libass-dev
+Build-Depends: debhelper (>= 6), autotools-dev, libtool, libtool-bin, libgudev-1.0-dev, intltool, autoconf, yasm (>= 1.2.0), cmake, libbz2-dev, zlib1g-dev, libgtk-3-dev, libwebkitgtk-3.0-dev, libnotify-dev, libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, wget, python (>= 2.6), libappindicator3-dev, libfribidi-dev (>= 0.19.0), libxml2-dev, libogg-dev, libtheora-dev, libvorbis-dev, libsamplerate0-dev, libfreetype6-dev, libfontconfig1-dev, libass-dev, libmp3lame-dev, libx264-dev
 Standards-Version: 3.8.4
 Homepage: http://www.handbrake.fr/
 
diff --git a/pkg/linux/debian/rules b/pkg/linux/debian/rules.vivid
similarity index 100%
copy from pkg/linux/debian/rules
copy to pkg/linux/debian/rules.vivid
diff --git a/pkg/linux/debian/rules b/pkg/linux/debian/rules.wily
similarity index 100%
copy from pkg/linux/debian/rules
copy to pkg/linux/debian/rules.wily
diff --git a/pkg/linux/module.defs b/pkg/linux/module.defs
index 2570d08..2eea7fe 100644
--- a/pkg/linux/module.defs
+++ b/pkg/linux/module.defs
@@ -1,8 +1,19 @@
 PKG.deb.machine = `dpkg --print-architecture`
 PKG.rpm.machine = `rpm -E "%_target_cpu"`
-PKG.release = 1
+PKG.release = $(HB.repo.rev)
 PKG.rpm.dist = `rpm -E "%dist"`
 
+ifeq ($(HB.repo.tag),)
+    tag = 0.0.0
+endif
+ifeq ($(HB.repo.type),release)
+    PKG.rpm.hb.version = $(tag)
+else ifeq ($(HB.repo.branch),)
+    PKG.rpm.hb.version = $(tab).$(HB.repo.shorthash)
+else
+    PKG.rpm.hb.version = $(tag).$(HB.repo.shorthash).$(HB.repo.branch)
+endif
+
 
 ###############################################################################
 
@@ -12,27 +23,29 @@ STAGE.out.cli/ = $(STAGE.out/)cli/
 
 ###############################################################################
 
-PKG.rpm.src.tar.bz2 = $(STAGE.out.src/)rpm/$(PKG.basename).tar.bz2
+PKG.rpm.basename = $(HB.name.lower)-$(PKG.rpm.hb.version)
+PKG.rpm.src.tar.bz2 = $(STAGE.out.src/)rpm/$(PKG.rpm.basename).tar.bz2
 STAGE.out.rpm.src/ = $(STAGE.out.src/)rpm/
 
 PKG.debian  = $(PKG.in/)linux/debian
-PKG.cli.deb = $(PKG.out/)$(HB.name)-$(HB.version)-Ubuntu_CLI_$(BUILD.machine).deb
-PKG.gui.deb = $(PKG.out/)$(HB.name)-$(HB.version)-Ubuntu_GUI_$(BUILD.machine).deb
-PKG.deb.basename = handbrake-$(HB.version)
-PKG.src.deb.tar = handbrake_$(HB.version).tar.gz
+PKG.cli.deb = $(PKG.out/)$(HB.name)-$(HB.debversion)-Ubuntu_CLI_$(BUILD.machine).deb
+PKG.gui.deb = $(PKG.out/)$(HB.name)-$(HB.debversion)-Ubuntu_GUI_$(BUILD.machine).deb
+PKG.deb.basename = $(HB.name.lower)-$(HB.debversion)
+PKG.src.deb.tar = $(HB.name.lower)_$(HB.debversion).tar.gz
 PKG.src.deb.stamp = $(STAGE.out.src/).debsrc.stamp
-PKG.src.deb = $(PKG.out/)handbrake_$(HB.version).deb
+PKG.src.deb = $(PKG.out/)$(HB.name.lower)_$(HB.debversion).deb
 
-PKG.cli.tmp.deb = $(PKG.out/)handbrake-cli_$(HB.version)_$(PKG.deb.machine).deb
-PKG.gui.tmp.deb = $(PKG.out/)handbrake-gtk_$(HB.version)_$(PKG.deb.machine).deb
+PKG.cli.tmp.deb = $(PKG.out/)$(HB.name.lower)-cli_$(HB.debversion)_$(PKG.deb.machine).deb
+PKG.gui.tmp.deb = $(PKG.out/)$(HB.name.lower)-gtk_$(HB.debversion)_$(PKG.deb.machine).deb
 
 PKG.native.rpm.stamp = $(RPM.out/).rpm.stamp
+PKG.rpm.stamp = $(PKG.out/).rpm.stamp
 
-PKG.gui.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-gui-$(HB.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
-PKG.cli.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-cli-$(HB.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+PKG.gui.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name.lower)-gui-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+PKG.cli.native.rpm = $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name.lower)-cli-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
 
-PKG.cli.rpm  = $(PKG.out/)$(HB.name)-$(HB.version)-Fedora_CLI_$(BUILD.machine).rpm
-PKG.gui.rpm  = $(PKG.out/)$(HB.name)-$(HB.version)-Fedora_GUI_$(BUILD.machine).rpm
+PKG.cli.rpm  = $(PKG.out/)$(HB.name.lower)-cli-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
+PKG.gui.rpm  = $(PKG.out/)$(HB.name.lower)-gui-$(PKG.rpm.hb.version)-$(PKG.release)$(PKG.rpm.dist).$(PKG.rpm.machine).rpm
 RPM.out  = $(STAGE.out/)rpm
 RPM.out/ = $(STAGE.out/)rpm/
 RPMROOT.out  = $(PWD)/$(STAGE.out/)rpmroot
diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules
index 23692fb..91ad55a 100644
--- a/pkg/linux/module.rules
+++ b/pkg/linux/module.rules
@@ -1,5 +1,5 @@
 pkg.create.deb:: $(PKG.gui.deb) $(PKG.cli.deb)
-pkg.create.rpm:: $(PKG.gui.rpm)
+pkg.create.rpm:: $(PKG.rpm.stamp)
 pkg.create.src.deb:: $(PKG.src.deb.stamp)
 pkg.create.tar:: pkg.create $(PKG.cli.tar)
 
@@ -21,17 +21,18 @@ $(STAGE.out.cli/):
 # RPM binary package rules
 #
 $(PKG.rpm.src.tar.bz2): $(STAGE.out.rpm.src/)
-	$(TAR.exe) cjf $@ -C $(STAGE.out.rpm.src/) $(PKG.basename)
+	$(TAR.exe) cjf $(PKG.rpm.src.tar.bz2) -C $(STAGE.out.rpm.src/) $(PKG.rpm.basename)
 
 $(STAGE.out.rpm.src/): GNUmakefile
 #	-$(MKDIR.exe) -p $(STAGE.out.rpm.src/)$(PKG.basename)
 #	tar c --exclude build ../* | tar x -C $(STAGE.out.rpm.src/)$(PKG.basename)
 	-$(RM.exe) -rf $(STAGE.out.src/)
 	make contrib.fetch
-	svn export -r$(HB.repo.rev) $(HB.repo.url) $@/$(PKG.basename)
-	svn info $(HB.repo.url)@$(HB.repo.rev) > $@/$(PKG.basename)/version.txt
-	-$(MKDIR.exe) $(STAGE.out.rpm.src/)$(PKG.basename)/download
-	$(CP.exe) $(SRC/)download/*.tar.* $(STAGE.out.rpm.src/)$(PKG.basename)/download
+	$(MKDIR.exe) -p $@
+	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.rpm.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $@
+	$(SRC/)scripts/repo-info.sh $(SRC/) > $@/$(PKG.rpm.basename)/version.txt
+	-$(MKDIR.exe) $(STAGE.out.rpm.src/)$(PKG.rpm.basename)/download
+	$(CP.exe) $(SRC/)download/*.tar.* $(STAGE.out.rpm.src/)$(PKG.rpm.basename)/download
 
 $(PKG.native.rpm.stamp): $(PKG.rpm.src.tar.bz2)
 	-$(MKDIR.exe) -p $(RPM.out/)SOURCES
@@ -40,18 +41,19 @@ $(PKG.native.rpm.stamp): $(PKG.rpm.src.tar.bz2)
 	-$(MKDIR.exe) -p $(RPM.out/)RPMS
 	-$(MKDIR.exe) -p $(RPM.out/)SRPMS
 	-$(MKDIR.exe) -p $(RPMROOT.out/)
-	echo "%define name $(HB.name)" > $(RPM.out/)SPECS/ghb.spec
-	echo "%define release 1" >> $(RPM.out/)SPECS/ghb.spec
-	echo "%define version $(HB.version)" >> $(RPM.out/)SPECS/ghb.spec
+	echo "%define name $(HB.name.lower)" > $(RPM.out/)SPECS/ghb.spec
+	echo "%define release $(PKG.release)" >> $(RPM.out/)SPECS/ghb.spec
+	echo "%define version $(PKG.rpm.hb.version)" >> $(RPM.out/)SPECS/ghb.spec
 	cat $(GTK.src/)ghb.spec >> $(RPM.out/)SPECS/ghb.spec
 	$(CP.exe) $(PKG.rpm.src.tar.bz2) $(RPM.out/)SOURCES
 	rpmbuild --define="_topdir $(PWD)/$(RPM.out)" --buildroot $(RPMROOT.out) -ba $(RPM.out/)SPECS/ghb.spec
 	$(TOUCH.exe) $(PKG.native.rpm.stamp)
 
-$(PKG.gui.rpm): | $(dir $(PKG.gui.rpm))
-$(PKG.gui.rpm): $(PKG.native.rpm.stamp)
+$(PKG.rpm.stamp): | $(dir $(PKG.gui.rpm))
+$(PKG.rpm.stamp): $(PKG.native.rpm.stamp)
 	$(CP.exe) $(PKG.gui.native.rpm) $(PKG.gui.rpm)
 	$(CP.exe) $(PKG.cli.native.rpm) $(PKG.cli.rpm)
+	$(TOUCH.exe) $(PKG.rpm.stamp)
 
 #
 # Debian binary package rules
@@ -63,7 +65,7 @@ $(PKG.gui.tmp.deb): GNUmakefile
 	fakeroot $(MAKE) -C $(SRC/) -f debian/rules clean
 	$(MAKE) BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure -C $(SRC/) -f debian/rules build
 	echo $(PKG.out/)
-	fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.version)" BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure PKGDESTDIR=$(PWD)/$(PKG.out/) -C $(SRC/) -f debian/rules binary
+	fakeroot $(MAKE) FORCEVERSION="-- -v$(HB.debversion)" BUILDDIR=$(PWD)/$(BUILD) CONFIGURE=configure PKGDESTDIR=$(PWD)/$(PKG.out/) -C $(SRC/) -f debian/rules binary
 
 $(PKG.gui.deb): | $(dir $(PKG.gui.deb))
 $(PKG.gui.deb): $(PKG.gui.tmp.deb)
@@ -77,32 +79,49 @@ $(PKG.cli.deb): $(PKG.gui.tmp.deb)
 # Debian source package rules
 #
 pkg.push.src.deb:: $(PKG.src.deb.stamp)
-	(cd $(STAGE.out.src/)utopic && dput handbrake-snapshots handbrake_$(HB.version)ppa1~utopic1_source.changes )
-	(cd $(STAGE.out.src/)trusty && dput handbrake-snapshots handbrake_$(HB.version)ppa1~trusty1_source.changes )
+	(cd $(STAGE.out.src/)wily && dput handbrake-git-snapshots $(HB.name.lower)_$(HB.debversion)-zhb-1ppa1~wily1_source.changes )
+	(cd $(STAGE.out.src/)vivid && dput handbrake-git-snapshots $(HB.name.lower)_$(HB.debversion)-zhb-1ppa1~vivid1_source.changes )
+	(cd $(STAGE.out.src/)trusty && dput handbrake-git-snapshots $(HB.name.lower)_$(HB.debversion)-zhb-1ppa1~trusty1_source.changes )
 
 $(PKG.src.deb.stamp): GNUmakefile
 	-$(RM.exe) -rf $(STAGE.out.src/)
 	make contrib.fetch
-	svn export -r$(HB.repo.rev) $(HB.repo.url) $(STAGE.out.src/)utopic/$(PKG.deb.basename)
-	svn info $(HB.repo.url)@$(HB.repo.rev) >   $(STAGE.out.src/)utopic/$(PKG.deb.basename)/version.txt
-	$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)utopic/$(PKG.deb.basename)
-	cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)utopic/$(PKG.deb.basename)
-	$(CP.exe) $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/control.utopic $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/control
-	$(CP.exe) $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/rules.utopic $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/rules
-	echo "handbrake ($(HB.version)ppa1~utopic1) utopic; urgency=low" > $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/changelog
-	echo "  * Snapshot" >> $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/changelog
-	echo "    - See timeline at http://trac.handbrake.fr/timeline" >> $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/changelog
-	echo "" >> $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/changelog
-	echo " -- John Stebbins <jstebbins.hb at gmail.com>  Sun, 11 Apr 2010 9:51:07 -0800" >> $(STAGE.out.src/)utopic/$(PKG.deb.basename)/debian/changelog
-	$(TAR.exe) czf $(STAGE.out.src/)utopic/$(PKG.src.deb.tar) -C $(STAGE.out.src/)utopic $(PKG.deb.basename)
-	(cd $(STAGE.out.src/)utopic/$(PKG.deb.basename) && debuild -S -kjstebbins.hb)
-	svn export -r$(HB.repo.rev) $(HB.repo.url) $(STAGE.out.src/)trusty/$(PKG.deb.basename)
-	svn info $(HB.repo.url)@$(HB.repo.rev) >   $(STAGE.out.src/)trusty/$(PKG.deb.basename)/version.txt
+	$(MKDIR.exe) -p $(STAGE.out.src/)wily
+	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.deb.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)wily/
+	$(SRC/)scripts/repo-info.sh $(SRC/) > $(STAGE.out.src/)wily/$(PKG.deb.basename)/version.txt
+	$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)wily/$(PKG.deb.basename)
+	cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)wily/$(PKG.deb.basename)
+	$(CP.exe) $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/control.wily $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/control
+	$(CP.exe) $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/rules.wily $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/rules
+	echo "$(HB.name.lower) ($(HB.debversion)-zhb-1ppa1~wily1) wily; urgency=low" > $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/changelog
+	echo "  * Snapshot" >> $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/changelog
+	echo "    - See timeline at http://trac.handbrake.fr/timeline" >> $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/changelog
+	echo "" >> $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/changelog
+	echo " -- John Stebbins <jstebbins.hb at gmail.com>  Sun, 11 Apr 2010 9:51:07 -0800" >> $(STAGE.out.src/)wily/$(PKG.deb.basename)/debian/changelog
+	$(TAR.exe) czf $(STAGE.out.src/)wily/$(PKG.src.deb.tar) -C $(STAGE.out.src/)wily $(PKG.deb.basename)
+	(cd $(STAGE.out.src/)wily/$(PKG.deb.basename) && debuild -S -kjstebbins.hb)
+	$(MKDIR.exe) -p $(STAGE.out.src/)vivid
+	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.deb.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)vivid/
+	$(SRC/)scripts/repo-info.sh $(SRC/) > $(STAGE.out.src/)vivid/$(PKG.deb.basename)/version.txt
+	$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)vivid/$(PKG.deb.basename)
+	cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)vivid/$(PKG.deb.basename)
+	$(CP.exe) $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/control.vivid $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/control
+	$(CP.exe) $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/rules.vivid $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/rules
+	echo "$(HB.name.lower) ($(HB.debversion)-zhb-1ppa1~vivid1) vivid; urgency=low" > $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/changelog
+	echo "  * Snapshot" >> $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/changelog
+	echo "    - See timeline at http://trac.handbrake.fr/timeline" >> $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/changelog
+	echo "" >> $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/changelog
+	echo " -- John Stebbins <jstebbins.hb at gmail.com>  Sun, 11 Apr 2010 9:51:07 -0800" >> $(STAGE.out.src/)vivid/$(PKG.deb.basename)/debian/changelog
+	$(TAR.exe) czf $(STAGE.out.src/)vivid/$(PKG.src.deb.tar) -C $(STAGE.out.src/)vivid $(PKG.deb.basename)
+	(cd $(STAGE.out.src/)vivid/$(PKG.deb.basename) && debuild -S -kjstebbins.hb)
+	$(MKDIR.exe) -p $(STAGE.out.src/)trusty
+	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.deb.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $(STAGE.out.src/)trusty/
+	$(SRC/)scripts/repo-info.sh $(SRC/) > $(STAGE.out.src/)trusty/$(PKG.deb.basename)/version.txt
 	$(CP.exe) -a $(SRC/)download $(STAGE.out.src/)trusty/$(PKG.deb.basename)
 	cp -a $(PWD)/$(PKG.debian) $(STAGE.out.src/)trusty/$(PKG.deb.basename)
 	$(CP.exe) $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/control.trusty $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/control
 	$(CP.exe) $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/rules.trusty $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/rules
-	echo "handbrake ($(HB.version)ppa1~trusty1) trusty; urgency=low" > $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/changelog
+	echo "$(HB.name.lower) ($(HB.debversion)-zhb-1ppa1~trusty1) trusty; urgency=low" > $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/changelog
 	echo "  * Snapshot" >> $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/changelog
 	echo "    - See timeline at http://trac.handbrake.fr/timeline" >> $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/changelog
 	echo "" >> $(STAGE.out.src/)trusty/$(PKG.deb.basename)/debian/changelog
diff --git a/pkg/mingw/module.defs b/pkg/mingw/module.defs
index cce22d6..6013a48 100644
--- a/pkg/mingw/module.defs
+++ b/pkg/mingw/module.defs
@@ -1,9 +1,13 @@
-PKG.cli.zip = $(PKG.out/)$(HB.name)-$(HB.version)-$(BUILD.machine)-Win_CLI.zip
+PKG.platname = win
 
+PKG.cli.zip   = $(PKG.out/)$(HB.name)CLI-$(HB.version)-$(PKG.platname)-$(BUILD.machine).zip
+PKG.libhb.zip = $(PKG.out/)LibHB-$(HB.version)-$(PKG.platname)-$(BUILD.machine).zip
 PKG.mingw.lib = $(SRC/)libraries
 
 STAGE.out.cli/ = $(STAGE.out/)cli/
+STAGE.out.libhb/ = $(STAGE.out/)libhb/
 
 ###############################################################################
 
 BUILD.out += $(PKG.cli.zip)
+BUILD.out += $(PKG.libhb.zip)
diff --git a/pkg/mingw/module.rules b/pkg/mingw/module.rules
index 3ce0580..c8d132c 100644
--- a/pkg/mingw/module.rules
+++ b/pkg/mingw/module.rules
@@ -1,9 +1,12 @@
-pkg.create.zip:: pkg.create $(PKG.cli.zip)
+pkg.create.zip:: pkg.create $(PKG.cli.zip) $(PKG.libhb.zip)
 
 $(PKG.cli.zip): | $(dir $(PKG.cli.zip))
 $(PKG.cli.zip): | $(STAGE.out.cli/)
 	cd $(STAGE.out.cli/) && $(ZIP.exe) -r $(call fn.ABSOLUTE,$(PKG.cli.zip)) .
 
+$(PKG.libhb.zip): | $(dir $(PKG.libhb.zip))
+$(PKG.libhb.zip): | $(STAGE.out.libhb/)
+	cd $(STAGE.out.libhb/) && $(ZIP.exe) -r $(call fn.ABSOLUTE,$(PKG.libhb.zip)) .
 
 $(STAGE.out.cli/):
 	-$(MKDIR.exe) -p $@
@@ -11,4 +14,10 @@ $(STAGE.out.cli/):
 	$(CP.exe) -R contrib/etc/fonts $(STAGE.out.cli/)/fonts/
 	$(call STAGE.doc,$(STAGE.out.cli/))
 
+$(STAGE.out.libhb/):
+	-$(MKDIR.exe) -p $@
+	$(CP.exe) libhb/hb.dll $(STAGE.out.libhb/)
+	$(CP.exe) -R contrib/etc/fonts $(STAGE.out.libhb/)/fonts/
+	$(call STAGE.doc,$(STAGE.out.libhb/))
+
 
diff --git a/pkg/module.defs b/pkg/module.defs
index 2bc6081..ad0f244 100644
--- a/pkg/module.defs
+++ b/pkg/module.defs
@@ -4,7 +4,7 @@ PKG.in/  = $(SRC/)pkg/
 PKG.out/ = $(BUILD/)pkg/
 
 PKG.basename            = $(HB.name)-$(HB.version)
-PKG.src.tar.bz2         = $(PKG.out/)$(PKG.basename).tar.bz2
+PKG.src.tar.bz2         = $(PKG.out/)$(PKG.basename)-source.tar.bz2
 PKG.src-contrib.tar.bz2 = $(PKG.out/)$(PKG.basename)-contrib.tar.bz2
 
 STAGE.out/     = $(BUILD/)stage/
diff --git a/pkg/module.rules b/pkg/module.rules
index 9c0457e..5ec109f 100644
--- a/pkg/module.rules
+++ b/pkg/module.rules
@@ -17,8 +17,9 @@ $(PKG.src.tar.bz2): | $(STAGE.out.src/)
 	$(TAR.exe) cjf $@ -C $(STAGE.out.src/) $(PKG.basename)
 
 $(STAGE.out.src/):
-	svn export -r$(HB.repo.rev) $(HB.repo.url) $@/$(PKG.basename)
-	svn info $(HB.repo.url)@$(HB.repo.rev) > $@/$(PKG.basename)/version.txt
+	$(MKDIR.exe) -p $@
+	$(GIT.exe) -C $(SRC/) archive --format=tar --prefix=$(PKG.basename)/ $(HB.repo.shorthash) | $(TAR.exe) -xC $@
+	$(SRC/)scripts/repo-info.sh $(SRC/) $(GIT.exe) > $@/$(PKG.basename)/version.txt
 
 $(PKG.src-contrib.tar.bz2):
 	$(TAR.exe) cjf $@ -C $(CONTRIB.download/) \
diff --git a/scripts/repo-info.sh b/scripts/repo-info.sh
new file mode 100755
index 0000000..4e87953
--- /dev/null
+++ b/scripts/repo-info.sh
@@ -0,0 +1,79 @@
+#! /bin/bash
+#
+# Retrieves git repository info for directory ${1} using command ${2}
+
+function repo_info()
+{
+    local repo_dir git_exe commit upstream err
+
+    # Process args
+    repo_dir='.'
+    if [[ ${1} ]]; then
+        repo_dir=${1}
+    fi
+    git_exe='git'
+    if [[ ${2} ]]; then
+        git_exe=${2}
+    fi
+
+    # Switch to working directory
+    if ! cd ${repo_dir} 2>/dev/null; then
+        echo "Invalid directory ${repo_dir}." 1>&2
+        return 1
+    fi
+
+    # Check whether we have git
+    if ! hash ${git_exe} 2>/dev/null; then
+        echo "Command '${git_exe}' not found." 1>&2
+        return 1
+    fi
+
+    # Check if there is a valid git repo here
+    HASH=$(${git_exe} rev-parse HEAD)
+    SHORTHASH=$(${git_exe} rev-parse --short HEAD)
+    err=$?
+    if [[ ${err} -ne 0 ]]; then
+        echo "Not a valid repository." 1>&2
+        return ${err}
+    elif [[ -z ${HASH} ]]; then
+        echo "Not a valid repository." 1>&2
+        return 1
+    fi
+
+    # Retrieve info
+    URL=$(${git_exe} config remote.origin.url)
+
+    # check if an annotated tag is reachable from HEAD
+    TAG=$(${git_exe} describe --tags --abbrev=0 --exact-match --match \[0-9\]\*.\[0-9\]\*.\[0-9\]\* HEAD 2> /dev/null)
+    if [[ ${TAG} ]]; then
+        # if TAG is a release tag and HASH == TAG_HASH, this is release code
+        TAG_HASH=$(${git_exe} rev-list ${TAG} --max-count=1)
+        REV=$(${git_exe} rev-list $(${git_exe} merge-base ${TAG} HEAD).. --count)
+    else
+        REV=$(${git_exe} rev-list HEAD --count)
+    fi
+
+    BRANCH=$(${git_exe} symbolic-ref -q --short HEAD)
+    REMOTE="${URL}"
+    upstream=$(${git_exe} config branch.${BRANCH}.remote)
+    if [[ ${upstream} ]]; then
+        REMOTE="${upstream}"
+    fi
+    DATE=$(${git_exe} log -1 --format="format:%ci")
+
+    # Output
+    # Only write tag and rev if they exist.
+    echo "URL=${URL}"
+    echo "HASH=${HASH}"
+    echo "SHORTHASH=${SHORTHASH}"
+    if [[ ${TAG} ]]; then echo "TAG=${TAG}"; fi
+    if [[ ${TAG_HASH} ]]; then echo "TAG_HASH=${TAG_HASH}"; fi
+    if [[ ${REV} ]]; then echo "REV=${REV}"; fi
+    echo "BRANCH=${BRANCH}"
+    echo "REMOTE=${REMOTE}"
+    echo "DATE=${DATE}"
+
+    return 0
+}
+
+repo_info "$@"
diff --git a/scripts/tag-release.sh b/scripts/tag-release.sh
new file mode 100755
index 0000000..9f7d488
--- /dev/null
+++ b/scripts/tag-release.sh
@@ -0,0 +1,211 @@
+#! /bin/bash
+#
+# Usage: tag-release.sh <release-ver> [<ref>]
+#
+# Creates a new bugfix branch and release tag for a release.
+# Optionally, the release can be based off a specific git ref.
+# Default is HEAD of the current branch.
+#
+# The script does a lot of error checking, but boils down to
+# the following actions.
+#
+# For major/minor releases (X.Y.0) from master branch:
+#   git checkout -b X.Y.x
+#   git tag -a X.Y.Z -m "X.Y.Z" HEAD
+# and optionally:
+#   git push -u origin X.Y.x
+#   git push origin refs/tags/X.Y.Z
+#
+# For bugfix releases from associated branch (X.Y.x):
+#   git tag -a X.Y.Z -m "X.Y.Z" HEAD
+# and optionally:
+#   git push origin refs/tags/X.Y.Z
+#
+
+GIT_EXE='git'
+
+function validate_repo()
+{
+    local HASH err AHEAD BEHIND proceed
+
+    # Check whether we have git
+    if ! hash ${GIT_EXE} 2>/dev/null; then
+        echo "Command '${GIT_EXE}' not found." 1>&2
+        return 1
+    fi
+
+    # Check if there is a valid git repo here
+    HASH=$(${GIT_EXE} rev-parse HEAD)
+    err=$?
+    if [[ ${err} -ne 0 ]]; then
+        echo "Not a valid repository." 1>&2
+        return ${err}
+    elif [[ -z ${HASH} ]]; then
+        echo "Not a valid repository." 1>&2
+        return 1
+    fi
+
+    if [[ -n "$(${GIT_EXE} status --porcelain)" ]]; then
+        echo "There are uncommitted changes.  Aborting." 1>&2
+        return 1
+    fi
+
+    echo "Fetching repo data..."
+    ${GIT_EXE} fetch
+    err=$?
+    if [[ ${err} -ne 0 ]]; then
+        echo "Failed to fetch repo data." 1>&2
+        return ${err}
+    fi
+    AHEAD=$(${GIT_EXE} rev-list @{u}..HEAD --count)
+    BEHIND=$(${GIT_EXE} rev-list HEAD..@{u} --count)
+    if [[ ${AHEAD} -ne 0 ]]; then
+        echo "There are unpushed changes. Continue anyway? (y/N)"
+        read proceed
+        if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
+            echo "Aborting..."
+            return 1
+        fi
+    fi
+    if [[ ${BEHIND} -ne 0 ]]; then
+        echo "There are unmerged upstream changes. Continue anyway? (y/N)"
+        read proceed
+        if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
+            echo "Aborting..."
+            return 1
+        fi
+    fi
+}
+
+function tag_release()
+{
+    local TAG REF COMMIT BRANCH proceed new_branch ERR HASH
+
+    TAG=${1}
+    REF=${2}
+
+    if [ "x${TAG}" == "x" ]; then
+        echo "Missing release tag (e.g. 0.10.0)"
+    fi
+
+    # bugfix branch name
+    BRANCH=${TAG%.[0-9]*}.x
+
+    if [ "x${REF}" == "x" ]; then
+        echo "Creating release tag ${TAG} and branch ${BRANCH} from HEAD, proceed? (y/N)"
+        # retrive full hash of HEAD
+        COMMIT=$(${GIT_EXE} rev-list HEAD --max-count=1)
+    else
+        echo "Creating release tag ${TAG} and branch ${BRANCH} from ${REF}, proceed? (y/N)"
+        # retrieve full hash from ref or short hash
+        COMMIT=$(${GIT_EXE} rev-list ${REF} --max-count=1)
+    fi
+    read proceed
+    if [[ ( "x${proceed}" != "xy" ) && ( "x${proceed}" != "xY" ) ]] ; then
+        echo "Aborting..."
+        return 0
+    fi
+
+    # check if the remote branch already exists
+    ${GIT_EXE} rev-parse --quiet --verify origin/${BRANCH} > /dev/null
+    if [ $? -ne 0 ]; then
+        # remote branch does not exist
+        new_branch=1
+        # does the branch already exist locally?
+        ${GIT_EXE} rev-parse --quiet --verify ${BRANCH} > /dev/null
+        if [ $? -ne 0 ]; then
+            # local branch does not exist
+            # create bugfix branch from commit
+            ${GIT_EXE} checkout "${COMMIT}" -b "${BRANCH}"
+            ERR=$?
+            if [ ${ERR} -ne 0 ]; then
+                echo "Failed to create branch ${BRANCH}"
+                return ${ERR}
+            fi
+        else
+            # local branch already exists
+            # When the branch already exists, make sure it is being used!
+            current_branch=$(${GIT_EXE} rev-parse --abbrev-ref HEAD)
+            if [ "$current_branch" != "${BRANCH}" ]; then
+                echo "You did not checkout the correct branch ${BRANCH} for tag ${TAG}"
+                return 1
+            fi
+        fi
+    else
+        new_branch=0
+        # When the branch already exists, make sure it is being used!
+        current_branch=$(${GIT_EXE} rev-parse --abbrev-ref HEAD)
+        if [ "$current_branch" != "${BRANCH}" ]; then
+            echo "You did not checkout the correct branch ${BRANCH} for tag ${TAG}"
+            return 1
+        fi
+    fi
+
+    # at this point we should be at the head of the tracking branch
+    # for this release.  Make certain that HEAD matches COMMIT
+    HASH=$(${GIT_EXE} rev-list HEAD --max-count=1)
+    if [ ${HASH} != ${COMMIT} ]; then
+        echo "Commit specified does not match current branch HEAD"
+        return 1
+    fi
+
+    # create tag
+    ${GIT_EXE} tag -a "${TAG}" -m "${TAG}" HEAD
+    ERR=$?
+    if [ ${ERR} -ne 0 ]; then
+        echo "Failed to create tag ${TAG}"
+        # cleanup... remove the branch that was created
+        ${GIT_EXE} branch -d "${BRANCH}"
+        return ${ERR}
+    fi
+
+    # checkout tag in preparation for building release
+    # this should put you in a "detached HEAD" state
+    ${GIT_EXE} checkout "${TAG}"
+    ERR=$?
+    if [ ${ERR} -ne 0 ]; then
+        echo "Failed to checkout tag ${TAG}"
+        # cleanup... remove the branch that was created
+        ${GIT_EXE} branch -d "${BRANCH}"
+        return ${ERR}
+    fi
+
+    remote=$(${GIT_EXE} config remote.origin.url)
+    echo
+    echo "Do you wish to push this release branch and tag to $remote? (y/N)"
+    echo "You may want to do this manually after creating and verifying release."
+    echo "e.g."
+    echo "    git push -u origin ${BRANCH}"
+    echo "    git push origin refs/tags/${TAG}"
+    read proceed
+    if [[ ( "x${proceed}" == "xy" ) || ( "x${proceed}" == "xY" ) ]] ; then
+        if [ $new_branch .eq 1 ]; then
+            ${GIT_EXE} push -u origin "${BRANCH}"
+            ERR=$?
+            if [ ${ERR} -ne 0 ]; then
+                echo "Failed to push branch ${BRANCH} to remote"
+                return ${ERR}
+            fi
+        fi
+        ${GIT_EXE} push origin refs/tags/"${TAG}"
+        ERR=$?
+        if [ ${ERR} -ne 0 ]; then
+            echo "Failed to push tag ${BRANCH} to remote"
+            return ${ERR}
+        fi
+    else
+        echo "Branch and tag are local, changes not pushed to remote!"
+    fi
+
+}
+
+function main()
+{
+    if validate_repo; then
+        tag_release "$@"
+    else
+        return $?
+    fi
+}
+
+main "$@"
diff --git a/test/test.c b/test/test.c
index 42bacc9..0a9d690 100644
--- a/test/test.c
+++ b/test/test.c
@@ -3640,12 +3640,16 @@ static int ParseOptions( int argc, char ** argv )
     #define QSV_IMPLEMENTATION   297
     #define FILTER_NLMEANS       298
     #define FILTER_NLMEANS_TUNE  299
+    #define VERSION              300
+    #define DESCRIBE             301
 
     for( ;; )
     {
         static struct option long_options[] =
           {
             { "help",        no_argument,       NULL,    'h' },
+            { "version",     no_argument,       NULL,    VERSION },
+            { "describe",    no_argument,       NULL,    DESCRIBE },
             { "update",      no_argument,       NULL,    'u' },
             { "verbose",     optional_argument, NULL,    'v' },
             { "no-dvdnav",   no_argument,       NULL,    DVDNAV },
@@ -3788,6 +3792,12 @@ static int ParseOptions( int argc, char ** argv )
             case 'h':
                 ShowHelp();
                 exit( 0 );
+            case VERSION:
+                printf("HandBrake %s\n", hb_get_version(NULL));
+                exit( 0 );
+            case DESCRIBE:
+                printf("%s\n", hb_get_full_description());
+                exit( 0 );
             case 'u':
                 update = 1;
                 break;
diff --git a/version.txt b/version.txt
index d4ef6a5..c42a397 100644
--- a/version.txt
+++ b/version.txt
@@ -1,11 +1,9 @@
-Path: 0.10.2
-URL: svn://svn.handbrake.fr/HandBrake/tags/0.10.2
-Relative URL: ^/tags/0.10.2
-Repository Root: svn://svn.handbrake.fr/HandBrake
-Repository UUID: b64f7644-9d1e-0410-96f1-a4d463321fa5
-Revision: 7288
-Node Kind: directory
-Last Changed Author: sr55
-Last Changed Rev: 7288
-Last Changed Date: 2015-06-09 21:11:42 +0200 (mar., 09 juin 2015)
-
+URL=https://github.com/HandBrake/HandBrake.git
+HASH=2ca3285957a3d7f702af2dbe1e04fc17978782ea
+SHORTHASH=2ca3285
+TAG=0.10.3
+TAG_HASH=2ca3285957a3d7f702af2dbe1e04fc17978782ea
+REV=0
+BRANCH=
+REMOTE=https://github.com/HandBrake/HandBrake.git
+DATE=2016-01-18 21:39:17 +0000

-- 
handbrake packaging



More information about the pkg-multimedia-commits mailing list