Skip to content

Instantly share code, notes, and snippets.

@i8degrees i8degrees/Makefile.tb
Last active Sep 30, 2018

Embed
What would you like to do?
Video processing tasks for Time Bomb DVD
#!/usr/bin/env bash
#
# Makefile:jeff
#
# Video encoding, subtitles conversion, etc. tasks for "Time Bomb"
#
# TODO(jeff): Swap out use of ffmpeg in favor of x264 for encoding.
#
# mp4box -add previews/mpeg2/ch4_doggy-pounding.mp2 chapter4_doggy-pounding.mp4
# x264 -o ch3_tb.mp4 ch3_tb.mpeg2video
#
# TODO(jeff): Do video deinterlacing **first** so that we can then use it as
# the input media for further encoding tasks.
# TODO(jeff): Once the above task is completed, remove the deinterlacing flags
# from the web task.
# TODO(jeff): Implement makefile task for subtitles
PWD=/Volumes/Media/Projects/TIME_BOMB
INPUT_DIR=${PWD}/dvd.v2/build
OUTPUT_DIR=${PWD}/build
CHAPTER_NAME=chapter1
VIDEO_INPUT=${CHAPTER_NAME}.dv
AUDIO_INPUT=${CHAPTER_NAME}.wav
VIDEO_OUTPUT=${CHAPTER_NAME}.mp2
# AUDIO_OUTPUT=${CHAPTER_NAME}.ac3
WEB_VIDEO_OUTPUT=${CHAPTER_NAME}.webm
WEB_AUDIO_INPUT=${AUDIO_INPUT}
# WEB_AUDIO_INPUT=${CHAPTER_NAME}.wav
WEB_SUBTITLES_INPUT=${CHAPTER_NAME}.ass
WEB_SUBTITLES_OUTPUT=${CHAPTER_NAME}.vtt
# clips are the short, animated previews
all: video_deinterlace clips
# all: web subtitles
stub:
echo ""
prebuild: clean-audio prebuild-audio clean-video prebuild-video
mkdir -p "build/previews"
prebuild-audio:
echo "Creating temporary swap space for audio samples..."
/bin/mkdir -p ./tmp/audio
prebuild-video:
echo "Creating temporary swap space for video samples..."
/bin/mkdir -p ./tmp/video
clips: prebuild
/usr/bin/make ch1-deep-throat
/usr/bin/make ch1-slow-deep-throat
/usr/bin/make ch1-gulp
/usr/bin/make ch1-slow-gulp
/usr/bin/make migrate-clips
migrate-clips:
mkdir build/previews/gif
. ./scripts/build_utils.sh
ch3-tb:
/usr/bin/make ch3-tb-mpeg2audio
/usr/bin/make ch3-tb-mpeg2video
/usr/bin/make ch3-tb-webm
ch3-bj:
/usr/bin/make ch3-bj-mpeg2audio
/usr/bin/make ch3-bj-mpeg2video
/usr/bin/make ch3-bj-webm
# /usr/bin/make ch3-gif
ch4:
/usr/bin/make ch4-mpeg2audio
/usr/bin/make ch4-mpeg2video
/usr/bin/make ch4-webm
# TODO(jeff): Increase encoding quality profile
ch1-awesome-bj: prebuild
ffmpeg -y -threads 6 -i ./build/v4/VTS_01_1_v4.mp4 -ss 00:00:04.17 -to 00:03:34.25 -c:v copy -c:a copy ./build/previews/ch1_awesome-bj.mp4
# ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2audio -ss 00:00:04.17 -vn -y -f mp3 -to 00:03:34.25 ./build/previews/ch1_awesome-bj.mp3
# x264 --seek 137 --frames 6439 -o ./build/previews/ch1_awesome-bj.mpeg4video ./build/v4/VTS_01_1deint_v4.mpeg2video
# mp4box -add ./build/previews/ch1_awesome-bj.mpeg4video -add ./build/previews/ch1_awesome-bj.mp3 ./build/previews/ch1_awesome-bj.mp4
ch1-awesome-bj-mp4audio: prebuild
ffmpeg -y -threads 6 -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:00:04.17 -to 00:03:34.25 -c:a aac ./build/previews/ch1_awesome-bj.m4a
ch1-awesome-bj-webm:
ffmpeg -y -threads 6 -i ./build/previews/ch1_awesome-bj.mp4 -b:v 4M ./build/previews/ch1_awesome-bj.webm
# ffmpeg -y -i ${INPUT_DIR}/chapter1t.dv
# -ss 00:01:41.835 -t 16.583
# -crf 12 -c:v libvpx -b:v 2M
# -vf "scale=720:-1, crop=600:324:209:0"
# -c:a libvorbis
ch1-slow-deep-throat-mpeg2audio: prebuild
# sox ./dvd.v4/VTS_01_1.mp2 -t mp2 ./tmp/audio/ch1_deep-throat.mpeg2audio tempo 0.6673
/bin/cp -avRH ./dvd.v4/VTS_01_1.mp2 ./tmp/audio/ch1_deep-throat_slow.mpeg2audio
ffmpeg -ss 00:01:46.200 -i ./tmp/audio/ch1_deep-throat_slow.mpeg2audio -filter:a "atempo=0.68" -vn -y -t 17.583 -f mp2 ./build/previews/ch1_slow-deep-throat.mpeg2audio
ch1-slow-deep-throat-mpeg2video: prebuild
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -t 17.583 -f mpeg2video ./tmp/video/ch1_deep-throat_slow.mpeg2video
ffmpeg -threads 6 -i ./tmp/video/ch1_deep-throat_slow.mpeg2video -r 20 -lavfi "crop=600:324:209:0,scale=720:-1" -b:v 4M -y -f mpeg2video ./build/previews/ch1_slow-deep-throat.mpeg2video
# -r 20 -filter:v "setpts=1.4985*PTS"
ch1-slow-deep-throat-webm: prebuild
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -t 17.583 ./build/previews/ch1_slow-deep-throat.webm
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -lavfi "crop=600:324:209:0,scale=720:-1" -b:v 4M -y -an -t 17.583 ./build/previews/ch1_slow-deep-throat.webm
# -r 20 -filter:v "setpts=1.4985*PTS"
ch1-slow-deep-throat-webm-audio: prebuild
ffmpeg -threads 2 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -i ./build/v4/VTS_01_1_v4.mpeg2 -r 20 -filter:v "setpts=1.4985*PTS" -y -c:a libvorbis -b:v 4M -t 17.583 ./tmp/video/ch1_slow-deep-throat.webm;
ffmpeg -threads 2 -i ./tmp/video/ch1_slow-deep-throat.webm -lavfi "crop=600:324:209:0,scale=720:-1" -b:v 2M -crf 12 -y ./build/previews/ch1_slow-deep-throat.webm
ch1-slow-deep-throat-gif: prebuild
# -t 6.00
ffmpeg -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -t 17.583 -f mpeg2video ./tmp/video/ch1_deep-throat-clip_slow.mpeg2video
# -r 15 -filter:v "scale=320:-1,setpts=2.0*PTS"
ffmpeg -i ./tmp/video/ch1_deep-throat-clip_slow.mpeg2video -vf "scale=320:-1:flags=lanczos,palettegen" -y ./tmp/ch1_deep-throat_palette_slow.png
ffmpeg -i ./tmp/video/ch1_deep-throat-clip_slow.mpeg2video -i ./tmp/ch1_deep-throat_palette_slow.png -lavfi "crop=600:324:209:0,scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -y -an ./build/previews/ch1_slow-deep-throat.gif
###
ch1-deep-throat-mpeg2audio: prebuild
# sox ./dvd.v4/VTS_01_1.mp2 -t mp2 ./tmp/audio/ch1_deep-throat.mpeg2audio tempo 0.6673
/bin/cp -avRH ./dvd.v4/VTS_01_1.mp2 ./tmp/audio/ch1_deep-throat.mpeg2audio
ffmpeg -ss 00:01:46.200 -i ./tmp/audio/ch1_deep-throat.mpeg2audio -vn -y -t 17.583 -f mp2 ./build/previews/ch1_deep-throat.mpeg2audio
ch1-deep-throat-mpeg2video: prebuild
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -y -an -b:v 4M -t 17.583 -f mpeg2video ./tmp/video/ch1_deep-throat.mpeg2video
ffmpeg -threads 6 -i ./tmp/video/ch1_deep-throat.mpeg2video -lavfi "crop=600:324:209:0,scale=720:-1" -b:v 4M -y -f mpeg2video ./build/previews/ch1_deep-throat.mpeg2video
# -r 20 -filter:v "setpts=1.4985*PTS"
ch1-deep-throat-webm: prebuild
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -y -an -b:v 4M -t 17.583 ./build/previews/ch1_deep-throat.webm
ffmpeg -threads 6 -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -lavfi "crop=600:324:209:0,scale=720:-1" -b:v 4M -y -an -t 17.583 ./build/previews/ch1_deep-throat.webm
# -r 20 -filter:v "setpts=1.4985*PTS"
ch1-deep-throat-gif: prebuild
# -t 6.00
ffmpeg -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -y -an -b:v 4M -t 17.583 -f mpeg2video ./tmp/video/ch1_deep-throat-clip.mpeg2video
# -r 15 -filter:v "scale=320:-1,setpts=2.0*PTS"
ffmpeg -i ./tmp/video/ch1_deep-throat-clip.mpeg2video -vf "scale=320:-1:flags=lanczos,palettegen" -y ./tmp/ch1_deep-throat_palette.png
ffmpeg -i ./tmp/video/ch1_deep-throat-clip.mpeg2video -i ./tmp/ch1_deep-throat_palette.png -lavfi "crop=600:324:209:0,scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -y -an ./build/previews/ch1_deep-throat.gif
ch1-deep-throat-dvd:
mpv -start 00:01:46.200 -ab-loop-a=00:01:46.200 -ab-loop-b=00:02:01.418 ./build/v4/VTS_01_1deint_v4.mpeg2video --audio-file=build/v4/VTS_01_1_v4.mpeg2 --sub-file=build/srt/chapter1.srt
ch1-slow-deep-throat: ch1-slow-deep-throat-mpeg2audio ch1-slow-deep-throat-mpeg2video ch1-slow-deep-throat-gif ch1-slow-deep-throat-webm ch1-slow-deep-throat-webm-audio
ch1-deep-throat: ch1-deep-throat-mpeg2audio ch1-deep-throat-mpeg2video ch1-deep-throat-gif ch1-deep-throat-webm
###
# frame rate drop by 33.27%, or 20fps
ch1-slow-gulp-mpeg2audio: prebuild
# sox ./dvd.v4/VTS_01_1.mp2 -t mp2 ./tmp/audio/ch1_slow-gulp.mpeg2audio tempo 0.6673
/bin/cp -avRH ./dvd.v4/VTS_01_1.mp2 ./tmp/audio/ch1_slow-gulp_slow.mpeg2audio
ffmpeg -ss 00:01:7.250 -i ./tmp/audio/ch1_slow-gulp_slow.mpeg2audio -filter:a "atempo=0.68" -vn -y -to 18.00 -f mp2 ./build/previews/ch1_slow-gulp.mpeg2audio
# frame rate drop by 33.27%, or 20fps
ch1-slow-gulp-mpeg2video: prebuild
ffmpeg -threads 6 -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -to 18.00 -f mpeg2video ./build/previews/ch1_slow-gulp.mpeg2video
# frame rate drop by 33.27%, or 20fps
ch1-slow-gulp-webm: prebuild
ffmpeg -threads 6 -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -to 18.00 ./build/previews/ch1_slow-gulp.webm
# frame rate drop by 33.27%, or 20fps
ch1-slow-gulp-gif: prebuild
ffmpeg -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "scale=320:-1,setpts=1.4985*PTS" -y -an -b:v 4M -to 4.00 -f mpeg2video ./tmp/video/ch1_slow-gulp-clip_slow.mpeg2video
ffmpeg -i ./tmp/video/ch1_slow-gulp-clip_slow.mpeg2video -vf "scale=320:-1:flags=lanczos,palettegen" -y ./tmp/ch1_slow-gulp_palette_slow.png
ffmpeg -i ./tmp/video/ch1_slow-gulp-clip_slow.mpeg2video -i ./tmp/ch1_slow-gulp_palette_slow.png -lavfi "scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -y -an ./build/previews/ch1_slow-gulp.gif
###
ch1-gulp-mpeg2audio: prebuild
# sox ./dvd.v4/VTS_01_1.mp2 -t mp2 ./tmp/audio/ch1_slow-gulp.mpeg2audio tempo 0.6673
/bin/cp -avRH ./dvd.v4/VTS_01_1.mp2 ./tmp/audio/ch1_gulp.mpeg2audio
ffmpeg -ss 00:01:7.250 -i ./tmp/audio/ch1_gulp.mpeg2audio -vn -y -to 18.00 -f mp2 ./build/previews/ch1_gulp.mpeg2audio
ch1-gulp-mpeg2video: prebuild
ffmpeg -threads 6 -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -y -an -b:v 4M -to 18.00 -f mpeg2video ./build/previews/ch1_gulp.mpeg2video
ch1-gulp-webm: prebuild
ffmpeg -threads 6 -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -y -an -b:v 4M -to 18.00 ./build/previews/ch1_gulp.webm
ch1-gulp-gif: prebuild
ffmpeg -ss 00:01:7.250 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -filter:v "scale=320:-1" -y -an -b:v 4M -to 4.00 -f mpeg2video ./tmp/video/ch1_gulp-clip.mpeg2video
ffmpeg -i ./tmp/video/ch1_gulp-clip.mpeg2video -vf "scale=320:-1:flags=lanczos,palettegen" -y ./tmp/ch1_gulp_palette.png
ffmpeg -i ./tmp/video/ch1_gulp-clip.mpeg2video -i ./tmp/ch1_gulp_palette.png -lavfi "scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg" -y -an ./build/previews/ch1_gulp.gif
ch1-slow-gulp: ch1-slow-gulp-mpeg2audio ch1-slow-gulp-mpeg2video ch1-slow-gulp-gif ch1-slow-gulp-webm
ch1-gulp: ch1-gulp-mpeg2audio ch1-gulp-mpeg2video ch1-gulp-gif ch1-gulp-webm
###
# The incomplete version is off by 17s, AKA audio was short by!
# ch3-incomplete-mpeg2audio: prebuild
# ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:07:36.389 -vn -y -f mp2 -to 00:09:37.777 ./build/ch3_incomplete.mpeg2audio
# The incomplete version is off by 17s, AKA video was short by!
# ch3-incomplete-mpeg2video: prebuild
# ffmpeg -y -i ./build/v4/VTS_01_1deint_v4.mpeg2video -ss 00:07:36.389 -c:v mpeg2video -b:v 6.660M -filter:v "yadif=0:-1:0" -an -f mpeg2video -to 00:09:37.777 ./build/ch3_incomplete.mpeg2video
###
ch3-tb-mpeg2audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:09:37.777 -vn -y -f mp2 -to 00:11:56.749 ./build/previews/ch3_tb.mpeg2audio
ch3-tb-mp4audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:09:37.777 -vn -y -c:a aac -to 00:11:56.749 ./build/previews/ch3_tb.m4a
ch3-tb-mpeg2video: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1deint_v4.mpeg2video -ss 00:09:37.777 -c:v mpeg2video -b:v 6.660M -filter:v "yadif=0:-1:0" -an -f mpeg2video -to 00:11:56.749 ./build/previews/ch3_tb.mpeg2video
ch3-tb-web-audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:09:37.777 -vn -y -c:a mp3 -to 00:11:56.749 ./build/previews/ch3_tb.mp3
# ch3-tb-web: prebuild
ch3-webm: prebuild
ffmpeg -y -threads 6 -i ./build/previews/ch3_tb.mpeg2video -i ./build/previews/ch3_tb.mpeg2audio -crf 12 -c:v libvpx -b:v 2M -c:a libvorbis ./build/previews/ch3_tb.webm
###
ch3-bj-mpeg2audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:11:56.749 -vn -y -f mp2 -to 00:12:48.300 ./build/previews/ch3_bj.mpeg2audio
ch3-bj-mp4audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:11:56.749 -vn -y -c:a aac -to 00:12:48.300 ./build/previews/ch3_bj.m4a
ch3-bj-mpeg2video: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1deint_v4.mpeg2video -ss 00:11:56.749 -c:v mpeg2video -b:v 6.660M -filter:v "yadif=0:-1:0" -an -f mpeg2video -to 00:12:48.300 ./build/previews/ch3_bj.mpeg2video
ch3-bj-web-audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:09:37.777 -vn -y -c:a mp3 -to 00:11:56.749 ./build/previews/ch3_bj.mp3
ch3-bj-webm: prebuild
ffmpeg -y -threads 6 -i ./build/previews/ch3_bj.mpeg2video -i ./build/previews/ch3_bj.mpeg2audio -crf 12 -c:v libvpx -b:v 2M -c:a libvorbis ./build/previews/ch3_bj.webm
ch3-bj-web: prebuild ch3-bj-web-audio
ffmpeg -y -threads 6 -i ./build/previews/ch4_doggy-pounding.mpeg2video -i ./build/previews/ch4_doggy-pounding.mpeg2audio -b:v 4M ./build/previews/ch4_doggy-pounding.webm
###
ch4-mpeg2audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:12:48.300 -vn -y -f mp2 -to 00:14:49.088 ./build/previews/ch4_doggy-pounding.mpeg2audio
ch4-mpeg2video: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1deint_v4.mpeg2video -ss 00:12:48.300 -c:v mpeg2video -b:v 8M -filter:v "yadif=0:-1:0" -an -f mpeg2video -to 00:14:49.088 ./build/previews/ch4_doggy-pounding.mpeg2video
ch4-mp4: prebuild
# ffmpeg -y -threads 6 -i ./build/v4/VTS_01_1_v4.mp4 -ss 00:12:48.300 -to 00:14:49.088 -c:v copy -c:a copy ./build/previews/ch4_doggy-pounding.mp4
ch4-webm: prebuild
ffmpeg -y -threads 6 -i ./build/previews/ch4_doggy-pounding.mpeg2video -i ./build/previews/ch4_doggy-pounding.mpeg2audio -b:v 4M ./build/previews/ch4_doggy-pounding.webm
ch4-mp4audio: prebuild
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:12:48.300 -vn -c:a aac -to 00:14:49.088 ./build/previews/ch4_doggy-pounding.m4a
ch4-web-audio:
ffmpeg -y -i ./build/v4/VTS_01_1_v4.mpeg2 -ss 00:12:48.300 -vn -c:a mp3 -to 00:14:49.088 ./build/previews/ch4_doggy-pounding.mp3
ch4-gif: stub
# ffmpeg -ss 00:01:46.200 -i ./build/v4/VTS_01_1deint_v4.mpeg2video -r 20 -filter:v "setpts=1.4985*PTS" -y -an -b:v 4M -t 17.583 -f mpeg2video ./tmp/video/chapter4-ptemp.mpeg2video
# ffmpeg -i ./tmp/video/ch4_doggy-pounding.mpeg2video -vf "scale=320:-1:flags=lanczos,palettegen" -y ./tmp/ch4_doggy-poundingP.png
ffmpeg -i ./cache/chapter4-ptemp.mov -i ./cache/chapter4-ptemp.png -lavfi "scale=320:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=floyd_steinberg,fps=60" -y -an ./build/previews/chapter4-ptemp.gif
ch4-gif-noscale: stub
ffmpeg -i ./cache/chapter4-ptemp.mov -i ./cache/chapter4-ptemp.png -lavfi "paletteuse=dither=floyd_steinberg,fps=60" -y -an ./build/previews/chapter4-ptempO.gif
ch4-clip-webm: stub
anim2webm.sh ./cache/chapter4-ptemp.mov ./build/previews/chapter4-ptemp.webm
ch4-web: stub
make ch4-gif
make ch4-gif-noscale
make ch4-clip-webm
# mp4box -add ./build/previews/ch4_doggy-pounding.mpeg2video -add ./build/previews/ch4_doggy-pounding.mp3 -add ./build/previews/ch4_doggy-pounding.m4a ./build/previews/ch4_doggy-pounding.mp4
###
CMD_VALUE = 1
mpv-slave-reload:
echo "{ \"command\": [\"sub-reload\", \"$(CMD_VALUE)\" ] }" | socat - /tmp/mpv
CMD_VALUE = -1
mpv-slave-sub-seek-back:
echo "{ \"command\": [\"sub-seek\", \"$(CMD_VALUE)\"] }" | socat - /tmp/mpv; echo 'show_text "Subtitles reloaded via remote"' | socat - /tmp/mpv
mpv-slave-pause:
echo "{ \"command\": [\"set_property_string\", \"yes\"] }" | socat - /tmp/mpv; echo 'show_text "Paused video via remote"' | socat - /tmp/mpv
reload:
make mpv-slave-reload
make mpv-slave-sub-seek-back
make mpv-slave-pause
###
video_deinterlace: prebuild
# -vf yadif=parity=bff
ffmpeg -y -i dvd.v4/VTS_01_1.VOB -c:v mpeg2video -b:v 6.660M -filter:v "yadif=0:-1:0" -an -f mpeg2video ./build/v4/VTS_01_1deint_v4.mpeg2video
ffmpeg -y -i dvd.v4/VTS_01_2.VOB -c:v mpeg2video -b:v 6.660M -filter:v "yadif=0:-1:0" -an -f mpeg2video ./build/v4/VTS_01_2deint_v4.mpeg2video
# ffmpeg -y -i dvd.v4/VTS_01_2.VOB -c:v copy -vf yadif=parity=bff build/v4/VTS_01_2deint.mpg2
# DVD encoder
mux_mp2_audio:
ffmpeg -y -i dvd.v4/audio/VTS_01_1.mp2 -i build/v4/VTS_01_1deint_v4.mpeg2video -target ntsc-dvd -c:a copy build/v4/VTS_01_1_v4.mpeg2
ffmpeg -y -i dvd.v4/audio/VTS_01_2.mp2 -i build/v4/VTS_01_2deint_v4.mpeg2video -target ntsc-dvd -c:a copy build/v4/VTS_01_2_v4.mpeg2
# x264 encoder
mux_mp3_audio:
ffmpeg -y -threads 6 -i dvd.v4/audio/VTS_01_1.mp3 -i build/v4/VTS_01_1deint_v4.mpeg2video -c:v mpeg4 -b:v 4M -c:a copy build/v4/VTS_01_1_v4.mp4
ffmpeg -y -threads 6 -i dvd.v4/audio/VTS_01_2.mp3 -i build/v4/VTS_01_2deint_v4.mpeg2video -c:v mpeg4 -b:v 4M -c:a copy build/v4/VTS_01_2_v4.mp4
subtitles:
# STUB
clean: clean-audio clean-video
echo "Removing temporary audio and video samples..."
rm -rfv ./tmp/*
clean-audio:
rm -rfv ./tmp/audio/*
clean-video:
rm -rfv ./tmp/video/*
dist:
# STUB
run:
mpv ${OUTPUT_DIR}/${WEB_VIDEO_OUTPUT}
# mpv remux/exports/${VIDEO_OUTPUT}
###
# audio_encode:
# FIXME
# ffmpeg -i ${INPUT_DIR}/${AUDIO_INPUT} -acodec libmp3lame ${OUTPUT_DIR}/${AUDIO_OUTPUT}
#
#chapter1_mpeg2video_encode:
ffmpeg -y -async 1 -i ${INPUT_DIR}/chapter1.wav -i ${INPUT_DIR}/chapter1.dv -b:v 6M -target ntsc-dvd -c:v mpeg2video -vf yadif=parity=bff -aspect 16:9 -framerate 29.970 ${OUTPUT_DIR}/chapter1.mp2
chapter2_mpeg2video_encode:
ffmpeg -y -async 1 -i ${INPUT_DIR}/chapter2.wav -i ${INPUT_DIR}/chapter2.m2v -b:v 6M -target ntsc-dvd -c:v mpeg2video -vf yadif=parity=bff -aspect 16:9 -framerate 29.970 ${OUTPUT_DIR}/chapter2.mp2
video_encode:
# mp4box -add ${INPUT_DIR}/${AUDIO_INPUT} -add ${INPUT_DIR}/${VIDEO_INPUT} ${OUTPUT_DIR}/${VIDEO_OUTPUT}
ffmpeg -y -i ${INPUT_DIR}/${AUDIO_INPUT} -i ${INPUT_DIR}/${VIDEO_INPUT} -vf yadif=parity=bff -b:v 3M ${OUTPUT_DIR}/${VIDEO_OUTPUT}
web:
BIT_RATE=3M ffmpeg -y -i ${INPUT_DIR}/${VIDEO_INPUT} -i ${INPUT_DIR}/${WEB_AUDIO_INPUT} -vf yadif=parity=bff -c:v libvpx -b:v 3M ${OUTPUT_DIR}/${WEB_VIDEO_OUTPUT}
###
tags:
# id3tag --track=01 --total=09 --song "Awesome BJ" --comment="v4" --album="Time Bomb DVD" --year=2008 --genre="Explicit" ./build/v4/clips/ch1_awesome-bj.mp4
# id3tag --track=02 --total=09 --song "Cowgirl" --comment="v4" --album="Time Bomb DVD" --year=2008 --genre="Explicit" ./build/v4/clips/ch2_cowgirl.mp4
# id3tag --track=03 --total=09 --song "Time Bomb" --comment="v4" --album="Time Bomb DVD" --year=2008 --genre="Explicit" ./build/v4/clips/ch3_TimeBomb.mp4
# id3tag --track=04 --total=09 --song "Fuck Me Some More BlowJob" --comment="v4" --album="Time Bomb DVD" --year=2008 --genre="Explicit" ./build/v4/clips/ch3_FuckMeSomeMoreBlowJob.mp4
# id3tag --track=05 --total=09 --song "Doggy Pounding" --comment="v4" --album="Time Bomb DVD" --year=2008 --genre="Explicit" ./build/v4/clips/ch4_doggy-pounding.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.