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