Advertisement
c2c2_

ffmpeg: Convert to webm

Nov 5th, 2024 (edited)
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Check if the input file is provided
  4. if [ -z "$1" ]; then
  5. echo "Usage: $0 <input_video_file>"
  6. exit 1
  7. fi
  8.  
  9. # Get the input file name without the extension
  10. input_file="$1"
  11. base_name=$(basename "$input_file" | cut -d. -f1)
  12.  
  13. # Convert the video to .webm format
  14. ffmpeg -i "$input_file" "${base_name}.webm"
  15.  
  16. echo "Conversion complete: ${base_name}.webm"
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement