-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen recording as video, audio on SharpAvi - Audio not recording #33
Comments
I know this is old, but I'm stuck at the same place with this. @Gopichandar, did you even get your solution working? |
Just to follow up on this, I believe the issue is using the JPEG Motion format which might not allow embedding of audio. I tried switching to DivX format but SharpAVI kept throwing an exception I didn't have that codec (even though DivX is installed on my system). In the end, I decided to switch to recording the sections separately and then recombining with ffmpeg. If anyone found a way around this, let me know! I'd much rather stream into on file then saving and using ffmpeg to recombine. |
I doing the same thing and I get part of the sound, but it is in extremely bad quality, too many silent pieces: like I'm saying 1-2-3-4-5-6, 1 can go properly, then start of the 2, then silence or some noise and then I get the end of three and no 4-5-6 at all. |
As I found out, in my case adding new frame took 0.2-0.3 seconds, when I set frame rate to 10. So I was getting a new frame data longer than I tried to write it. After I optimized my code that creates a new frame, I was able to get clear sound inside recorded avi file |
What has been achieved:
I have successfully integrated that with the sample provided and I'm trying to capture the audio through NAudio with SharpAPI video stream for the video to record along with audio implementation.
Issue:
Whatever I write the audio stream in SharpAvi video. On output, It was recorded only with video and audio is empty.
Checking audio alone to make sure:
But When I try capture the audio as separate file called "output.wav" and It was recorded with audio as expected and can able to hear the recorded audio. So, I'm concluding for now that the issue is only on integration with video via SharpApi
writterx = new WaveFileWriter("Out.wav", audioSource.WaveFormat);
Full code to reproduce the issue:
https://drive.google.com/open?id=1H7Ziy_yrs37hdpYriWRF-nuRmmFbsfe-
Code glimpse from Recorder.cs
NAudio Initialization:
Capturing audio bytes and write it on SharpAvi Audio Stream:
Can you please suggest a Solution
Asked the same in SO
https://stackoverflow.com/questions/60238492/screen-recording-as-video-audio-on-sharpavi-audio-not-recording?noredirect=1
The text was updated successfully, but these errors were encountered: