elmopl / ktba

Blender addons
MIT License
56 stars 12 forks source link

Parallel Render Error #6

Closed tin2tin closed 6 years ago

tin2tin commented 6 years ago

I'm getting this error on Win 8: https://preview.ibb.co/dGYYee/ffmpeg_error.png

elmopl commented 6 years ago

image

The best guess I have is that it looks like it fails to create a temporary file due to lack of permissions. Can you create files in the same directory as the .blend file you're working with? (as that is directory in which my script attempts to create a temporary file - it has to be same directory for all the relative paths in it to work the same).

Are you trying to render a file from a read-only directory by any chance?

tin2tin commented 6 years ago

I haven't saved a .blend file - doing so - makes it work. So maybe a check, if the project has been saved before running the export, could avoid this error?

Here it sounds like the audio is "jumping" a bit in the resulting file. Is it playing normally for you?

Anyway, I really like your script - maybe you could post about it in the FB VSE group? https://www.facebook.com/groups/1981104845289453/

tin2tin commented 6 years ago

Well, now it seems like there is a permission problem again. Maybe it is better to create a temp folder in Documents and then delete it again after a successful export?

elmopl commented 6 years ago

Unfortunately that does not work if you have relative paths in your project (as they will not work if I put file somewhere else).

I will have a think what to do about it.

I save temporary file to include in render any unsaved changes in your project. I think I could check if everything is saved and use file directly without creating a temporary one.

tin2tin commented 6 years ago

It does render for a while, but now I get a different error: image The last words says "access denied".

tin2tin commented 6 years ago

Ah, notice the path to ffmpeg.exe in the ffmpeg command line. The executable is missing, but when entering the path, no error is detected(only if it is a bad file). So it needs to check for ffmpeg.exe. Adding it will render and finish successfully. Sound is also ok.

Maybe the preferences need to check for the executable and maybe add a button for the fileselector to the executable?

And maybe it would be nice clean up all the temp files, when finished, so when having concatenating enabled, it will result in in one file only?

Does the paths in the command line need to be within chr(34), so spaces in the path does not cause errors?

elmopl commented 6 years ago

I fixed the fist issue of not noticing that provided path is not actual executable.

I will probably look into making the cleaning up part an option too.

tin2tin commented 6 years ago

Great. You probably already know this, here's a bit on checking if the .blend project is saved(if it isn't, it will cause an error as mentioned above): https://blender.stackexchange.com/questions/58711/python-check-if-file-was-saved