Advertisement
Guest User

stitch.sh

a guest
Jan 21st, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Generate sorted list.txt
  4. ls -1v *.webm | while IFS= read -r f; do
  5.   escaped_filename=$(sed "s/'/'\\\\''/g" <<< "$f")
  6.   echo "file '$escaped_filename'"
  7. done > list.txt
  8.  
  9. # Concatenate files
  10. ffmpeg -f concat -safe 0 -i list.txt -c copy output.webm
  11.  
  12. # Cleanup (optional)
  13. rm list.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement