Last active
April 4, 2020 22:20
-
-
Save adam000/cf3d3ef91eba806271e24675c2581c0b to your computer and use it in GitHub Desktop.
A simple way to shorten Overwatch highlights from the comfort of WSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
WINHOME="/mnt/c/Users/atg" | |
NPROCS=10 | |
# NOTE: nothing in the ls arg can have spaces or this doesn't work | |
ls $WINHOME/Documents/Overwatch/videos/overwatch/*.mp4 | xargs -n 1 -l -P $NPROCS -i{} bash -c 'ffmpeg -hide_banner -loglevel debug -ss 00:00:04.800 -i "{}" -t 00:00:12.500 -c copy "/mnt/f/Shortened OW Highlights/$(basename "{}")" && rm "{}"' | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment