-
Notifications
You must be signed in to change notification settings - Fork 2k
How to save Video (from webcam) and Audio (from directsound device) in avi file ? #1040
Comments
Hi,yoannwyffels |
Hi hbtech-ai, Yes and No...I've finally record video and audio separatly, and then merge them at the end of recording with ffmpeg.exe (and eventually do some more compression with it). |
Hi,yoannwyffels |
Correct. |
Hi,yoannwyffels, |
You have to write video frames with frameOffset informations (how many times the frame is). You just have to use a timespan to do this in your c# code.
For what I remember, some compression codecs aren't working well.
and here is the ffmpeg command line I use to merge (using copy method, no compression):
I hope it will help you well :) |
Thanks for your help.I will test it soon. |
Did anyone get this to work? |
@yoannwyffels Hello Yoan Would you please send me the full code please at : mehdi_boudnaoui@hotmail.fr, i'm struggling with the audio part. |
hey |
@yoannwyffels Would you please send me the full code please at : ganxunzou@163.com . |
What would you like to submit? (put an 'x' inside the bracket that applies)
Issue description
Hello,
I'm trying to accomplish something easy as first sight: recording video and audio (from webcam) in an avi file. It appears more complex that it seems :)
So far, I handle video frames nicely (I think) with this frame handler:
and Audio data is stored in a memory stream / WaveEncoder in the audio new frame event handler:
So now, I don't understand how to transform audio memory stream (or WaveEncoder ?) into Signal object needed to new method writted by @cesarsouza :
_writer.WriteAudioFrame(Signal signal)
and how to synchronise video and audio. I suspect we need to get same amount of audio and video frames according to the samplerate.
Do you have any exemple how to do that ?
Many thanks
The text was updated successfully, but these errors were encountered: