mirror of
https://github.com/GRFreire/scripts.git
synced 2026-01-09 04:49:38 +00:00
vid2mov: create script
This commit is contained in:
parent
6a8321b312
commit
2eb9a11263
1
bin/vid2mov
Symbolic link
1
bin/vid2mov
Symbolic link
@ -0,0 +1 @@
|
||||
../vid2mov/vid2mov.sh
|
||||
9
vid2mov/README.md
Normal file
9
vid2mov/README.md
Normal 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
17
vid2mov/vid2mov.sh
Executable 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user