Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env fish
- set max_width 320
- set input_folder ~/Videos
- set output_folder ~/compressed
- function downsample
- set file $argv[1]
- set input $input_folder/$file
- set output $output_folder/$file
- rm $output
- avconv -i $input -vf "scale=$max_width:trunc(ow/a*1/2)*2" $output
- end
- mkdir -p $output_folder
- for video_path in $input_folder/*
- set file (basename $video_path)
- downsample $file
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement