Commit e24ea4cc authored by Stefan Westerfeld's avatar Stefan Westerfeld

videowmark: make ffmpeg less verbose

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 2d420d47
...@@ -4,7 +4,7 @@ possible improvements: ...@@ -4,7 +4,7 @@ possible improvements:
videowmark: videowmark:
--key --key
--help --help
--verbose
stream issue stream issue
where? where?
quiet mode
opus length ffprobe -show_format phil.mkv opus length ffprobe -show_format phil.mkv
#!/bin/bash #!/bin/bash
FFMPEG_VERBOSE="-v warning"
# auto detect codec and bitrate from input stream, generate ffmpeg options for audio encoder # auto detect codec and bitrate from input stream, generate ffmpeg options for audio encoder
function audio_encode_options function audio_encode_options
{ {
...@@ -43,18 +45,18 @@ if [ "$1" == "add" ]; then ...@@ -43,18 +45,18 @@ if [ "$1" == "add" ]; then
wm_wav=/dev/fd/4 wm_wav=/dev/fd/4
# get audio as wav # get audio as wav
ffmpeg -y -i "$2" -f wav "$orig_wav" ffmpeg $FFMPEG_VERBOSE -y -i "$2" -f wav "$orig_wav"
# watermark # watermark
audiowmark add "$orig_wav" "$wm_wav" "$4" audiowmark add "$orig_wav" "$wm_wav" "$4"
# rejoin # rejoin
ffmpeg -y -i "$2" -i "$wm_wav" -c:v copy $(audio_encode_options "$2") -map 0:v:0 -map 1:a:0 "$3" ffmpeg $FFMPEG_VERBOSE -y -i "$2" -i "$wm_wav" -c:v copy $(audio_encode_options "$2") -map 0:v:0 -map 1:a:0 "$3"
elif [ "$1" == "get" ]; then elif [ "$1" == "get" ]; then
# create tmpfiles # create tmpfiles
create_temp_files 3 create_temp_files 3
wav=/dev/fd/3 wav=/dev/fd/3
# get audio as wav # get audio as wav
ffmpeg -y -i "$2" -f wav "$wav" ffmpeg $FFMPEG_VERBOSE -y -i "$2" -f wav "$wav"
# get watermark # get watermark
audiowmark get "$wav" audiowmark get "$wav"
elif [ "$1" == "probe" ]; then elif [ "$1" == "probe" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment