AlexAplin / nndownload

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

When output file path has space then FormatNotAvailableException #170

Closed asksn0w closed 1 month ago

asksn0w commented 2 months ago

When nico video title has space (ex. "foo bar video") then call nndownloder like nndownload.py -g -o c:/test/{title}.{ext} then throws FormatNotAvailableException .

So, i checked calling ffmpeg command line. i found the output path didn't cover outputpath

ffmpeg -allowed_extensions ALL -protocol_whitelist https,http,tls,tcp,file,crypto -i %temp%\tmp9n96waxa\so00000000_dms_video_uri.m3u8 -allowed_extensions ALL -protocol_whitelist https,http,tls,tcp,file,crypto -i %temp%\tmp9n96waxa\so00000000_dms_audio_uri.m3u8 -map 0 -map 1 -acodec copy -vcodec copy C:/NND/asdf/foo bar video.part.mp4 -progress --nostats -y

I think it should be cover outpath with "" or escapse space character

Or, user call cli like this nndownload -g-o "c:\nnd\{title}.{ext}"

AlexAplin commented 1 month ago

This doesn't happen on Linux at least. I'm a little surprised this would happen on Windows because subprocess.Popen is supposed to handle this fine when the args are provided as a list and when shell=False: https://docs.python.org/3/library/subprocess.html

Can you confirm the version?

AlexAplin commented 1 month ago

@asksn0w Pinging

asksn0w commented 1 month ago

Oh, Sorry I missed mention. My Python version is 3.10.7.

Anything else?

AlexAplin commented 1 month ago

I meant the program version, is it c964dca999e7676c74ed91c93fd30a5e6238f5a5 (most recent commit)?

asksn0w commented 1 month ago

I think no. I'll test your mentioned version

asksn0w commented 1 month ago

It works perfectly.

AlexAplin commented 1 month ago

Thanks for verifying!