RenderHeads / UnityPlugin-AVProMovieCapture

AVPro Movie Capture is a Unity Plugin for advanced video capture to AVI/MP4/MOV files
https://renderheads.com/products/avpro-movie-capture/
45 stars 8 forks source link

Crash on windows when creating simultaneous captures #187

Closed 54way closed 1 year ago

54way commented 1 year ago

Describe the bug

We have a surveillance system with 7 cameras in a game. When something occurs, the surveillance starts recording footage for that event. It's okay at first, but after 2 to 3 hours running, we start to get footages with size 0. And the log file appears "can't find moov or mdat chunks". When the error occurs, it can't recording any normal footage anymore, even if we use capture's inspector to menually press a "Start Capture" button in editor mode. In addition, after pressing "Start Capture", the preview on inspector doesn't present either.

Your Setup (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Create 7 "Capture From Camera"
  2. For each capture, start capturing and after few seconds stop it.
  3. Repeat step 2 frequently for few hours.

Logs can't find moov or mdat chunks

MorrisRH commented 1 year ago

Hey @54way, the "can't find moov or mdat chunks" will just be a side-effect of the capture failing elsewhere (it's output by the post-process script). Could you provide a full log for a capture that has failed to help identify what is going wrong?

54way commented 1 year ago

can't find moov or mdat chunks UnityEngine.Debug:LogError (object) RenderHeads.Media.AVProMovieCapture.MP4FileProcessing:Process (System.IO.Stream,System.IO.Stream) (at Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs:243) RenderHeads.Media.AVProMovieCapture.MP4FileProcessing:ProcessFile (string,string,RenderHeads.Media.AVProMovieCapture.MP4FileProcessing/Options) (at Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs:218) RenderHeads.Media.AVProMovieCapture.MP4FileProcessing:ProcessFile (string,bool,RenderHeads.Media.AVProMovieCapture.MP4FileProcessing/Options) (at Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs:185) RenderHeads.Media.AVProMovieCapture.MP4FileProcessing/<>c__DisplayClass32_0:b__0 () (at Assets/Plugins/RenderHeads/AVProMovieCapture/Runtime/Scripts/Internal/Mp4FileProcessing.cs:162) System.Threading.ThreadHelper:ThreadStart ()

54way commented 1 year ago

Screen Shot 2022-08-01 at 11 38 52 AM

woodrowproctor commented 1 year ago

I got this error when I had Use Wait For End Of Frame unchecked

Chris-RH commented 1 year ago

Thanks @woodrowproctor,

@54way, does that help you?

RichRH commented 1 year ago

We've also discovered an issue with the auto-filename generation - we're looking into a fix but the above error can be reproduced if we hammer creation of new videos within a second of eachother (you might be able to bypass with custom names/subfolders if so).

Cheers,

MorrisRH commented 1 year ago

The auto-filename generation issue has been fixed and will make it into the next release. This should hopefully resolve the crash you are seeing.

MorrisRH commented 1 year ago

Version 5.0.2 has just been released and includes a fix for this issue.