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/
48 stars 8 forks source link

[Bug]Video corruption #404

Closed JiajunJiang closed 2 months ago

JiajunJiang commented 3 months ago

Unity Version

2023.2.13f1

AVPro Movie Capture Version

5.2.4

Which platform(s) are you using?

iOS

Which OS version(s) are you using?

IOS 17.5.1

Which rendering API(s) are you using?

No response

Hardware

No response

Which capture component are you using?

Capture From Texture

Capture mode

Realtime

Which output mode are you using?

Video file

Video codecs

H264

Audio source

None

Audio codecs

AAC

Any other component configuration

No response

The issue

I recorded the video using a microphone and then played it back through unity's videoplayer, but there was a 5% chance it wouldn't play.

Log output

AVFoundationVideoMedia error while reading unityvfs:///var/mobile/Containers/Data/Application/5EB05770-EE89-4D6D-80BA-E6BC4B5E55A6/Library/Caches/Captures/MovieCapture_2024-06-24_01-25-16_1172x2532.mp4
Context: GetNextSampleBuffer (reader failure)
Error details: NSError code: -11880
domain: AVFoundationErrorDomain
desc: Invalid sample cursor
reason: Sample cursor was invalid, or samples were out of range.
JiajunJiang commented 3 months ago

🔹 Stopping capture... 🟩 Video capture finished. 🟩 Audio capture finished. 🔹 Stopped, writing file... 🔹 Finished writing 🟩 deallocating instance <MCVideoRecorder: 0x11f317fc0> 🟩 deallocating instance <MCVideoCaptureMetal: 0x300643720> 🟩 deallocating instance <MCAssetWriterInputPixelBufferAdaptorVideoCaptureOutput: 0x300917120>

AVFoundationVideoMedia error while reading unityvfs:///var/mobile/Containers/Data/Application/260BA162-0839-4C96-8BAD-1CBA932C49A0/Library/Caches/Captures/MovieCapture_2024-06-24_02-09-28_1172x2532.mp4 Context: GetNextSampleBuffer (reader failure) Error details: NSError code: -11880 domain: AVFoundationErrorDomain desc: Invalid sample cursor reason: Sample cursor was invalid, or samples were out of range.

Add a log

Chris-RH commented 3 months ago

Is it reproducible using a new project and only the AVPro Movie Capture demo scenes? Does it still occur if you record without audio?

JiajunJiang commented 3 months ago

I tried recording only Unity sound and no sound without problems, but I had problems recording microphone sound.

MorrisRH commented 3 months ago

Can you provide the captured video?

Chris-RH commented 3 months ago

Are you able to provide us a copy of the captured video, either here or to unitysupport@renderheads.com

Chris-RH commented 2 months ago

Are you able to provide us a copy of the captured video, either here or to unitysupport@renderheads.com

MorrisRH commented 2 months ago

Unable to reproduce this using: