KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
11.66k stars 1.21k forks source link

ISSUE: File Naming cause Error #107

Open AlonDan opened 2 months ago

AlonDan commented 2 months ago

While I'm testing (in order to give feedback) I found out that if the filename have "(" and ")" it will do the WHOLE process after pressing "Animate" but at the end it will NOT create the final result file.

This is an example for my test files after I converted it to mp4 via HandBrake: Talk - 001a - (HandBrake) Smile - 001a - (HandBrake) Angry - 001a - (HandBrake)

The Error: FileNotFoundError: [WinError 2] The system cannot find the file specified: 'animations/Talk - 001a_concat_with_audio.mp4' -> 'animations/Talk - 001a_concat.mp4'

Conclusion (for latest version): It seems like it didn't like SPACES either on the filenames (I didn't test ALL potential cases). So I've got rid of the (HandBrake) or just "(" and ")" and it worked fine 👍

Probably it will not accept other weird characters other than Number and English language, I'm not 100% sure.


The reason I had to convert was because the Gradio App won't accept .AVI and .MOV files in my current tests, but only .MP4 files, (no preview when drag & drop to Driving Video) I thought it will accept it because of FFMPEG, but it's not working.

I thought sharing this because either to let users know on the usage page or maybe it's something that can be fixed in the next version, Maybe it can be more "FORGIVING" with the file names by auto-rename converting them before process?

I'm not a programmer so I can't help much beside of share my tests and feedback, I hope it helps a bit.

Another suggestion: (low priority) It will be nice to have on the Gradio App a suffix / prefix option for rename the latest file so we can track same test files with different rename, even automatic version numbering 001, 002, 003 etc.. at the end of the file will be nice. this is obviously low priority but just a suggestion for making testing easier for sake of future feedback of course.

cleardusk commented 2 months ago

Thanks for your report!

I have pushed a fix commit, could you pull it and try it again : ) @AlonDan

AlonDan commented 2 months ago

@cleardusk thanks for the quick fix! 👍 I did a quick test, it seems to work now, I can't tell if in all cases of weird characters such as other languages but it does respect the "(" from my first test.

AlonDan commented 2 months ago

Just an update: I've tried file name with Hebrew language in it and it failed, it shows this error:

cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

I wonder if there will be a fix to accept most languages. For now, I recommend to rename anything to simple English and/or numbers to keep it simple.

zzzweakman commented 1 month ago

We aim to keep the code as simple and readable as possible. Perhaps changing the file names to simple English words and/or numbers would be better :) @AlonDan