RenderHeads/UnityPlugin-AVProMovieCapture

[Bug] Enabling "UseMotionBlur" corrupts exported video when capture mode is Offline Render and render pipeline is URP

ertan-retinize opened this issue · 2 comments

Unity Version

2021.3.13

AVPro Movie Capture Version

4.7.11

Which platform(s) are you using?

Windows

Which OS version(s) are you using?

Windows 10.0.22631 Build 22631

Which rendering API(s) are you using?

Direct3D 11

Hardware

No response

Which capture component are you using?

Capture From Screen

Capture mode

Offline

Which output mode are you using?

Video file

Video codecs

H264

Audio source

Manual

Audio codecs

AAC

Any other component configuration

image

image

image

The issue

Enabling "Use Motion Blur" on CaptureFromCamera component with "Offline Render" mode corrupts the output video file. It exports just fine if I either set motion blur bool to false or set render mode to realtime.. in my case using realtime render is not acceptable so I'd like to proceed with offline render and enable motion blur if possible.

Unity version: 2021.3.13
AVPro Video version (number and edition (trial/core/ultra/enterprise)): 4.7.11
Operating system version: Windows 10.0.22631 Build 22631
Device model:
Video specs (resolution, frame-rate, codec, file size): any resolution, 60FPS, H264

To Reproduce

Import URP and create and assign a render pipeline to your graphics settings.
create a default renderer and assign it to your camera
Set the render mode to "offline render"
Enable motion blur
Capture something for a few seconds via "CaptureFromCamera"
Once capture is stopped it'll throw an error into the console

Log output

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 ()

Some extra notes I've just discovered:
If I disable "streamable audio" it doesn't throw the exception I've mentioned above but the output video is still comes as corrupted.
image

Hi @Chris-RH
Could you please have a look at this issue whenever you're available ? I'd love to know if there's any workaround or even better... a hotfix ?