- Joined
- Jul 22, 2023
Because of the edit time-limit KiwiFarms has I'm doing this as a new post.
I've slimmed the whole thing down to one single bat by figuring out how to scale the watermark by the video height (this can be overridden by adding a value to

The output is less verbose:

And files aren't named "nigger.mp4_niggermark.mp4" anymore.
Enjoy automation nerds.
480x360
640x480
1280x720
1280x960
1920x1080 (I have noticed the nigger gif is slightly slowed down at this resolution, I suspect it's to do with my computer being slow)
I've slimmed the whole thing down to one single bat by figuring out how to scale the watermark by the video height (this can be overridden by adding a value to
NIGGER_SCALE
if you want) and have tried to get the speed mostly correct (this can also be overridden by adding a value to NIGGER_SPEED_X
and NIGGER_SPEED_Y
).
The output is less verbose:

And files aren't named "nigger.mp4_niggermark.mp4" anymore.
Enjoy automation nerds.
Code:
:: Thanks:
:: @Richard_Wetpasta: White Kiwifarms/Nigger-blink gif.
:: @Probably An Autist: Creating the bat file this was based from.
:: @slungus22: ffmpeg command for DVD bouncer like effect for images.
@echo off
pushd %~dp0
setlocal EnableExtensions DisableDelayedExpansion
:: ==== config ====
set NIGGER_OPACITY=0.3
set NIGGER_SCALE=
set NIGGER_SPEED_X=
set NIGGER_SPEED_Y=
:: Change if you feel the auto-speed is incorrect for your footage.
set NIGGER_IMAGE="kf_brand/nigger_slow.gif"
set NIGGER_OUTPUT="%~n1_niggermark.mp4"
:: ==== config ====
:CheckVariable
for /f "delims=" %%a in ('ffprobe -hide_banner -show_streams %1 2^>nul ^| findstr "^height="') do set "NIGGER_%%a"
If Not Defined NIGGER_height (
echo FAILED TO NIGGERMARK!
echo Invalid input. [Has the video file disappeared?]
endlocal
popd
exit
)
If %NIGGER_height% GTR 990 (
set /a NIGGER_scaleby = 600
) else (
If %NIGGER_height% GTR 540 (
set /a NIGGER_scaleby = 400
) else (
set /a NIGGER_scaleby = 200
)
)
set /a NIGGER_sc = (%NIGGER_height% / 2) + 50
set /a NIGGER_x = (%NIGGER_height% - %NIGGER_scaleby%) / 2
set /a NIGGER_y = (%NIGGER_height% - %NIGGER_scaleby%) / 2
:: silly workaround for parentheses issue
If Not Defined NIGGER_SCALE (
set /a NIGGER_SCALE = %NIGGER_sc%
)
If Not Defined NIGGER_SPEED_X (
set /a NIGGER_SPEED_X = %NIGGER_x%
)
If Not Defined NIGGER_SPEED_Y (
set /a NIGGER_SPEED_Y = %NIGGER_y%
)
goto :WatermarkBegin
:: CheckVariable END
:WatermarkBegin
echo Bouncy Niggermarker 4000 by @the rat [Thanks @Richard_Wetpasta, @Probably An Autist, @slungus22]
echo CONFIG:
echo * Niggermark Speed X: %NIGGER_SPEED_X%
echo * Niggermark Speed Y: %NIGGER_SPEED_Y%
echo * Niggermark Scale: %NIGGER_SCALE%
echo * Niggermark Opacity: %NIGGER_OPACITY%
echo * Niggermark Image: %NIGGER_IMAGE%
echo * Niggermark Output: %NIGGER_OUTPUT%
echo:
if not exist "%~1" goto :EOF
for /F "delims=" %%I in ('ffprobe.exe -v error -show_entries format^=duration -of default^=noprint_wrappers^=1:nokey^=1 "%~1" 2^>^&1') do set "duration=%%I"
echo Niggermarking...
ffmpeg -v warning -stats -hwaccel auto -i "%~1" -stream_loop -1 -i %NIGGER_IMAGE% -filter_complex "[1:v]format=rgba,colorchannelmixer=aa=%NIGGER_OPACITY%,scale=%NIGGER_SCALE%:-1[ov];[0:v][ov]overlay=x='abs(mod(t*%NIGGER_SPEED_X%,2*(W-w))-(W-w))':y='abs(mod(t*%NIGGER_SPEED_Y%,2*(H-h))-(H-h))'" -shortest -crf 22 -preset medium -c:a aac -strict experimental -movflags +faststart -threads 0 %NIGGER_OUTPUT%
goto :WatermarkEnd
:: WatermarkBegin END
:WatermarkEnd
echo:
echo Completed niggermarking. Output: %NIGGER_OUTPUT%.
endlocal
popd
exit
:: WatermarkEnd END
Edit: I've tried writing a posix compliant script for unix systems (should work on linux and macos probably?????), not sure if it fully works but if it does for you then that's cool 
Code:
#!/bin/sh
cd "$(dirname "$0")" || exit
export NIGGER_file="$1"
# ==== config ====
export NIGGER_OPACITY=0.3
export NIGGER_SCALE=
export NIGGER_SPEED_X=
export NIGGER_SPEED_Y=
# Change if you feel the auto-speed is incorrect for your footage.
export NIGGER_IMAGE="kf_brand/nigger_slow.gif"
export NIGGER_OUTPUT="${NIGGER_file%.*}_niggermark.mp4"
# ==== config ====
CheckVariables() {
export NIGGER_height
NIGGER_height="$(ffprobe "$NIGGER_file" -show_streams 2>&1 | grep coded_height)"
NIGGER_height="${NIGGER_height#coded_height=}"
if [ -z "$NIGGER_height" ]; then
echo "FAILED TO NIGGERMARK!"
echo "Invalid input. [Has the video file disappeared?]"
exit
fi
if [ -z "$NIGGER_SCALE" ]; then
NIGGER_SCALE=$(((NIGGER_height/2)+50))
fi
if [ "$NIGGER_height" -gt 990 ]; then
export NIGGER_scaleby=600
else
if [ "$NIGGER_height" -gt 540 ]; then
export NIGGER_scaleby=400
else
export NIGGER_scaleby=200
fi
fi
if [ -z "$NIGGER_SPEED_X" ]; then
NIGGER_SPEED_X=$(((NIGGER_height - NIGGER_scaleby) / 2))
fi
if [ -z "$NIGGER_SPEED_Y" ]; then
NIGGER_SPEED_Y=$(((NIGGER_height - NIGGER_scaleby) / 2))
fi
}
WatermarkBegin() {
echo "Bouncy Niggermarker 4000 by @the rat [Thanks @Richard_Wetpasta, @Probably An Autist, @slungus22]"
echo "CONFIG:"
echo "* Niggermark Speed X: $NIGGER_SPEED_X"
echo "* Niggermark Speed Y: $NIGGER_SPEED_Y"
echo "* Niggermark Scale: $NIGGER_SCALE"
echo "* Niggermark Opacity: $NIGGER_OPACITY"
echo "* Niggermark Image: $NIGGER_IMAGE"
echo "* Niggermark Output: $NIGGER_OUTPUT"
echo
echo "Niggermarking..."
ffmpeg -v warning -stats -hwaccel auto -i "$NIGGER_file" -stream_loop -1 -i $NIGGER_IMAGE -filter_complex "[1:v]format=rgba,colorchannelmixer=aa=$NIGGER_OPACITY,scale=$NIGGER_SCALE:-1[ov];[0:v][ov]overlay=x='abs(mod(t*$NIGGER_SPEED_X,2*(W-w))-(W-w))':y='abs(mod(t*$NIGGER_SPEED_Y,2*(H-h))-(H-h))'" -shortest -crf 22 -preset medium -c:a aac -strict experimental -movflags +faststart -threads 0 "$NIGGER_OUTPUT"
echo
}
WatermarkEnd() {
echo "Done!"
echo "Now exiting..."
}
CheckVariables
WatermarkBegin
WatermarkEnd
480x360
640x480
1280x720
1280x960
1920x1080 (I have noticed the nigger gif is slightly slowed down at this resolution, I suspect it's to do with my computer being slow)
Attachments
Last edited: