LogFAQs > #241253

LurkerFAQs ( 06.29.2011-09.11.2012 ), Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicVGMusic of the Day Part 5: Approaching (and passing) 1 year of youtube fun
Pikachu 025
09/22/11 7:23:00 PM
#172:


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
... Copied to Clipboard!
Topic List
Page List: 1