Unity-FFmpeg-ScreenRecorder icon indicating copy to clipboard operation
Unity-FFmpeg-ScreenRecorder copied to clipboard

Screenrecorder Error

Open justinLifelike opened this issue 1 year ago • 9 comments

Dear shinn716,

I have come across an error when trying out the screen recorder, after successfully starting it, I click on stop recording and I get this error thrown at me. No recording to be found in the output folder. The framerecorder works fine though it is only the screen recorder.

IOException: Win32 IO returned 232. Path: C:\Users\hidden\Downloads\Unity-FFmpeg-ScreenRecorder-main\Unity-FFmpeg-ScreenRecorder-main\[Unknown] System.IO.FileStream.WriteInternal (System.Byte[] src, System.Int32 offset, System.Int32 count) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.FileStream.Write (System.Byte[] array, System.Int32 offset, System.Int32 count) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.StreamWriter.Write (System.Char[] buffer, System.Int32 index, System.Int32 count) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.IO.TextWriter.WriteLine (System.String value) (at <695d1cc93cca45069c528c15c9fdd749>:0) FFScreenRecorder+<StopRecording>d__22.MoveNext () (at Library/PackageCache/com.shinn.ffrecorder@d4982aea1f/Runtime/Scripts/FFScreenRecorder.cs:131) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <695d1cc93cca45069c528c15c9fdd749>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <4bcedc9a246b4760a8e17893e2d5b057>:0) UnityEngine.UnitySynchronizationContext:ExecuteTasks()

Screenshot 2023-03-07 101624

justinLifelike avatar Mar 07 '23 09:03 justinLifelike

image

justinLifelike avatar Mar 07 '23 10:03 justinLifelike

You need to set 'Audio input' because there are different audio drivers in the devices. image

Right click on 'Screen Recorder' and select 'GetDevicesList' in editor mode. image

Like this, it shows four audio devices in my computer. image

In my case, I'll copy '麥克風排列 (2- Realtek(R) Audio)' to audio input. Otherwise, need check Output folder name. image

shinn716 avatar Mar 08 '23 01:03 shinn716

Hi!

Thanks for the quick reply! If I search for devices I get an error too! So I tried to manually input my microphone, but no success either.

image image

justinLifelike avatar Mar 08 '23 09:03 justinLifelike

Thanks again for helping!

It seems that the frame recorder can do what I need but for one reason or another it keeps the frames in the FFtemp folder and doesnt make a video out of it. Do you know what I can do about this problem? Thanks in advance image image

justinLifelike avatar Mar 08 '23 10:03 justinLifelike

m.. I think using ScreenRecorder is the most suitable method. This is the file structure of my project. You can download this clean project from Google Drive, and then change the audio input on your PC.

Snipaste_2023-03-09_09-08-03

I think a project name with space, can cause errors in ffmpeg export. image

shinn716 avatar Mar 09 '23 01:03 shinn716

Other method: https://github.com/keijiro/FFmpegOut But FFmpegOut cannot specify the output path.

shinn716 avatar Mar 09 '23 01:03 shinn716

Hi Shinn, Hope you are well. I am facing same problem when I click stop recording I got this :

IOException: Win32 IO returned 232. Path: D:\UnityProject\AzureOpenAI[Unknown] System.IO.FileStream.WriteInternal (System.Byte[] src, System.Int32 offset, System.Int32 count) (at :0) System.IO.FileStream.Write (System.Byte[] array, System.Int32 offset, System.Int32 count) (at :0) System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) (at :0) System.IO.StreamWriter.WriteSpan (System.ReadOnlySpan`1[T] buffer, System.Boolean appendNewLine) (at

SazzadKhan-UnityDev avatar Dec 21 '23 14:12 SazzadKhan-UnityDev

The Google drive link is not working. can you reupload the project. It wound be a great help. Thanks in advance.

SazzadKhan-UnityDev avatar Dec 21 '23 14:12 SazzadKhan-UnityDev

Found the problem. I chose different audio device and it works. thanks for the amazing work

SazzadKhan-UnityDev avatar Dec 21 '23 14:12 SazzadKhan-UnityDev