Open cygnus2k opened 8 years ago
Hello, do you mean encoding to mp3, or smth else?
only record mp3. thanks
El 24/11/15 a las 17:02, Kirill Bukaev escribió:
Hello, do you mean
encoding to mp3, or smth else?
—
Reply to this email directly or view
it on GitHub.
This should work. Also you can look at CameraExample.
AudioGrabber *audioGrabber = new AudioGrabber;
AudioFormat format;
format.setChannelCount(2);
format.setSampleRate(44100);
format.setFormat(AudioFormat::SignedInt16);
audioGrabber->setFormat(format);
audioGrabber->setDeviceIndex(0);
Recorder *recorder = new Recorder;
recorder->setAudioGrabber(audioGrabber);
AudioCodecSettings settings;
settings.setSampleRate(audioGrabber->format().sampleRate());
settings.setChannelCount(audioGrabber->format().channelCount());
settings.setSampleFormat(EncoderGlobal::Signed16);
recorder->encoder()->setAudioCodecSettings(settings);
recorder->encoder()->setAudioCodec(EncoderGlobal::MP3);
recorder->encoder()->setFilePath("C:/audio.mp3");
recorder->start();
Thanks, I'll try
El 24/11/15 a las 17:26, Kirill Bukaev escribió:
This should work.
Also you can look at CameraExample.
AudioGrabber *audioGrabber = new AudioGrabber;
AudioFormat format; format.setChannelCount(2); format.setSampleRate(44100); format.setFormat(AudioFormat::SignedInt16);
audioGrabber->setFormat(format); audioGrabber->setDeviceIndex(0);
Recorder *recorder = new Recorder; recorder->setAudioGrabber(audioGrabber);
AudioCodecSettings settings; settings.setSampleRate(m_audioGrabber->format().sampleRate()); settings.setChannelCount(m_audioGrabber->format().channelCount()); settings.setSampleFormat(EncoderGlobal::Signed16);
recorder->encoder()->setAudioCodecSettings(audioCodecSettings()); recorder->encoder()->setAudioCodec(EncoderGlobal::MP3); recorder->encoder()->setFilePath("C:/audio.mp3"); recorder->start();
—
Reply to this email directly or view
it on GitHub.
Hi, the program crash on init m_audioGrabber init
2015-11-24 17:43 GMT-03:00 roberto cygnus2k@gmail.com:
Thanks, I'll try El 24/11/15 a las 17:26, Kirill Bukaev escribió:
This should work. Also you can look at CameraExample.
AudioGrabber *audioGrabber = new AudioGrabber;
AudioFormat format; format.setChannelCount(2); format.setSampleRate(44100); format.setFormat(AudioFormat::SignedInt16);
audioGrabber->setFormat(format); audioGrabber->setDeviceIndex(0);
Recorder *recorder = new Recorder; recorder->setAudioGrabber(audioGrabber);
AudioCodecSettings settings; settings.setSampleRate(m_audioGrabber->format().sampleRate()); settings.setChannelCount(m_audioGrabber->format().channelCount()); settings.setSampleFormat(EncoderGlobal::Signed16);
recorder->encoder()->setAudioCodecSettings(audioCodecSettings()); recorder->encoder()->setAudioCodec(EncoderGlobal::MP3); recorder->encoder()->setFilePath("C:/audio.mp3"); recorder->start();
— Reply to this email directly or view it on GitHub https://github.com/kibsoft/QtMEL/issues/35#issuecomment-159395525.
What do you mean by "init"? Where is it? Inside Recorder?
in the mainwindow.cpp empty template:
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
AudioGrabber *m_audioGrabber = new AudioGrabber;
Tanks
2015-11-30 19:05 GMT-03:00 Kirill Bukaev notifications@github.com:
What do you mean by "init"? Where is it? Inside Recorder?
— Reply to this email directly or view it on GitHub https://github.com/kibsoft/QtMEL/issues/35#issuecomment-160776704.
Hi, thanks for this library. But how record audio only? Thanks