#!/bin/bash # Parse options while [ $# -gt 0 ]; do opt=$1 case $opt in # General options -i|--infile) infile=$2 shift 2 ;; -o|--outfile) outfile=$2 shift 2 ;; -t|--text) text=$2 shift 2 ;; -w|--width) width=$2 shift 2 ;; # Video options # Audio options # Text options --font) fontname=$2 shift 2 ;; --color) textcolor=$2 shift 2 ;; *) echo "Unknown option: $opt" exit 1 ;; esac done # Check options if [ -z "$infile" ]; then echo "Input file is not specified. use -i option." exit 1 fi if [ ! -f "$infile" ]; then echo "Input file '"$infile"' is not found" exit 1 fi if [ -z "$outfile" ]; then outfile="$infile.mkv" echo "Output file name is not specified. '"$outfile"' will be used" fi if [ -z "$text" ]; then text="forumsmotri.com" echo "Watermark text is not specified. '"$text"' will be used" fi # Generate watermark videowidth=$(ffprobe -hide_banner -v quiet -of default=noprint_wrappers=1 -sexagesimal -select_streams v:0 -show_entries stream=width -i "$infile") eval "$videowidth" videowidth=$width echo "Video width = $videowidth" wmwidth=$(bc <<< "$videowidth/2") wmfile="$text.png" convert -alpha on -background transparent -fill "rgba(255,255,255,0.1)" -strokewidth 2 -stroke "rgba(0,0,0,0.1)" -font Purisa -size ${wmwidth}x label:"$text" "$wmfile" wmheight=$(identify -ping '%n' "$wmfile") # Convert video ffmpeg -hide_banner -i "$infile" -i "$wmfile" \ -filter_complex "overlay='if(gte(t,1), -w+(mod(t,($videowidth+$wmwidth)/60))*60, NAN)':y='(sin(t)*(main_h-overlay_h))/2+(main_h-overlay_h)/2'" \ "$outfile"
for filename in *.{mp4,flv,avi,mkv}; do test -f "$filename" && video-wm.sh -i "$filename" done
for filename in "*.{mp4,flv,avi,mkv}"; do test -f "$filename" && video-wm.sh -i "$filename"; done
Вчера, 19:44
Вчера, 12:22
7 сентября 2026 20:12
7 сентября 2026 19:56
6 сентября 2026 23:19
5 сентября 2026 22:43
5 сентября 2026 20:07
5 сентября 2026 08:33
4 сентября 2026 20:18
4 сентября 2026 19:47
2 сентября 2026 18:41
2 сентября 2026 17:53
2 сентября 2026 13:25
2 сентября 2026 11:48
Вчера, 21:07
3 сентября 2026 20:39
27 августа 2026 08:06
24 августа 2026 01:42
23 августа 2026 19:13
23 августа 2026 15:41
23 августа 2026 13:53
22 августа 2026 22:59
18 августа 2026 20:47
14 августа 2026 19:19
14 августа 2026 11:54
13 августа 2026 10:36
9 августа 2026 08:38
23 июля 2026 07:29
13 июля 2026 14:28
13 июля 2026 10:34
9 июля 2026 06:04
8 июля 2026 22:47
8 июля 2026 22:03
8 июля 2026 22:00
8 июля 2026 20:56
8 июля 2026 20:19
8 июля 2026 05:07
2 июля 2026 18:17
14 июня 2026 09:59
10 июня 2026 16:15
31 мая 2026 23:34
31 мая 2026 16:13
30 мая 2026 10:33
29 мая 2026 18:20