audio-capture

iPhone AVCaptureDeviceInput How to Set Quality of Audio Capture?

橙三吉。 提交于 2019-12-01 01:09:22
The following code is working fine (some checking and code eliminated) at 44100 depth 2 which seems to be the default. Since this interface is usable, but not documented well, anyone know of how to change the default quality? audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; captureSession = [[AVCaptureSession alloc] init]; audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioCaptureDevice error:&error]; [captureSession addInput:audioInput]; audioOutput = [[AVCaptureAudioDataOutput alloc] init]; [audioOutput setSampleBufferDelegate:self queue:dispatch

How to read video file in python with audio stream on Linux?

微笑、不失礼 提交于 2019-11-28 12:48:28
问题 I'm looking an approach how to extract video frames and corresponding audio segments from a video file using python. I know well about opencv. But it allows just to extract video frames. No audio provided. I need both - video frames and audio segments which exactly correspond to each other. Will be very thankful for any hints :) 回答1: Finally, I found moviepy https://pypi.python.org/pypi/moviepy which implements light wrapper for ffmpeg and provides interface to quickly obtain video and audio