diff --git a/Convert2mkv.sh b/Convert2mkv.sh new file mode 100755 index 0000000..8b62388 --- /dev/null +++ b/Convert2mkv.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Convert input video in a vp9/libvorbis mkv +# +# (c) LUG-VS (GPL) +VERSION="$(basename $0) Version 0.0.1 from 07.11.2019" +# +# Input: VideoFile.mp4 (or other video container format like webm) +# Output: VideoFile.mkv (convertet to vp9/libvorbis) +# +# Changes: +# 0.0.1: generation +# + +## If VideoFile is first parameter +if [ $# -gt 0 ] && [ -e $1 ]; then + filename=$(basename -- "$1") +# extension="${filename##*.}" + filename="${filename%.*}" + ffmpeg -i $1 -c:v vp9 -c:a libvorbis ${filename}.mkv +else + ## Show help + echo -e "** Konvertiert eine beliebige Videodatei in ein vp9/libvorbis mkv Kontainer. Benutzung: \n\t$(basename $0) " +fi diff --git a/README.md b/README.md index 9c84543..60c7941 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,5 @@ See also at [LUG-VS-Wiki Nützliche Scripte](https://lug-vs.org//lugvswiki/index |[utf8.sh](utf8.sh)|Convert text from e.g. Windows latin1 to utf8 text (e.g. in READMEs or other text (not for office documents))| |[wmf2svg.sh](wmf2svg.sh)|Example script converts WMF files in SVG to share it easily on the internet| |[write-exif-comment.sh](write-exif-comment.sh)|Write JPEG EXIF comment in all *.jpg files| - +|[Convert2mkv.sh](Convert2mkv.sh)|Convert an VideoFile as parameter in an 'mkv' container (vp9/libvorbis)|