call final file segment.mp4
This commit is contained in:
parent
c6a8453fc2
commit
2d2256de14
2 changed files with 47 additions and 43 deletions
|
|
@ -109,36 +109,36 @@
|
||||||
|
|
||||||
const sub_handlers = {};
|
const sub_handlers = {};
|
||||||
var playlist = [
|
var playlist = [
|
||||||
"/01_Life/front.mp4",
|
"/01_Life/segment.mp4",
|
||||||
"/02_Seeing/front.mp4",
|
"/02_Seeing/segment.mp4",
|
||||||
"/03_Capacity/front.mp4",
|
"/03_Capacity/segment.mp4",
|
||||||
"/04_Landscape/front.mp4",
|
"/04_Landscape/segment.mp4",
|
||||||
"/05_Relations/front.mp4",
|
"/05_Relations/segment.mp4",
|
||||||
"/06_Will/front.mp4",
|
"/06_Will/segment.mp4",
|
||||||
"/07_Self/front.mp4",
|
"/07_Self/segment.mp4",
|
||||||
"/08_Field/front.mp4",
|
"/08_Field/segment.mp4",
|
||||||
"/09_Theatre/front.mp4",
|
"/09_Theatre/segment.mp4",
|
||||||
"/10_Substance/front.mp4",
|
"/10_Substance/segment.mp4",
|
||||||
"/11_Science/front.mp4",
|
"/11_Science/segment.mp4",
|
||||||
"/12_Energy/front.mp4",
|
"/12_Energy/segment.mp4",
|
||||||
"/13_Geopolitics/front.mp4",
|
"/13_Geopolitics/segment.mp4",
|
||||||
"/14__Chance/front.mp4",
|
"/14__Chance/segment.mp4",
|
||||||
"/15_Morality/front.mp4",
|
"/15_Morality/segment.mp4",
|
||||||
"/16_Evolution/front.mp4",
|
"/16_Evolution/segment.mp4",
|
||||||
"/17_Computing/front.mp4",
|
"/17_Computing/segment.mp4",
|
||||||
"/18_Semi-Conductors/front.mp4",
|
"/18_Semi-Conductors/segment.mp4",
|
||||||
"/19_Love/front.mp4",
|
"/19_Love/segment.mp4",
|
||||||
"/20_Reversibility/front.mp4",
|
"/20_Reversibility/segment.mp4",
|
||||||
"/21_Weakness/front.mp4",
|
"/21_Weakness/segment.mp4",
|
||||||
"/22_Elections/front.mp4",
|
"/22_Elections/segment.mp4",
|
||||||
"/23_People/front.mp4",
|
"/23_People/segment.mp4",
|
||||||
"/24_Corporation/front.mp4",
|
"/24_Corporation/segment.mp4",
|
||||||
"/25_Instruments/front.mp4",
|
"/25_Instruments/segment.mp4",
|
||||||
"/26_Practice/front.mp4",
|
"/26_Practice/segment.mp4",
|
||||||
"/27_Weaponry/front.mp4",
|
"/27_Weaponry/segment.mp4",
|
||||||
"/28_Art/front.mp4",
|
"/28_Art/segment.mp4",
|
||||||
"/29_Help/front.mp4",
|
"/29_Help/segment.mp4",
|
||||||
"/30_Self-help/front.mp4",
|
"/30_Self-help/segment.mp4",
|
||||||
]
|
]
|
||||||
//var prefix = '../render/'
|
//var prefix = '../render/'
|
||||||
var prefix = 'https://power.0x2620.org/static/render/'
|
var prefix = 'https://power.0x2620.org/static/render/'
|
||||||
|
|
@ -205,11 +205,13 @@
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
name = document.location.hash.slice(1)
|
name = document.location.hash.slice(1)
|
||||||
|
console.log('on load', name)
|
||||||
const parts = name.split('/')
|
const parts = name.split('/')
|
||||||
if (parts.length == 2) {
|
if (parts.length == 2) {
|
||||||
name = parts[0]
|
name = parts[0]
|
||||||
current = parseInt(parts[1]) - 1
|
current = parseInt(parts[1]) - 1
|
||||||
}
|
}
|
||||||
|
console.log('on load', name, parts, current)
|
||||||
var body = document.querySelector('body')
|
var body = document.querySelector('body')
|
||||||
body.innerHTML = ``
|
body.innerHTML = ``
|
||||||
var stage = document.createElement("div")
|
var stage = document.createElement("div")
|
||||||
|
|
@ -315,7 +317,6 @@
|
||||||
});
|
});
|
||||||
sub_handlers[video1.id] = ass
|
sub_handlers[video1.id] = ass
|
||||||
sub_handlers[video1.id].show()
|
sub_handlers[video1.id].show()
|
||||||
})
|
|
||||||
video1.play()
|
video1.play()
|
||||||
fetch(video2.src.replace(/.mp4/, '.ass')).then(async (res) => {
|
fetch(video2.src.replace(/.mp4/, '.ass')).then(async (res) => {
|
||||||
const content = await res.text()
|
const content = await res.text()
|
||||||
|
|
@ -324,6 +325,7 @@
|
||||||
});
|
});
|
||||||
sub_handlers[video2.id] = ass
|
sub_handlers[video2.id] = ass
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
function sync(event) {
|
function sync(event) {
|
||||||
var src = event.target
|
var src = event.target
|
||||||
|
|
@ -359,9 +361,9 @@
|
||||||
|
|
||||||
if (!document.location.hash.slice(1).length) {
|
if (!document.location.hash.slice(1).length) {
|
||||||
document.location.hash = '#0'
|
document.location.hash = '#0'
|
||||||
}
|
} else {
|
||||||
render()
|
render()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -623,10 +623,12 @@ def render_all(options):
|
||||||
print('!!', duration_a, fragment_prefix / a)
|
print('!!', duration_a, fragment_prefix / a)
|
||||||
print('!!', duration_b, fragment_prefix / b)
|
print('!!', duration_b, fragment_prefix / b)
|
||||||
#sys.exit(-1)
|
#sys.exit(-1)
|
||||||
shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "front.mp4")
|
shutil.move(fragment_prefix / "front-mixed.mp4", fragment_prefix / "segment.mp4")
|
||||||
cleanup = [
|
cleanup = [
|
||||||
|
"front.mp4",
|
||||||
"audio-5.1.mp4",
|
"audio-5.1.mp4",
|
||||||
"audio-center.wav", "audio-rear.wav",
|
"audio-center.wav",
|
||||||
|
"audio-rear.wav",
|
||||||
"audio-front.wav",
|
"audio-front.wav",
|
||||||
"fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
|
"fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav",
|
||||||
"audio-stereo.wav",
|
"audio-stereo.wav",
|
||||||
|
|
@ -843,7 +845,7 @@ def update_subtitles(options):
|
||||||
write_subtitles(subs, folder, options)
|
write_subtitles(subs, folder, options)
|
||||||
|
|
||||||
def update_m3u(render_prefix, exclude=[]):
|
def update_m3u(render_prefix, exclude=[]):
|
||||||
files = ox.sorted_strings(glob(render_prefix + "*/*/front.mp4"))
|
files = ox.sorted_strings(glob(render_prefix + "*/*/segment.mp4"))
|
||||||
for ex in exclude:
|
for ex in exclude:
|
||||||
files = [f for f in files if not f.startswith(ex + "/")]
|
files = [f for f in files if not f.startswith(ex + "/")]
|
||||||
front_m3u = "\n".join(files)
|
front_m3u = "\n".join(files)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue