Transcoding used:
#!/bin/sh
transcode() {
local in="$1"
local out="$2"
#
# ffplay -vf 'curves=r=0/0 .4/.4 1/1:g=0/0 0.4/0.4 1/1:b=0/0 .4/.6 0.8/1,eq=saturation=0.7:gamma=1.1' -frames:v 1 "$in"
#
# ffmpeg -i "$in" -vf 'eq=saturation=0.8:gamma=1.3' -frames:v 1 test1.jpg
# ffmpeg -i "$in" -vf 'curves=r=0/0 .4/.4 1/1:g=0/0 0.4/0.4 1/1:b=0/0 .4/.6 0.8/1,eq=saturation=0.7:gamma=1.1' -frames:v 1 test2.jpg
#
local VF=
# minder geel maken
VF="$VF,curves=r=0/0 .4/.4 1/1:g=0/0 0.4/0.4 1/1:b=0/0 .4/.6 0.8/1"
# lichter maken
VF="$VF,eq=saturation=0.7:gamma=1.1"
# bijdraaien
#VF="$VF,rotate=angle=-0.019"
# crop naar 2.5:1
#VF="$VF,crop=1800:720:24:180"
VF="$VF,crop=1680:672:158:283"
# https://github.com/webcompat/web-bugs/issues/76885
# http://sschaber.de/2018/12/03/2-of-6-comparison-between-h-264-yuv420-and-yuv444/
# https://bugzilla.mozilla.org/show_bug.cgi?id=1368063
FIREFOX_CANNOT_PLAY_YUV444='-pix_fmt yuv420p'
DO_JPEG=false
#ffmpeg -i bladgoud.openrep.2022-05-19.raw.mp4 -vf "${VF#,}" -frames:v 1 -y bg-temp.jpg
#ffmpeg -i bladgoud.openrep.2022-05-19.raw.mp4 -vf "${VF#,}" -c:a copy bg-temp.mp4
#ffmpeg -i bladgoud.openrep.2022-05-19.raw.mp4 -vf "${VF#,}" bg-temp.mp4
if $DO_JPEG; then
test -z "$out" && out=test2.jpg
ffmpeg -i "$in" -vf "${VF#,}" -frames:v 1 "$out"
else
test -z "$out" && out=test2.mp4
ffmpeg -i "$in" -vf "${VF#,}" $FIREFOX_CANNOT_PLAY_YUV444 "$out"
fi
}
for in in *.raw.mp4; do
out=${in%.raw.mp4}.mp4
if ! test -f "$out"; then
transcode "$in" "${out%.mp4}.tmp.mp4" &&
mv "${out%.mp4}.tmp.mp4" "$out"
fi
done
Switching audio: ffmpeg -i orig.mp4 -i new-audio.wav -c:v copy -map 0:v:0 -map 1:a:0 result.mp4