Correcting a small error that caused the script throwing an error if the image was too small:
-
picturepath = "C:\Users\Georg\Pictures\whatever.jpg"
audiopath = "C:\Users\Georg\Music\whatever.mp3"
minutes = 2
seconds = 34
# don't edit below this line
video = ImageSource(picturepath, 0, (((minutes*60)+seconds)*30+25), 30)
audio = DirectShowSource(audiopath)
fullvideo = AudioDub(video, audio)
# enlarge to 720p if smaller
width = Width(fullvideo)
height = Height(fullvideo)
fullvideo = height < 720 ? Lanczos4Resize(fullvideo, int(720*(Float(width)/height)), 720) : fullvideo
# crop to valid x264
width = Width(fullvideo)
height = Height(fullvideo)
fullvideo = width%4 != 0 ? Crop(fullvideo, 0, 0, -width%4, 0) : fullvideo
fullvideo = height%2 != 0 ? Crop(fullvideo, 0, 0, 0, -1) : fullvideo
fullvideo = ConvertToYV12(fullvideo)
return fullvideo
--
http://hyouta.ath.cx/musicquiz
http://talesofvesperia.net