video
This commit is contained in:
parent
63fb5ffdd5
commit
03972d23f3
3 changed files with 42 additions and 0 deletions
10
video-rickroll/combine.sh
Normal file
10
video-rickroll/combine.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
ffmpeg \
|
||||||
|
-r 60000/1001 \
|
||||||
|
-i 'frames/dither-%04d.png' \
|
||||||
|
-i 'rickroll-audio.wav' \
|
||||||
|
-ac 2 \
|
||||||
|
-ar 48000 \
|
||||||
|
-vf 'pad=w=534,setsar=9/10' \
|
||||||
|
-pix_fmt yuv420p \
|
||||||
|
-movflags +faststart \
|
||||||
|
-y rickroll-dither.mp4
|
17
video-rickroll/extract.sh
Normal file
17
video-rickroll/extract.sh
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
set -a
|
||||||
|
|
||||||
|
mkdir -p frames
|
||||||
|
|
||||||
|
ffmpeg \
|
||||||
|
-i rickclip.mp4 \
|
||||||
|
-vf 'scale=320:192,framerate=60000/1001' \
|
||||||
|
-an \
|
||||||
|
-y 'frames/rickroll-%04d.png'
|
||||||
|
|
||||||
|
ffmpeg \
|
||||||
|
-i rickclip.mp4 \
|
||||||
|
-vn \
|
||||||
|
-ac 1 \
|
||||||
|
-ar 15734 \
|
||||||
|
-acodec pcm_u8 \
|
||||||
|
-y 'rickroll-audio.wav'
|
15
video-rickroll/video.sh
Normal file
15
video-rickroll/video.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
|
for frame in frames/rickroll-[0-9][0-9][0-9][0-9].png
|
||||||
|
do
|
||||||
|
n="${frame#frames/rickroll-}"
|
||||||
|
n="${n%.png}"
|
||||||
|
out="frames/dither-${n}"
|
||||||
|
last="${n:0-1}"
|
||||||
|
node ../dither-image.js "$frame" "$out" &
|
||||||
|
if (( last == 9 ))
|
||||||
|
then
|
||||||
|
wait
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
wait
|
Loading…
Reference in a new issue