Created
          January 30, 2020 15:34 
        
      - 
      
- 
        Save alexander-elgin/c1310e169a913aa25d9ed36c2daf1a9e to your computer and use it in GitHub Desktop. 
    Video Thumbnail
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var ffmpeg = require('fluent-ffmpeg'); | |
| var path = require('path'); | |
| new ffmpeg(path.join(__dirname, 'input.mp4')) | |
| .takeScreenshots({ | |
| filename: 'thumbnail.png', | |
| size: '640x480', | |
| timemarks: [ '50%' ], | |
| }, __dirname, function(err) { | |
| if (err) { | |
| console.error(err); | |
| } else { | |
| console.log('screenshots were saved'); | |
| } | |
| }); | 
      
      
  Author
  
  
        
      
            alexander-elgin
  
      
      
      commented 
        Jan 30, 2020 
      
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment