Open yarus opened 6 years ago
Hey guys, its been a month already since I started this thread. Any updates?
Hi, I have the same issue. While I record without timespan in WriteVideoFrame recording goes well. But if I add TimeSpan WriteAudioFrame crashes with 'Protected Memory' exception. Without TimeSpan video captures without synchronisation, framerate floats. I tryed to store Signals in a collection, and write them afterwards, but when I add TimeSpan to WriteAudioFrame it also crashes an exception, that it couldn't write audiostream.
Any sudgestions?
Same issue producable on my side, writing with TimeSpan is necessary, but than the AccessViolation occurs. But I can avoid the problem by synchronising my threads with a lock() Also it looks like the Video/Audio settings, using with VideoWriter, makes any difference. I have no problem with following settings: VideoCodec = Mpeg4; AudioCodec = Aac. Or VideoCodec = Wmv1 and AudioCodec = WmaV1. As fileextension I use mp4/wmv.
Hey, germinton,
As you can see, i use lock when writing to audio stream same as when writing to video stream. Did i missed something?
Ok, it only works without TimeStamp on my side. And when using without TimeStamp, the audio soundtrack is sometimes messy. My consolusion: VideoFileWriter with Audio is not usable/working correctly in any case!
I'm actually trying to record video and audio as separate files, and merge them after recording. But I have no idea to do that, because it seem so, that videofilewriter crashes here too!
My consolusion: VideoFileWriter with Audio is not usable/working correctly in any case! @germinton I think so.
Same issue here, except I can't get audio writing to work at all. If I don't specify a codec, no audio is written and the video is silent, and if I do, it causes an Access Violation.
Still getting memory violation
Yes
Thanks,
Christopher CTO Capture Technologies 973.890.7600 x125 capturetechnologies.com
From: edgar-mtz-e notifications@github.com Sent: Thursday, August 15, 2019 4:56:57 PM To: accord-net/framework framework@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [accord-net/framework] VideoFileWriter WriteAudioFrame AccessViolationException (#1428)
Still getting memory violation
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/accord-net/framework/issues/1428?email_source=notifications&email_token=AMOVCEZO6KFHJYOJIDCYNZDQEW7JTA5CNFSM4FGIZOK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4M7H5I#issuecomment-521794549, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMOVCE3ZQ4C6A5YKORHP4YLQEW7JTANCNFSM4FGIZOKQ.
Confidentiality Warning: This e-mail contains information intended only for the use of the individual or entity named above. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, any dissemination, publication or copying of this e-mail is strictly prohibited. The sender does not accept any responsibility for any loss, disruption or damage to your data or computer system that may occur while using data contained in, or transmitted with, this e-mail. If you have received this e-mail in error, please immediately notify us by return e-mail. Thank you.
Has someone found a solution? I have stumbled upon same issue and I'm out of ideas now. Video recording works just fine, but when I add audio results in access violation.
try
start:
videoSource.NewFrame +=
stop:
videoSource.NewFrame -=
I am having the same problem. with the similar source code. Could any of you solve this problem? If I write video frames with timespan, then writing audio frames throws this exception. otherwise video is recorded very well.
Please help if somebody solved this puzzle.
Hi all, I am trying to record video from my webcam and add audio from my speaker to this video during recording. I used Screen Capture sample as a base for my code. The difference is that i need to write video file directly from my camera and not from desktop. So i used VideoCaptureDevice with camera GUID and NewFrame event handler to write video frames. For audio frames - i do the same thing like in sample app - using NewFrame event handler from mixer to write Signal with videoWriter.
The video part works well, but audio recording failing after some time with the following exception: System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
I am not sure how to properly initialize AudioDevice and Mixer with things like FrameSize, BitRate.
Could you guys please help to figure this out?
I see the following logs in console:
Time when this happens is different. Sometimes app can record 1-2 minutes, but sometimes not more than 15 seconds.
The code where error happening is the following:
Audio initializes: