Skip to content

Commit 83fafbe

Browse files
committed
Add ffmpeg watermark
Add ffmpeg watermark Signed-off-by: Bensuperpc <[email protected]>
1 parent d13192e commit 83fafbe

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

Commands.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ For encoding, creating, recording or downloading videos
147147
- [`h265-nvenc`](#h265-nvenc)
148148
- [`youtube-dl-playlist-full`](#youtube-dl-playlist-full)
149149
- [`youtube-dl-playlist-audio`](#youtube-dl-playlist-audio)
150+
- [`add-watermark`](#add-watermark)
150151
- (WIP)
151152
### clean-arch
152153

@@ -731,6 +732,14 @@ Mount directory in RAM
731732
$ mount-ram <path to mount> <size (in MB/Mo)>
732733
```
733734

735+
### add-watermark
736+
737+
Add watermark in video
738+
739+
```bash
740+
$ add-watermark <input video> <logo> <overlay X (from from the top-left)> <overlay Y (from from the top-left)> <output>
741+
```
742+
734743
### screen-capture
735744

736745
Screen capture (Video only) with ffmpeg and x11grab

video/add-watermark.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
#//////////////////////////////////////////////////////////////
4+
#// ____ //
5+
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
6+
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
7+
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
8+
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
9+
#// |_| |_| //
10+
#//////////////////////////////////////////////////////////////
11+
#// //
12+
#// Script, 2021 //
13+
#// Created: 02, August, 2021 //
14+
#// Modified: 02, August, 2021 //
15+
#// file: - //
16+
#// - //
17+
#// Source: https://arccoder.medium.com/ffmpeg-add-a-logo-on-video-bf1f4652792a //
18+
#// OS: ALL //
19+
#// CPU: ALL //
20+
#// //
21+
#//////////////////////////////////////////////////////////////
22+
23+
24+
type ffmpeg >/dev/null 2>&1 || { echo "ffmpeg could not be found" >&2; exit 1; }
25+
26+
if (( $# == 5 )); then
27+
ffmpeg -i "$1" -i "$2" -filter_complex "overlay='$3':'$4'" "$5"
28+
else
29+
echo "Usage: ${0##*/} <input video> <logo> <overlay X (from from the top-left)> <overlay Y (from from the top-left)> <output>"
30+
exit 1
31+
fi

0 commit comments

Comments
 (0)