Update index.js

This commit is contained in:
freearhey 2019-10-30 17:50:43 +03:00
parent a31987d5b9
commit 3c62f24cf1
1 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ const ffmpeg = require('fluent-ffmpeg')
const verbose = process.env.npm_config_debug || false
const errorLog = 'error.log'
const config = {
timeout: 60
timeout: 10
}
let stats = {
@ -44,10 +44,12 @@ async function test() {
await new Promise(resolve => {
const timeout = setTimeout(() => {
resolve()
}, config.timeout * 1000)
ffmpeg(item.url).ffprobe((err) => {
ffmpeg(item.url, { timeout: 60 }).ffprobe((err) => {
if(err) {
const message = parseMessage(err, item.url)