cdgriffith / FastFlix

FastFlix is a free GUI for H.264, HEVC and AV1 hardware and software encoding!
https://fastflix.org/
MIT License
1.12k stars 55 forks source link

Encode failing due to extra space in file path #597

Open Buzz0016 opened 1 month ago

Buzz0016 commented 1 month ago

Fastflix Version: 5.8.0

OS: Windows 11

Description: For whatever reason, fastflix fails to due to an extra space in the file path that it somehow adds to the start of the file name. The file does exist and i can open it and setup the conversion process from fastflix, but the conversion process fails due to this issue

The file path should be D:\Rips\Con Air.mkv, but its outputing D:\Rips\ Con Air.mkv.

Log: 2024-08-11 08:19:39 Monolith fastflix-core[5304] INFO Starting FastFlix 5.8.0 2024-08-11 08:19:46 Monolith fastflix[20568] DEBUG Using config file C:\Users\Brenn\AppData\Roaming\FastFlix\fastflix.yaml 2024-08-11 08:19:46 Monolith fastflix[20568] INFO Checking for available NVEncC encoders 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running task Gather FFmpeg version 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running command: C:\Windows\system32\ffmpeg.EXE -version 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running task Gather FFprobe version 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running command: C:\Windows\system32\ffprobe.EXE -version 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running task Gather FFmpeg audio encoders 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running command: C:\Windows\system32\ffmpeg.EXE -hide_banner -encoders 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running task Determine OpenCL Support 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running command: C:\Windows\system32\ffmpeg.EXE -hide_banner -log_level error -init_hw_device opencl:0.0 -h 2024-08-11 08:19:47 Monolith fastflix[20568] INFO Running task Initialize Encoders 2024-08-11 08:20:01 Monolith fastflix[20568] DEBUG Checking for newer versions of FastFlix 2024-08-11 08:20:02 Monolith fastflix[20568] DEBUG FastFlix is up tp date 2024-08-11 08:22:25 Monolith fastflix[20568] DEBUG Starting conversion process 2024-08-11 08:22:25 Monolith fastflix[20568] DEBUG System has been asked to not sleep 2024-08-11 08:22:25 Monolith fastflix[20568] DEBUG System has been asked to not sleep 2024-08-11 08:22:25 Monolith fastflix-core[5304] DEBUG Using work dir: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166 2024-08-11 08:22:25 Monolith fastflix-core[5304] DEBUG command output file set to: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166\encoder_output_eff455b38ece.log 2024-08-11 08:22:25 Monolith fastflix-core[5304] DEBUG command error output file set to: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166\encoder_error_output_1b618d64a162.log 2024-08-11 08:22:25 Monolith fastflix-core[5304] INFO Running command: "C:\hevctools\NVEncC64.exe" --avsw --device 0 -i "D:\Rips\ Con Air.mkv" --seekto 6925.2 --video-metadata clear --metadata clear --chapter-copy -c hevc --vbr 7000 --bref-mode disabled --preset quality --tier high --no-aq --level auto --chromaloc auto --colorrange auto --colormatrix bt709 --transfer bt709 --colorprim bt709 --output-depth 8 --multipass 2pass-full --mv-precision Auto --avsync cfr --audio-metadata 1?language=eng --audio-stream 1?:5.1(side) --audio-codec 1?flac --audio-metadata 1?clear --audio-metadata 1?title="Surround 5.1" --audio-metadata 1?handler="Surround 5.1" --audio-disposition 1?default --audio-metadata 2?language=eng --audio-stream 2?:5.1(side) --audio-codec 2?aac --audio-bitrate 2?640k --audio-metadata 2?clear --audio-metadata 2?title="Surround 5.1" --audio-metadata 2?handler="Surround 5.1" --audio-disposition 2?unset --sub-copy 1,2,3,4,5,6,7 --sub-disposition 1?unset --sub-metadata 1?language='eng' --sub-disposition 2?unset --sub-metadata 2?language='fra' --sub-disposition 3?unset --sub-metadata 3?language='spa' --sub-disposition 4?unset --sub-metadata 4?language='fra' --sub-disposition 5?unset --sub-metadata 5?language='fra' --sub-disposition 6?unset --sub-metadata 6?language='spa' --sub-disposition 7?unset --sub-metadata 7?language='spa' -m default_mode:infer_no_subs -o "A:\Emby\Movies\Con Air\Con Air.mkv" 2024-08-11 08:22:25 Monolith fastflix-core[5304] INFO Set command priority to Normal 2024-08-11 08:22:25 Monolith fastflix-core[5304] INFO -------------------------------------------------------------------------------- 2024-08-11 08:22:25 Monolith fastflix-core[5304] INFO A:\Emby\Movies\Con Air\Con Air.mkv 2024-08-11 08:22:25 Monolith fastflix-core[5304] INFO -------------------------------------------------------------------------------- 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO avsw: error opening file "D:\Rips\ Con Air.mkv": No such file or directory 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO failed to initialize file reader(s). 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO Failed to open input file. 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO 2024-08-11 08:22:26 Monolith fastflix-core[5304] INFO Error detected while converting 2024-08-11 08:22:27 Monolith fastflix[20568] WARNING Reorder queue called while encoding 2024-08-11 08:22:27 Monolith fastflix[20568] DEBUG Updating queue from command worker: Response(status='error', video_uuid='f8a0a6f1-802a-460f-ab52-a83a59addd6a', command_uuid='7df32f25-a811-4011-bb17-9f7d194b3029') 2024-08-11 08:22:27 Monolith fastflix[20568] DEBUG System has been allowed to enter sleep mode again 2024-08-11 08:22:33 Monolith fastflix[20568] DEBUG System has been allowed to enter sleep mode again

cdgriffith commented 4 weeks ago

Hi @Buzz0016 that is extremely weird, and I have not seen before and unsure how it is happening.

Would appreciate some feedback to track this down:

  1. Do you drag and drop the video, or select it via the "Source" button?
  2. When it's loaded into FastFlix, does the "Source" area show the space as well?
  3. If you select that file with a different encoder, does it also have the space in it?

Thanks for any additional info!

Buzz0016 commented 4 weeks ago

Thanks for getting back to me. I select the source file by selecting the source button and the extra space does not show up in the source area. It happens on all encoders, but if i restart the conversion without putting it in the queue first, it works normally.

Buzz0016 commented 4 weeks ago

Ok so it appears that if there are multiple videos in the queue, it will always fail to convert due to the issue but if only 1 video is in the queue it will fail but if the conversion is restarted with the convert button instead of the add to queue button, the conversion will work fine.

cdgriffith commented 4 weeks ago

That is really odd. As this seems to be a one off issues, I am wondering if it's just something got messed up during the install (will happen if FastFlix is running and trying to install it at same time.)

So just a first sanity check, can you make sure FastFlix isn't running, uninstall it (search for "add or remove programs" via start menu, and find it in list). And then use the installer to install it again and try.

I will also keep looking at places this might happen in the code, but want to make sure it's not a wild goose chase :)

Buzz0016 commented 4 weeks ago

I made sure it was closed then I tried uninstalling it from the settings app then reinstalled it and deleted the fastflix folder in AppData\Roaming to make sure fastflix was starting from a clean slate, i then loaded the queue file and the bug still persists. This is a weird bug

cdgriffith commented 4 weeks ago

Checking two other things to narrow down. 1. This happens with other video files? Does it happen to videos on C: drive as well?

Buzz0016 commented 4 weeks ago

It happens with videos on all of my connected drives

cdgriffith commented 4 weeks ago

I have created a special build to try and figure this out. When the space appears it should throw a lot of information into the log.

I put it here starting with DEBUG https://github.com/cdgriffith/FastFlix/releases/tag/5.8.0b0

Buzz0016 commented 4 weeks ago

I spotted the file path in the Current Video debug log

attachment_tracks: [] audio_tracks:

cdgriffith commented 4 weeks ago

You should be seeing stuff in the command prompt window that start with: "Invalid source path"

After that will have around 10 lines of code file names, that's what would be most helpeful to see :)

Buzz0016 commented 4 weeks ago

Im looking at my command prompt and im not seeing invalid source path

2024-08-13 09:40:39 Monolith fastflix-core[5972] INFO Starting FastFlix 5.8.1b0 2024-08-13 09:40:47 Monolith fastflix[9672] DEBUG Using config file C:\Users\Brenn\AppData\Roaming\FastFlix\fastflix.yaml 2024-08-13 09:40:47 Monolith fastflix[9672] INFO Checking for available NVEncC encoders 2024-08-13 09:40:49 Monolith fastflix[9672] INFO Running task Gather FFmpeg version 2024-08-13 09:40:49 Monolith fastflix[9672] INFO Running command: C:\Windows\system32\ffmpeg.EXE -version 2024-08-13 09:40:51 Monolith fastflix[9672] INFO Running task Gather FFprobe version 2024-08-13 09:40:51 Monolith fastflix[9672] INFO Running command: C:\Windows\system32\ffprobe.EXE -version 2024-08-13 09:40:53 Monolith fastflix[9672] INFO Running task Gather FFmpeg audio encoders 2024-08-13 09:40:53 Monolith fastflix[9672] INFO Running command: C:\Windows\system32\ffmpeg.EXE -hide_banner -encoders 2024-08-13 09:40:53 Monolith fastflix[9672] INFO Running task Determine OpenCL Support 2024-08-13 09:40:53 Monolith fastflix[9672] INFO Running command: C:\Windows\system32\ffmpeg.EXE -hide_banner -log_level error -init_hw_device opencl:0.0 -h 2024-08-13 09:40:53 Monolith fastflix[9672] INFO Running task Initialize Encoders 2024-08-13 09:41:06 Monolith fastflix[9672] DEBUG Checking for newer versions of FastFlix 2024-08-13 09:41:07 Monolith fastflix[9672] DEBUG FastFlix is up tp date 2024-08-13 09:41:49 Monolith fastflix[9672] DEBUG Starting conversion process 2024-08-13 09:41:49 Monolith fastflix[9672] DEBUG System has been asked to not sleep 2024-08-13 09:41:49 Monolith fastflix[9672] DEBUG System has been asked to not sleep 2024-08-13 09:41:49 Monolith fastflix-core[5972] DEBUG Using work dir: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166 2024-08-13 09:41:49 Monolith fastflix-core[5972] DEBUG command output file set to: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166\encoder_output_e254feacd63c.log 2024-08-13 09:41:49 Monolith fastflix-core[5972] DEBUG command error output file set to: C:\Users\Brenn\AppData\Roaming\FastFlix\temp_103136f141f8fdc30c5ab166\encoder_error_output_3bb08e35b409.log 2024-08-13 09:41:49 Monolith fastflix-core[5972] INFO Running command: "C:\hevctools\NVEncC64.exe" --avsw --device 0 -i "D:\Rips\ Con Air.mkv" --seekto 6925.2 --video-metadata clear --metadata clear --chapter-copy -c hevc --vbr 7000 --bref-mode disabled --preset quality --tier high --no-aq --level auto --chromaloc auto --colorrange auto --colormatrix bt709 --transfer bt709 --colorprim bt709 --output-depth 8 --multipass 2pass-full --mv-precision Auto --avsync cfr --audio-metadata 1?language=eng --audio-stream 1?:5.1(side) --audio-codec 1?flac --audio-metadata 1?clear --audio-metadata 1?title="Surround 5.1" --audio-metadata 1?handler="Surround 5.1" --audio-disposition 1?default --audio-metadata 2?language=eng --audio-stream 2?:5.1(side) --audio-codec 2?aac --audio-bitrate 2?640k --audio-metadata 2?clear --audio-metadata 2?title="Surround 5.1" --audio-metadata 2?handler="Surround 5.1" --audio-disposition 2?unset --sub-copy 1,2,3,4,5,6,7 --sub-disposition 1?unset --sub-metadata 1?language='eng' --sub-disposition 2?unset --sub-metadata 2?language='fra' --sub-disposition 3?unset --sub-metadata 3?language='spa' --sub-disposition 4?unset --sub-metadata 4?language='fra' --sub-disposition 5?unset --sub-metadata 5?language='fra' --sub-disposition 6?unset --sub-metadata 6?language='spa' --sub-disposition 7?unset --sub-metadata 7?language='spa' -m default_mode:infer_no_subs -o "A:\Emby\Movies\Con Air\Con Air.mkv" 2024-08-13 09:41:49 Monolith fastflix-core[5972] INFO Set command priority to Normal 2024-08-13 09:41:49 Monolith fastflix-core[5972] INFO -------------------------------------------------------------------------------- 2024-08-13 09:41:49 Monolith fastflix-core[5972] INFO A:\Emby\Movies\Con Air\Con Air.mkv 2024-08-13 09:41:49 Monolith fastflix-core[5972] INFO -------------------------------------------------------------------------------- 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO avsw: error opening file "D:\Rips\ Con Air.mkv": No such file or directory 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO failed to initialize file reader(s). 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO Failed to open input file. 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO 2024-08-13 09:41:51 Monolith fastflix-core[5972] INFO Error detected while converting 2024-08-13 09:41:51 Monolith fastflix[9672] WARNING Reorder queue called while encoding 2024-08-13 09:41:51 Monolith fastflix[9672] DEBUG Updating queue from command worker: Response(status='error', video_uuid='f8a0a6f1-802a-460f-ab52-a83a59addd6a', command_uuid='7df32f25-a811-4011-bb17-9f7d194b3029') 2024-08-13 09:41:51 Monolith fastflix[9672] DEBUG System has been allowed to enter sleep mode again 2024-08-13 09:41:57 Monolith fastflix[9672] DEBUG System has been allowed to enter sleep mode again

cdgriffith commented 3 weeks ago

Okay hopefully this version will be much much louder console output, labeled DEBUG2 at https://github.com/cdgriffith/FastFlix/releases/tag/5.8.0b0

DJboutit commented 3 weeks ago

I have noticed the program will fail to convert if any characters are in the name of the video like any of these _ - @ #