Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. #!/bin/bash
  2. # Bash script to convert all mp4 videos in current directory to webm format (saves space!)
  3.  
  4. function transcode {
  5.     echo "Transcode Running…";   
  6.         ffmpeg -i "$i" -qmin 10 -qmax 42 -threads 4 -quality good -vcodec libvpx "$newname";
  7. }
  8.  
  9.  
  10. for i in *.mp4
  11.     do
  12.     newname=$(echo $i|sed 's/mp4/webm/g');
  13.     echo "Converting "$i" to webm format.";
  14.     echo "Please wait -- ";
  15.     transcode;
  16.     echo $i" was converted successfully to "$newname;
  17.     done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement