scriptGenerator['clip02'] = function(params) {
var id = params.userName.facebookID;
//Tomamos la foto de Perfil y la ponemo centrada
var script = 'convert prod/' + id + '/input/images/profile.jpg -resize 80x80^ prod/' + id + '/output/temporal/profile-small-res.jpg' + endOfLine;
script += 'convert prod/' + id + '/output/temporal/profile-small-res.jpg -background none -splice 654x100 prod/' + id + '/output/temporal/profile-panel-small-s1.png' + endOfLine;
script += 'convert prod/' + id + '/output/temporal/profile-panel-small-s1.png \\( +clone -background black -shadow 40x2 \\) +repage +swap -gravity center -geometry -1-3 -composite prod/' + id + '/output/temporal/profile-panel-small-s1-shadow.png' + endOfLine;
script += 'convert prod/' + id + '/output/temporal/profile-panel-small-s1-shadow.png -gravity southeast -background none -splice 560x545 prod/' + id + '/output/temporal/profile-panel-small-final.png' + endOfLine;
script += 'convert input/images/panel-2.png prod/' + id + '/output/temporal/profile-panel-small-final.png -gravity center -composite prod/' + id + '/output/temporal/panel-final-small.png' + endOfLine;
//Hacemos el zoom
script += '/root/bin/ffmpeg -loop 1 -i prod/' + id + '/output/temporal/panel-final-small.png -vf "' + "zoompan=z='zoom+(2/3000)':x='iw/2-(iw/zoom/2)':fps='60':d='1200'" + '" -c:v libx264 -pix_fmt yuvj420p -t 5.24 -s "640x360" prod/' + id + '/output/temporal/clip02parcial.mp4' + endOfLine;
//Aplicamos Fade In
script += '/root/bin/ffmpeg -i input/videos/clip02.mp4 -i prod/' + id + '/output/temporal/clip02parcial.mp4 -filter_complex "overlay" prod/' + id + '/output/temporal/clip02final-nofade.mp4' + endOfLine;
script += '/root/bin/ffmpeg -i prod/' + id + '/output/temporal/clip02final-nofade.mp4 -y -vf "fade=in:0:30,fade=out:70:30" prod/' + id + '/output/temporal/clip02final.mp4';
//Aplicamos Fade Out
return script;
};
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.