Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Failing Errors #20

Open
badbud65 opened this issue Jul 4, 2020 · 5 comments
Open

Script Failing Errors #20

badbud65 opened this issue Jul 4, 2020 · 5 comments

Comments

@badbud65
Copy link

badbud65 commented Jul 4, 2020

This behaviour is quite odd as sometimes I get the errors and sometimes I don't

I get these errors when the script starts: these are always shown whether the script fails or not, so probably ain't a problem but better to mention them than not.
CMD_Line_Errors

This is the error I get when the render has finished:
Render_End_Error

The script does create the Directories mentioned in the errors above, so I don't know why this happens.

NOTE: The script is on my D drive with FFMPEG. Blender is in it's default directory on the C Drive

This is my script:
video_editors_render_script.zip

Script Setup:
Video_Script_Setup

Also all of my Blender rendering settings are exactly the same as yours as per this video.
https://www.youtube.com/watch?v=qDOGFxMJoxw&list=PLjyuVPBuorqJb1AwUu-wh61cLWMBVWS3N&index=2&t=0s

If there's anything else you need just let me know.

Great tool, when it works. The most annoying thing is that it worked perfectly fine for the first 5 times I tried it, even on one that took 18 hrs to finish.

@mikeycal
Copy link
Owner

mikeycal commented Jul 4, 2020

The first audio issue seems to be innocuous. It has been posting that error to screen since 2.83.

The second issue that you're having may be related to the blend file settings. Generally when the an error only happens occasionally, it's something to do with a setting that did not get set correctly in the initial save to the blend files. This kind of problem happens sometimes when you have saved a blend file in a previous version of blender and then rendered it with a newer version of blender.

one of the things about blender that keeps you on your toes when you're writing scripts is that they often will change API calls out of nowhere.

Thanks for all of the info, I will definitely take another look at the code.

@badbud65
Copy link
Author

Thanks for the quick response, I believe I've figured out what's going on, just not the absolute cause. It's not your script, it's Blender itself.

I saved my .blend files, and sometimes when I go back to edit the file it's unusable. No video, just sound. no video or sound. Has video, no sound as it jumps for 1 FPS to 60 FPS, again unusable. I even did a quick test after saving a file it worked fine, then I rebooted my machine loaded the .blend file and it was unusable. I've obviously wasted hours. But even that's not consistent. I've shut down blender, not rebooted the PC, opened it up again loaded the .blend file and it's buggered and unusable.

These files I've not even used to render with yet. I only started using Blender a week or so ago, so I don't understand what the hell is going on. But I expect to be able to save a .blend file and come back to it later to pick up where I left off. But it's inconsistent. The only time it works consistently is when I save the 1.blend file, no rebooting or restarting blender and then let the script run. I can shut down Blender then. But as per above when I reload the 1.bend file it's 90% of the time corrupted.

@mikeycal
Copy link
Owner

I noticed that you are running the script from a secondary drive [ D: ]. I suspect that there is an issue with mounting of the drive. Is your D drive USB? Are any of the drives that you are using to import video USB? Importing video directly from the USB drive may be the problem.

As a test, create a project that is only adding files that are located on the C drive. Save it and reboot your computer to see if project is still intact.

@badbud65
Copy link
Author

badbud65 commented Jul 12, 2020

Hi

Firstly your assistance is greatly appreciated, I know you're not Tech Support, and as such as it doesn't work consistently for me, that's my problem not yours.

My D: Drive is an SSD not a USB.

I can't run the script on my C: Drive as it's 256GB .M2 card for my system, and rendering 1+ hour videos uses a tonne of cache so that's on my E: HDD which is 4TB's.

I've put everything on my E: Drive now. Except FFMPEG & Blender (which are on my C: Drive) and as above for my original issue the script still fails with one of the two errors. I either get both errors as shown in the screenshot or one error for \Joined_video.mp4.

Blender isn't now buggering up .Blend files, that was me being way to diligent about removing old files, I now know which to delete and which to leave alone. But this has lead onto and interesting work around.

FIRST RENDER ERROR

First Render Errors

SECOND RENDER

Which I started immediately after the above failure, worked fine. Scratches head.
Second Render Worked

THIRD RENDER

Worked fine, but took significantly less time than the 2nd Render above of 4m2s. This One took 1m50s Huh?
Third Render Took Less Time

FOURTH RENDER

I assume the 3rd Render was quicker because of the Cache. So I Deleted 1.blend folder from Blender Disk Cache folder. Ran the script again. This time it failed as per FIRST RENDER above.

FIFTH RENDER

This time I left the cached files intact, which I had done with the 2nd & 3rd renders above. This time the render worked and completed in almost exactly the same time as the 2nd Render.

Just for clarity in all instances the script deletes the Script_Working_Folder. I also deleted the video that is created once the render is completed.

SIXTH RENDER

Again this worked within the same time period as the 3rd Render above. 👍

So it looks like something gets written into the cache during the 1st attempt and for some reasons it's corrupted.

SEVENTH RENDER

This time I cleared the cache, and let the script run for a minute then manually quit it. Then restarted the Render once again leaving whatever was cached intact. I also deleted the Script_Working_Folder as this doesn't get deleted when you quit the script, which is as expected really. Then let the script run to completion.

EIGHTH RENDER

And as expected this Render worked. So it looks like I may have a work around. 👍 🥇

  1. Start the script
  2. Kill it after 1 minute
  3. Leave cache intact
  4. Run script again
  5. Works.

So something odd is happening on the first pass with the cache.

I need to try it on a longer file, which I'm kicking of now and this takes at least 10 hours.

END OF TESTING FOR NOW

If there's anything else you would like me to test, just let me know. Also, would it be useful if I could record the whole log, for the above fails and successes? If so what command do I need to run the script with to create a log file?

@mikeycal
Copy link
Owner

This behavior is very odd. I know that in blender 2.83.3 they implemented a new VSE DISK CACHE system that is configurable in the preferences. You can now turn it on and off. Try turning it off and seeing if that solves your problem. [ Edit -> Preferences -> System -> Use Disk Cache ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants