Last active
November 22, 2017 09:28
-
-
Save zhangliyong/0a1b2da8541e1428acf96614bc7ac539 to your computer and use it in GitHub Desktop.
snippets
This file contains 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 -f concat -safe 0 -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav | |
brew install ffmpeg --with-libass | |
ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi |
This file contains 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
perl -nle '$data{$1}++ if /"status":(\d+)/; END { print "$_ $data{$_}" for (keys %data) }' tao.log-20170803 | |
perl -ne 'print if /submit an apply/' tao.log-20170803 | wc -l |
This file contains 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
pcregrep -n -M "[a-z][^\n]*\n\n" *.srt | |
perl -i -0777 -pe "s/(.+?)\n(.+?)\n^M?\n/\2\n\1\n\n/g" *.srt | |
^M is C-V C-M | |
for i in es/*.srt | |
do | |
opencc -i "$i" -o "et/$(basename $i)" -c ~/s2tw.json | |
done | |
for i in *.srt | |
do | |
iconv -f "CP936" -t "UTF-8" "$i" > "se/$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment