Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. new ffmpeg(video.path).screenshots({
  2. timestamps: ['5%', '10%', '15%', '20%', '25%'],
  3. filename: video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_%0i.jpg",
  4. folder: video.thumbpath,
  5. size: config.size
  6. }).on('error', function(filenames){
  7. new ffmpeg(video.path).screenshots({
  8. timestamps: [30, 60, 90, 120, 150],
  9. filename: video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_%0i.jpg",
  10. folder: video.thumbpath,
  11. size: config.size
  12. }).on('error', function(filenamez){
  13. debug += grapThumbnail + filenamez + "\n";
  14. //callbackFunction(video, STATUS_CONVERT);
  15. }).on("end", function(){
  16. for(var i = 1 ; i <= 5 ; i ++){
  17. var file = {};
  18. file.filename = video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_0" + i + ".jpg";
  19. file.filepath = video.thumbpath + video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_0" + i + ".jpg";
  20. file.host = config.host;
  21. file.username = config.username;
  22. file.password = config.password;
  23. file.path = config.path;
  24.  
  25. _ftpqueue.push(file);
  26. }
  27. startFTPUpload();
  28. });
  29. }).on("end", function(){
  30. for(var i = 1 ; i <= 5 ; i ++){
  31. var file = {};
  32. file.filename = video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_0" + i + ".jpg";
  33. file.filepath = video.thumbpath + video.filename + ((video.alias == "") ? "" : "_" + video.alias) + "_0" + i + ".jpg";
  34. file.host = config.host;
  35. file.username = config.username;
  36. file.password = config.password;
  37. file.path = config.path;
  38.  
  39. _ftpqueue.push(file);
  40. }
  41. startFTPUpload();
  42. });
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement