corrections of the last commit
This commit is contained in:
@@ -26,52 +26,24 @@ kyu6-sourceFiles = \
|
|||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: kyu8 kyu7
|
all: kyu8 kyu7
|
||||||
|
|
||||||
.PHONY: kyu7 kyu8 kyu6
|
.PHONY: kyuVideos
|
||||||
kyu8: kyu8.html
|
kyuVideos:
|
||||||
kyu7: kyu7.html
|
for file in Kyu*.json; do ./clipper $${file}; done;
|
||||||
kyu6: kyu6.html
|
make clearVideoMetaData
|
||||||
|
make recursiveMozJpeg
|
||||||
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
|
|
||||||
|
|
||||||
# Some of the meta data gets copied during rencode so we search for all webmVideos and delete the meta data
|
# Some of the meta data gets copied during rencode so we search for all webmVideos and delete the meta data
|
||||||
.PHONY: clearVideoMetaData
|
.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 {} \;
|
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
|
.PHONY: clean
|
||||||
clean:
|
clean: cleanVideos
|
||||||
rm kyu6.html
|
|
||||||
|
.PHONY: cleanVideos
|
||||||
|
cleanVideos:
|
||||||
|
rm -r videos
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ def getDimensions(config, clip, bitrateProfiles):
|
|||||||
w, h = -2, 480
|
w, h = -2, 480
|
||||||
# set the height by the bitrateProfile
|
# set the height by the bitrateProfile
|
||||||
try:
|
try:
|
||||||
h = bitrateProfiles[config['bitrateProfile']]
|
h = bitrateProfiles[config['bitrateProfile']]['height']
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# overwrite it with the scaling
|
# overwrite it with the scaling
|
||||||
@@ -87,15 +87,17 @@ def twoPassEncode(inputFilename, clip):
|
|||||||
)
|
)
|
||||||
|
|
||||||
stream = ffmpeg.output(stream,
|
stream = ffmpeg.output(stream,
|
||||||
clip['target'],
|
# clip['target'],
|
||||||
|
"/dev/null",
|
||||||
vcodec=config['vcodec'],
|
vcodec=config['vcodec'],
|
||||||
**{
|
**{
|
||||||
# "an":None,
|
"an": None,
|
||||||
# "y": None,
|
"y": None,
|
||||||
|
"f": "null",
|
||||||
"pass": "1",
|
"pass": "1",
|
||||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||||
"quality": config['quality'] if 'quality' in config else "best",
|
"quality": config['quality'] if 'quality' in config else "best",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -124,17 +126,16 @@ def twoPassEncode(inputFilename, clip):
|
|||||||
h=clip['crop']['h']
|
h=clip['crop']['h']
|
||||||
)
|
)
|
||||||
|
|
||||||
h, w = getDimensions(config, clip)
|
h, w = getDimensions(config, clip, bitrateProfiles)
|
||||||
|
|
||||||
stream = ffmpeg.output(stream, audio,
|
stream = ffmpeg.output(stream, audio,
|
||||||
clip['target'],
|
clip['target'],
|
||||||
vcodec=config['vcodec'],
|
vcodec=config['vcodec'],
|
||||||
**{
|
**{
|
||||||
# "y": None,
|
|
||||||
"pass": "2",
|
"pass": "2",
|
||||||
"b:v": bitrateProfile[config['bitrateProfile']['bitrate']],
|
"b:v": bitrateProfiles[config['bitrateProfile']]['bitrate'],
|
||||||
"minrate": bitrateProfile[config['bitrateProfile']['minrate']],
|
"minrate": bitrateProfiles[config['bitrateProfile']]['minrate'],
|
||||||
"maxrate": bitrateProfile[config['bitrateProfile']['maxrate']],
|
"maxrate": bitrateProfiles[config['bitrateProfile']]['maxrate'],
|
||||||
"quality": config['quality'] if 'quality' in config else "best",
|
"quality": config['quality'] if 'quality' in config else "best",
|
||||||
"acodec": config['acodec'],
|
"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
|
# @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]
|
inputFilename = glob.glob(infoDict['id']+"*")[0]
|
||||||
|
|
||||||
w, h = getDimensions(config, clip)
|
w, h = getDimensions(config, clip, bitrateProfiles)
|
||||||
|
|
||||||
# generate preview image for the video
|
# generate preview image for the video
|
||||||
if 'poster' in clip:
|
if 'poster' in clip:
|
||||||
|
|||||||
Reference in New Issue
Block a user