AlexAplin / nndownload

Download and process links from Niconico (nicovideo.jp)
MIT License
213 stars 28 forks source link

ffmpeg progress is broken on Windows #151

Closed fireattack closed 3 months ago

fireattack commented 3 months ago

I assume you adopted progress showing from https://github.com/kkroening/ffmpeg-python/blob/master/examples/show_progress.py, which unfortunately does not work on Windows.

I'd recommend using https://github.com/slhck/ffmpeg-progress-yield; if not wanting external deps, adopting something similar to https://gist.github.com/pbouill/fddf767221b47f83c97d7813c03569c4 (from https://stackoverflow.com/a/77052858/3939155) shouldn't be too hard, which does not use socket but directly parses from ffmpeg output.

We can even just use ffmpeg's built-in -stats, if we don't insist on having a progress bar. Or at least use it as a fallback on windows.

I think I can write a PR for this, but maybe I should just write a native HLS downloader instead?