Last active
September 4, 2019 15:24
-
-
Save mishazawa/2217b8865bfd16303d3f393c98f4207f to your computer and use it in GitHub Desktop.
split by silence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "ffmpeg -i "videoplayback.mp4" -af silencedetect=noise=-30dB:d=0.5 -f null - 2> vol.txt" | |
| const si = [ | |
| ["1.0466" , "254.221"], | |
| ["256.942" , "470.262"], | |
| ["472.004" , "806.045"], | |
| ["808.412" , "1096.53"], | |
| ["1098.64" , "1322.09"], | |
| ["1327.67" , "1641.81"], | |
| ["1651.02" , "2027.56"], | |
| ["2032.45" , "2324.58"], | |
| ["2329.37" , "2564.9"] | |
| ] | |
| const tl = [ | |
| "01. カクメイ", | |
| "02. ハクジツ", | |
| "03. マツユキ", | |
| "04. ソレカラ", | |
| "05. アカガネ", | |
| "06. トコヤミ", | |
| "07. ハニカ夢", | |
| "08. シラトリ", | |
| "09. ヒイラギ" | |
| ] | |
| const gen_command = (input, output, silence_start, silence_end) => `ffmpeg -y -ss ${silence_start} -t ${silence_end} -i ${input} ${output};`; | |
| si.forEach(([a, b], i) => { | |
| console.log(gen_command('~/Downloads/videoplayback.mp4', `"${tl[i]}.mp3"`, a, b-a)) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment