You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application where I read a video file with ofVideoPlayer (presumably AVFoundation), apply effects to it, and write each frame to ofxVideoRecorder. However, I'm having difficulty figuring out how exactly to pipe in the audio. I read the example source code, but that's getting it from a device and not from the videoplayer and I'm not sure how to bridge that gap.
Where I am currently is getting a segfault when I close and not recording any audio, despite my audio event handler being called. I'm doing the following:
recorder_.setVideoCodec("mjpeg");
recorder_.setVideoBitrate("2500k");
recorder_.setAudioCodec("mp3");
recorder_.setAudioBitrate("192k");
recorder_.setup("out-" + ofGetTimestampString() + ".mov", video_->getWidth(), video_->getHeight(), 60);
recorder_.start();
// int nOutputChannels, int nInputChannels, ofBaseApp *appPtr, int sampleRate, int bufferSize, int nBuffers
ofSoundStreamSetup(2, 0, this, 44100, 256, 4);
void ofApp::audioReceived(float *input, int bufferSize, int nChannels){
if (recording_) {
recorder_.addAudioSamples(input, bufferSize, nChannels);
}
}
I have an application where I read a video file with ofVideoPlayer (presumably AVFoundation), apply effects to it, and write each frame to ofxVideoRecorder. However, I'm having difficulty figuring out how exactly to pipe in the audio. I read the example source code, but that's getting it from a device and not from the videoplayer and I'm not sure how to bridge that gap.
Where I am currently is getting a segfault when I close and not recording any audio, despite my audio event handler being called. I'm doing the following:
But receive the following error and a segfault:
I assume there is something that I'm doing wrong. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: