Closed pratibha05sharma09 closed 3 years ago
You need to pass in path
in the options:
const ffmpeg = require('ffmpeg-static')
const genThumbnail = require('simple-thumbnail')
async function download () {
await genThumbnail('https://www.w3schools.com/Html/mov_bbb.webm', 'bunny.webm', '150x?', {
path: ffmpeg.path
})
console.log('Done!')
}
download()
Let me know if that works for you!
Let me know if that works for you!
Hello @ScottyFillups , Thanks for your response. I tried the solution provided by you. `const ffmpeg = require('ffmpeg-static') const genThumbnail = require('simple-thumbnail')
async function download () { await genThumbnail('https://www.w3schools.com/Html/mov_bbb.webm', 'bunny.webm', '150x?', { path: ffmpeg.path })
console.log('Done!') }
download()`
But still getting the error ffmpeg: not found . To implement this functionality, I have to install the ffmpeg on my server with command sudo apt-get install ffmpeg
. Please let me know, to do this without installing it on the server.
Ah! It seems that the ffmpeg-static
changed. https://www.npmjs.com/package/ffmpeg-static
This code should work:
const ffmpegPath = require('ffmpeg-static')
const genThumbnail = require('simple-thumbnail')
async function download () {
await genThumbnail('https://www.w3schools.com/Html/mov_bbb.webm', 'bunny.webm', '150x?', {
path: ffmpegPath
})
}
download().then(() => console.log('done'))
Let me know if that works!
@ScottyFillups Thanks for your response. Yes the above code is working fine.
Describe the bug I am getting error ffmpeg: not found
To Reproduce Code snippet or repository link that reproduces the error:
const simple-thumbnail = require('simple-thumbnail')
// Do stuff that breaks things!