Skip to content

Commit

Permalink
use 0.25 for ratio & remove ignore pixa indices
Browse files Browse the repository at this point in the history
  • Loading branch information
fawazahmed0 committed Jan 2, 2021
1 parent 24e11d8 commit a736c16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hardcodesubv2.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ const uploadURL = 'https://www.youtube.com/upload'
const studioURL = 'https://studio.youtube.com'

// stores the pixavideos index thats needs to be ignored, as they are distracting
const ignorePixaVidIndex = [4, 7, 9, 11]
const ignorePixaVidIndex = []

// hardcodetime/video duration ratio for each pixa video
const videoTimeRatio = [0.1751304347826087, 1.789804347826087, 0.5999347826086957, 0.34145652173913044, 0.1971304347826087, 0.22706521739130434, 0.21043478260869566, 0.17365217391304347, 0.1945, 0.22604347826086957, 0.2111086956521739, 0.773804347826087, 0.20578260869565218, 0.1725]
// const videoTimeRatio = [0.1751304347826087, 1.789804347826087, 0.5999347826086957, 0.34145652173913044, 0.1971304347826087, 0.22706521739130434, 0.21043478260869566, 0.17365217391304347, 0.1945, 0.22604347826086957, 0.2111086956521739, 0.773804347826087, 0.20578260869565218, 0.1725]

// Stores the beginning time
const beginTime = new Date().getTime()
Expand Down Expand Up @@ -356,7 +356,7 @@ async function generateMP4 (editionName, chap) {

// stop if uploaded files had reached the youtube upload limit or
// remaining duration is not enought to hardcode the subtitles & upload
if (remainingDuration < currChapDuration * videoTimeRatio[randomNo]) { return null }
if (remainingDuration < currChapDuration * 0.25) { return null }
console.log('selected pixabay video index is ', randomNo)
// Pixabay Videos to use for recitation
const pixaFileWithPath = path.join(pixabayPath, pixabayFiles[randomNo])
Expand Down

0 comments on commit a736c16

Please sign in to comment.