This commit is contained in:
j 2017-03-15 10:15:45 +00:00
parent 6bce711ea3
commit 146c1ee9e7
4 changed files with 31 additions and 10 deletions

View File

@ -20,6 +20,17 @@ def get_videoduration(video):
duration = float([s for s in data['streams'] if 'width' in s][0]['duration']) - 70/60
return '%0.3f' % duration
def is_new(xml, mp4):
if not os.path.exists(mp4):
return True
xtime = os.path.getmtime(xml)
vtime = max(
os.path.getmtime(mp4),
os.path.getmtime('text.html'),
os.path.getmtime('VOCALS.json')
)
return vtime < xtime
for xml in sorted(glob('output/*/*.xml')):
if xml.endswith('.audio.xml'):
continue
@ -30,7 +41,7 @@ for xml in sorted(glob('output/*/*.xml')):
pre_480p = mp4_480p + '.pre.mp4'
video = mp4 + '.v.mp4'
audio = mp4 + '.wav'
if not os.path.exists(mp4) or os.path.getmtime(xml) > os.path.getmtime(mp4):
if is_new(xml, mp4):
subprocess.call([
'qmelt', xml, '-consumer', 'avformat:' + video, 'vcodec=libx264', 'strict=-2'
])

View File

@ -16,11 +16,14 @@ KEYWORDS = {
"zomia"
],
"B": [
"buffalo",
"buffalo",
"buffalo",
"buffalo",
"agriculture",
"barbarian",
"bondage",
"boundary",
"buffalo",
"colonialism",
"peasant",
"royalty",
@ -39,8 +42,8 @@ KEYWORDS = {
"transmission"
],
"D": [
"burial",
"decay",
"burial",
"dispersal",
"disaggregate",
"forensics",
@ -98,7 +101,7 @@ KEYWORDS = {
"water"
],
"I": [
"aerial shot",
"aerial",
"agriculture",
"authors",
"writing",
@ -141,7 +144,7 @@ KEYWORDS = {
"unreadable"
],
"M": [
"aerial shot",
"aerial",
"cosmology",
"india bce",
"magic",
@ -154,7 +157,7 @@ KEYWORDS = {
"survey"
],
"N": [
"aerial shot",
"aerial",
"narcotics",
"narration",
"nationalism",

View File

@ -94,7 +94,7 @@ for clip in data['text']:
add_blank(overlay, frames)
else:
frames = int(clip['duration'] * fps)
add_text(overlay, clip['text'].upper(), frames)
add_text(overlay, clip['text'], frames)
for clip in data['music']:
frames = int(clip['duration'] * fps)

View File

@ -16,12 +16,16 @@ body {
}
#text {
color: #fff;
//color: rgb(192, 192, 192);
text-align: center;
font-family: Menlo;
font-variant: small-caps;
//font-variant: small-caps;
//text-shadow: -2px -2px 0 black, 2px -2px 0 black, -2px 2px 0 black, 2px 2px 0 black;
text-shadow: 2px 4px 3px black;
//text-transform: uppercase;
//font-weight: bold;
text-shadow: 2px 4px 3px black;
}
#text2 {
color: #fff;
@ -57,7 +61,10 @@ function onLoad() {
}
function handleFontSize() {
// Set base font-size to 10% of window height
document.body.style.fontSize = (window.innerHeight * 0.05) + "px";
//document.body.style.fontSize = (window.innerHeight * 0.1) + "px";
//document.body.style.fontSize = (window.innerHeight * 0.05) + "px";
document.body.style.fontSize = (window.innerHeight * 0.09) + "px";
/*
var fontSize = window.innerHeight * 0.1;