c# - expression encoder - does not capture system audio -
i'm trying capture webcam , system audio using expression encoder, webcam works fine system audio silent.
i followed tutorial here: codeproject expression encoder tutorial isn't working me properly.
when list audio devices, "speakers...", "microphone..." , "headphones..." listed (as in playback devices in system tray) if try , record either speakers or headphones nothing (i mic audio fine if select one).
here code i'm using:
job = new livejob(); livedevicesource lds = job.adddevicesource(ledv[0], leda[1]); filearchivepublishformat fileout = new filearchivepublishformat(); fileout.outputfilename = string.format("c:\\users\\user1\\desktop\\testvideo-{0:yyyymmdd_hhmmss}.wmv", datetime.now); job.publishformats.add(fileout); lds.previewwindow = new previewwindow(new system.runtime.interopservices.handleref(panel1, panel1.handle)); job.startencoding(); job.activatesource(lds);
does have idea why doesn't record system audio? there other settings need mess before should work?
thanks time.
edit:
i decided print out job.currentaudiovolume when encoding see if ever changed sits @ 0. if change audio device microphone, value goes when there sound (as expected). looks sdk unable record system audio (either speakers or headphones).
okay sorted out bit of colleague.
basically headphones/speakers etc. output devices , need install loopback driver input device.
there's free 1 on sourceforge/github works great. select audio device.
there 1 small problem, i've got "record"/"stop" button calls job.stopencoding(); loopback audio driver chosen stopencoding() hangs window, guess because loopback driver doesn't stopped properly, if call job.removedevicesource(devicesource); after call stopencoding() , re-add before next startencoding() works fine.
Comments
Post a Comment