shinn716 / Unity-FFmpeg-ScreenRecorder

Capture screen and audio (virtual audio and microphone)
MIT License
34 stars 7 forks source link

Screenrecorder Error #4

Open justinLifelike opened 1 year ago

justinLifelike commented 1 year ago

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 commented 1 year ago

image

shinn716 commented 1 year ago

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

justinLifelike commented 1 year ago

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 commented 1 year ago

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

shinn716 commented 1 year ago

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 commented 1 year ago

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

SazzadKhan-UnityDev commented 10 months ago

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 commented 10 months ago

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

SazzadKhan-UnityDev commented 10 months ago

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