Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/usr/bin/env fish
  2.  
  3. set max_width 320
  4.  
  5. set input_folder ~/Videos
  6. set output_folder ~/compressed
  7.  
  8. function downsample
  9. set file $argv[1]
  10. set input $input_folder/$file
  11. set output $output_folder/$file
  12. rm $output
  13. avconv -i $input -vf "scale=$max_width:trunc(ow/a*1/2)*2" $output
  14. end
  15.  
  16. mkdir -p $output_folder
  17. for video_path in $input_folder/*
  18. set file (basename $video_path)
  19. downsample $file
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement