Guest User

Untitled

a guest
Jan 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/bin/bash
  2. mkdir -p output/
  3. ls *.mp4 | while read -r l;
  4. do
  5. sec=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$l")
  6. round_sec=${sec%.*}
  7. if [[ $round_sec -lt 60 ]]; then
  8. loop=$(expr 60 / $round_sec)
  9. round_loop=$(expr ${loop%.*} + 2)
  10. # echo $l $round_loop $round_sec
  11. echo "ffmpeg -stream_loop ${round_loop} -i "${l}" -c copy output/${round_loop}_${l}" >> run.sh
  12. fi
  13. done
  14. bash run.sh
  15. rm -rf run.sh
Add Comment
Please, Sign In to add comment