ffmpeg-progressbar-cli icon indicating copy to clipboard operation
ffmpeg-progressbar-cli copied to clipboard

TypeError: Cannot read property 'get' of undefined

Open SpedNSFW opened this issue 5 years ago • 1 comments

Just grabbed this today as it looked interesting and when I went to give it a go, I got the error you will see below.

I am using the Git Bash shell on Windows 10.

This was the command I passed through:

ffmpeg-bar -hwaccel auto -hide_banner -i "$1" -pix_fmt yuv420p -map 0:v -map 0:a -map_metadata 0 -c:v hevc_nvenc -rc constqp -qp 24 -b:v 0K -c:a copy -movflags +faststart -movflags use_metadata_tags "$output"

I know the command works with ffmpeg just fine, but it looks like ffmpeg-progressbar-cli doesn't work with shell, which should be remedied.

C:\Users\TheNo\AppData\Roaming\npm\node_modules\ffmpeg-progressbar-cli\lib\predict-progressbar-width.js:45
    const barBeamWidth = (windowSize.get().width - predictTextWidth(targetFilenameLength)) * targetBarBeamRatio
                                     ^

TypeError: Cannot read property 'get' of undefined
    at Object.predictBeamWidth [as beam] (C:\Users\TheNo\AppData\Roaming\npm\node_modules\ffmpeg-progressbar-cli\lib\predict-progressbar-width.js:45:38)
    at startPrimaryTask (C:\Users\TheNo\AppData\Roaming\npm\node_modules\ffmpeg-progressbar-cli\lib\main.js:84:54)
    at onData (C:\Users\TheNo\AppData\Roaming\npm\node_modules\ffmpeg-progressbar-cli\lib\main.js:233:13)
    at Socket.<anonymous> (C:\Users\TheNo\AppData\Roaming\npm\node_modules\ffmpeg-progressbar-cli\lib\main.js:258:9)
    at Socket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:303:12)
    at readableAddChunk (_stream_readable.js:279:9)
    at Socket.Readable.push (_stream_readable.js:218:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)

SpedNSFW avatar Dec 24 '20 12:12 SpedNSFW

I'm facing the same problem, did you find a solution?

amalrasas avatar May 26 '23 13:05 amalrasas