From 976938b7585e02318da153fcae4d385776f61bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Thu, 31 May 2018 15:05:58 +0200 Subject: [PATCH] setInputDevice was never called --- src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp index 58f99a9c..0a0eea60 100644 --- a/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp +++ b/src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp @@ -369,6 +369,8 @@ bool UBFFmpegVideoEncoder::init() connect(mAudioInput, SIGNAL(dataAvailable(QByteArray)), this, SLOT(onAudioAvailable(QByteArray))); + mAudioInput->setInputDevice(audioRecordingDevice()); + if (!mAudioInput->init()) { setLastErrorMessage("Couldn't initialize audio input"); return false; @@ -397,6 +399,9 @@ bool UBFFmpegVideoEncoder::init() c->channel_layout = AV_CH_LAYOUT_STEREO; c->channels = av_get_channel_layout_nb_channels(c->channel_layout); + //deprecated on ffmpeg 4 + c->strict_std_compliance = -2;// Enable use of experimental codec + //https://trac.ffmpeg.org/wiki/Encode/H.264#Profile //Omit this unless your target device only supports a certain profile //(see https://trac.ffmpeg.org/wiki/Encode/H.264#Compatibility).