corrections of the last commit
This commit is contained in:
@@ -26,52 +26,24 @@ kyu6-sourceFiles = \
|
||||
.PHONY: all
|
||||
all: kyu8 kyu7
|
||||
|
||||
.PHONY: kyu7 kyu8 kyu6
|
||||
kyu8: kyu8.html
|
||||
kyu7: kyu7.html
|
||||
kyu6: kyu6.html
|
||||
|
||||
kyu8.html: $(kyu8-sourceFiles)
|
||||
pandoc -i --section-divs -t revealjs -s -o kyu7.html $(kyu7-sourceFiles)
|
||||
|
||||
kyu7.html: $(kyu7-sourceFiles)
|
||||
pandoc -i --section-divs -t revealjs -s -o kyu7.html $(kyu7-sourceFiles)
|
||||
|
||||
kyu6.html: $(kyu6-sourceFiles)
|
||||
pandoc -i --section-divs -t revealjs -s -o kyu6.html $(kyu6-sourceFiles)
|
||||
./yt-clipper.py Kyu6.json
|
||||
|
||||
.PHONY: directoryStructure
|
||||
directoryStructure:
|
||||
mkdir -p videos/8terKyu/Ukemi
|
||||
mkdir -p videos/8terKyu/NageWaza
|
||||
mkdir -p videos/8terKyu/OsaeKomiWaza
|
||||
mkdir -p videos/8terKyu/TachiWaza
|
||||
mkdir -p videos/8terKyu/NeWaza
|
||||
mkdir -p videos/8terKyu/Randori
|
||||
mkdir -p videos/7terKyu/Ukemi
|
||||
mkdir -p videos/7terKyu/NageWaza
|
||||
mkdir -p videos/7terKyu/OsaeKomiWaza
|
||||
mkdir -p videos/7terKyu/TachiWaza
|
||||
mkdir -p videos/7terKyu/NeWaza
|
||||
mkdir -p videos/7terKyu/Randori
|
||||
mkdir -p videos/6terKyu/Ukemi
|
||||
mkdir -p videos/6terKyu/NageWaza
|
||||
mkdir -p videos/6terKyu/OsaeKomiWaza
|
||||
mkdir -p videos/6terKyu/TachiWaza
|
||||
mkdir -p videos/6terKyu/NeWaza
|
||||
mkdir -p videos/6terKyu/Randori
|
||||
mkdir -p videos/5terKyu/Ukemi
|
||||
mkdir -p videos/5terKyu/NageWaza
|
||||
mkdir -p videos/5terKyu/KansetsuWaza
|
||||
mkdir -p videos/5terKyu/TachiWaza
|
||||
mkdir -p videos/5terKyu/NeWaza
|
||||
mkdir -p videos/5terKyu/Randori
|
||||
.PHONY: kyuVideos
|
||||
kyuVideos:
|
||||
for file in Kyu*.json; do ./clipper $${file}; done;
|
||||
make clearVideoMetaData
|
||||
make recursiveMozJpeg
|
||||
|
||||
# Some of the meta data gets copied during rencode so we search for all webmVideos and delete the meta data
|
||||
.PHONY: clearVideoMetaData
|
||||
clearVideoMetaData:
|
||||
find -name *.webm -exec ffmpeg -i {} -map_metadata -1 -c:v copy -c:a copy temp.webm \; -exec mv -f temp.webm {} \;
|
||||
|
||||
.PHONY: recursiveMozJpeg
|
||||
recursiveMozJpeg:
|
||||
find -name *.jpg -exec ../submodules/mozjpeg/build/jpegtran -outfile {} {} \;
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm kyu6.html
|
||||
clean: cleanVideos
|
||||
|
||||
.PHONY: cleanVideos
|
||||
cleanVideos:
|
||||
rm -r videos
|
||||
|
||||
@@ -52,7 +52,7 @@ def getDimensions(config, clip, bitrateProfiles):
|
||||
w, h = -2, 480
|
||||
# set the height by the bitrateProfile
|
||||
try:
|
||||
h = bitrateProfiles[config['bitrateProfile']]
|
||||
h = bitrateProfiles[config['bitrateProfile']]['height']
|
||||
except:
|
||||
pass
|
||||
# overwrite it with the scaling
|
||||
@@ -87,15 +87,17 @@ def twoPassEncode(inputFilename, clip):
|
||||
)
|
||||
|
||||
stream = ffmpeg.output(stream,
|
||||
clip['target'],
|
||||
# clip['target'],
|
||||
"/dev/null",
|
||||
vcodec=config['vcodec'],
|
||||
**{
|
||||
# "an":None,
|
||||
# "y": None,
|
||||
"an": None,
|
||||
"y": None,
|
||||
"f": "null",
|
||||
"pass": "1",
|
||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
||||
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||
"quality": config['quality'] if 'quality' in config else "best",
|
||||
}
|
||||
)
|
||||
@@ -124,17 +126,16 @@ def twoPassEncode(inputFilename, clip):
|
||||
h=clip['crop']['h']
|
||||
)
|
||||
|
||||
h, w = getDimensions(config, clip)
|
||||
h, w = getDimensions(config, clip, bitrateProfiles)
|
||||
|
||||
stream = ffmpeg.output(stream, audio,
|
||||
clip['target'],
|
||||
vcodec=config['vcodec'],
|
||||
**{
|
||||
# "y": None,
|
||||
"pass": "2",
|
||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
||||
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||
"quality": config['quality'] if 'quality' in config else "best",
|
||||
"acodec": config['acodec'],
|
||||
}
|
||||
@@ -172,7 +173,7 @@ for clip in clipDict:
|
||||
# @todo This is a very bad hack because the outtmpl options doesn't seem to be working if the file gets reencoded
|
||||
inputFilename = glob.glob(infoDict['id']+"*")[0]
|
||||
|
||||
w, h = getDimensions(config, clip)
|
||||
w, h = getDimensions(config, clip, bitrateProfiles)
|
||||
|
||||
# generate preview image for the video
|
||||
if 'poster' in clip:
|
||||
|
||||
Reference in New Issue
Block a user