diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-08-29 21:35:22 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-08-29 21:35:22 -0400 |
commit | 2c6ad4d51f5625c30bab0c4ca8a19c2e44c1a7a7 (patch) | |
tree | 7f710b4f242243d4dfb624a0ef53bb12bfb318b0 /video.mk | |
parent | f80b729d7b21b67503e8f497d10bf61a454698e5 (diff) | |
download | makefile_templates-2c6ad4d51f5625c30bab0c4ca8a19c2e44c1a7a7.tar.gz makefile_templates-2c6ad4d51f5625c30bab0c4ca8a19c2e44c1a7a7.zip |
added video targets for ready videos
Diffstat (limited to 'video.mk')
-rw-r--r-- | video.mk | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -1,15 +1,31 @@ CLEAN_TARGETS += clean_video REAL_CLEAN_TARGETS += real_clean_video +## Video encoder options +# with added voice low-pass filter and frame rate reduced to 15 (good for slides) +ffmpegOptions ?= -movflags faststart -r 15 -c:v libx264 -preset veryfast -tune stillimage -c:a libfdk_aac -vbr 1 -cutoff 4000 +# remove audio track and recode video (good for slides) +#ffmpegOptions ?= -movflags faststart -r 15 -c:v libx264 -preset veryfast -tune stillimage -an +# remove audio track and recode video (do not change frame rate) +# ffmpegOptions ?= -movflags faststart -c:v libx264 -preset veryfast -tune stillimage -an +# recode video with no filters +# ffmpegOptions ?= -movflags faststart -c:v libx264 -preset veryfast -tune stillimage -c:a libfdk_aac -vbr 1 + rawDir = rawVideo recodedDir = recodedVideo +readyDir = readyVideo -dest_dir_video ?= $(dest_dir)/$(recodedDir) -destination_dirs += $(dest_dir_video) +dest_dir_video_recoded ?= $(dest_dir)/$(recodedDir) +dest_dir_video_ready ?= $(dest_dir)/$(readyDir) +destination_dirs += $(dest_dir_video_recoded) $(dest_dir_video_ready) rawVideo = $(wildcard $(rawDir)/*.mp4) recoded_video_from_raw = $(rawVideo:$(rawDir)/%=$(recodedDir)/%) -recoded_video_dest_targets = $(rawVideo:$(rawDir)/%=$(dest_dir_video)/%) +recoded_video_dest_targets = $(rawVideo:$(rawDir)/%=$(dest_dir_video_recoded)/%) + +readyVideo = $(wildcard $(readyDir)/*.mp4) +ready_video_dest_targets = $(readyVideo:$(readyDir)/%=$(dest_dir_video_ready)/%) + recoded_video: $(recoded_video_from_raw) @@ -17,18 +33,24 @@ $(recodedDir): $(INSTALL) -d -m 0755 '$@' $(recodedDir)/% : $(rawDir)/% | $(recodedDir) - ffmpeg -i $< -movflags faststart -r 15 -c:v libx264 -preset veryfast -tune stillimage -c:a libfdk_aac -vbr 1 -cutoff 4000 $@ + ffmpeg -i $< $(ffmpegOptions) $@ install_recoded_video: $(recoded_video_dest_targets) +install_ready_video: $(ready_video_dest_targets) -# $(dest_dir_video): +# $(dest_dir_video_recoded): # $(INSTALL) -d -m 0755 '$@' -$(recoded_video_dest_targets): $(dest_dir_video)/% : $(recodedDir)/% | $(dest_dir_video) +$(recoded_video_dest_targets): $(dest_dir_video_recoded)/% : $(recodedDir)/% | $(dest_dir_video_recoded) ifneq ($(strip $(recoded_video_from_raw)),) $(INSTALL) -m 0644 '$<' '$@' endif +$(ready_video_dest_targets): $(dest_dir_video_ready)/% : $(readyDir)/% | $(dest_dir_video_ready) +ifneq ($(strip $(readyVideo)),) + $(INSTALL) -m 0644 '$<' '$@' +endif + clean_video: real_clean_video: |