Skip to content

Instantly share code, notes, and snippets.

@dardo82
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dardo82/0cefea1b7caf7c8b0664 to your computer and use it in GitHub Desktop.
Save dardo82/0cefea1b7caf7c8b0664 to your computer and use it in GitHub Desktop.
Remove Ads from TV
MF=$HOME/Movies;FM="ffmpeg";BF="blackframe";C3="Comici37"
./$FM -i $MF/$C3/$C3.ts -vf $BF -f null - 2>$C3.txt
pt=0;n=0;for t in `grep $BF $C3.txt|cut -d\ -f8|cut -d: -f2|cut -d. -f1|uniq`
do d=$[$t-$pt];if [ $d -gt 180 ];then O=$O"-ss $pt -t $d $MF/$C3/$C3-$n.mp4 "
n=$[$n+1];fi;pt=$t;done;./$FM -i $MF/$C3/$C3.ts $O;rm $C3.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment