vid2mov: create script

This commit is contained in:
Guilherme Rugai Freire 2021-08-20 10:29:08 -03:00
parent 6a8321b312
commit 2eb9a11263
No known key found for this signature in database
GPG Key ID: 0F9FE41723A8A297
3 changed files with 27 additions and 0 deletions

1
bin/vid2mov Symbolic link
View File

@ -0,0 +1 @@
../vid2mov/vid2mov.sh

9
vid2mov/README.md Normal file
View File

@ -0,0 +1,9 @@
# vid2mov
## About
a simple script around ffmpeg to convert a video file to `.mov`.
I personally use this script when I record something in OBS Studio and then want to import into DaVinci Resolve.
## Requirements
- [ffmpeg](https://www.ffmpeg.org/)

17
vid2mov/vid2mov.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
VIDEO_PATH=$1
[ "$VIDEO_PATH" = "" ] && echo "error: video_path not given" && exit 1
[ "$2" != "" ] && OUT_PATH=$2 || OUT_PATH=${VIDEO_PATH%%.*}.mov
if ffmpeg -i "$VIDEO_PATH" -vcodec mpeg4 -q:v 2 -acodec pcm_s16le -q:a 0 -f mov "$OUT_PATH"; then
echo "Done"
notify-send "vid2mov" "$OUT_PATH done converting"
exit 0
else
echo "Failed"
notify-send -u critical "vid2mov" "$OUT_PATH error while converting"
exit 1
fi