sidneys / ffmpeg-progressbar-cli

A colored progress bar for FFmpeg.
https://npmjs.com/package/ffmpeg-progressbar-cli
MIT License
210 stars 22 forks source link

moment.duration(...).format is not a function #5

Open asm0dey opened 5 years ago

asm0dey commented 5 years ago
 $ ffmpeg-bar -i Untitled\ Project.mp4 Untitled.mkv                                                                                                                                                                                [10:22:26]
/usr/lib/node_modules/ffmpeg-progressbar-cli/lib/progress-bar.js:47
    return moment.duration(seconds, 'seconds').format(etaFormat, { trim: false })
                                               ^

TypeError: moment.duration(...).format is not a function
    at convertSecondsToTimecode (/usr/lib/node_modules/ffmpeg-progressbar-cli/lib/progress-bar.js:47:48)
    at Object.startBar [as start] (/usr/lib/node_modules/ffmpeg-progressbar-cli/lib/progress-bar.js:97:22)
    at Socket.onData (/usr/lib/node_modules/ffmpeg-progressbar-cli/lib/main.js:122:17)
    at Socket.emit (events.js:193:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:231:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:154:17)
ghost commented 5 years ago

I have the same issue

But in my case, I'm using two computers...where one of them runs correctly and the other one spits out this error

ghost commented 5 years ago

Update

I actually managed to fix the issue, bellow are all the steps I used to troubleshoot/fix the issue

asm0dey commented 5 years ago

@mnervik there is no such instructions in readme file. There is only one command for installation

ghost commented 5 years ago

ok...just saying what I did initially, and what I did to troubleshoot and fix the issue.