Saturday 6 February 2021

change Chrome Extension save behaviour update

 

Terminal to project folder


  # Install Node.js and yarn

# Visit: https://nodejs.org/en/
# And https://yarnpkg.com/getting-started/install

# Install dependencies
yarn install

# Launch builder script
yarn run build

Saving without asking location: change saveas:true to false in 
extension/dist/background/index.js




Saturday 23 January 2021

auto complete command from history

 https://www.macworld.com/article/1146015/termhistory.html#:~:text=So%20in%20normal%20use%2C%20if,letters%20you've%20already%20typed.







Monday 18 January 2021

Auto generate subtitle for video

Steps:


1. pip3 install git+https://github.com/agermanidis/autosub.git


2.1 generate srt file only no translation:

        autosub -S ja -D ja infile.mp4  


2.2 generate a srt with translation:

    autosub -S ja -D zh-CN -K 'google translate api key' input.mp4 


3. Combine subtitle with video

    ffmpeg -i infile.mp4 -i infile.srt  -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=chi outfile.mp4