Skip to content

Instantly share code, notes, and snippets.

@emilio1625
Created November 30, 2018 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emilio1625/317d248a6b93d2016975c5dca9d77f4c to your computer and use it in GitHub Desktop.
Save emilio1625/317d248a6b93d2016975c5dca9d77f4c to your computer and use it in GitHub Desktop.
Converts MOV videos to MKV using FFMPEG and NVIDIA HW accel
#!/bin/bash
for video in *; do
extension="${video##*.}"
nombre="${video%.*}"
if [ $extension == "MOV" ]; then
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i $nombre.$extension -c:v h264_nvenc -preset slow $nombre.mkv
if [ $? -ne 0 ]; then
echo $nombre.$extension >> failed.txt
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment