mirror of
https://github.com/BlackLight/micstream.git
synced 2024-12-26 18:45:11 +01:00
Update audio.py
For those of you who have a mono (1 channel) mic, the '-ac' flag should be entered strictly before the '-i device'; if that flag is set after the device declaration, then the setting will apply for the output (as per the man page for ffmepg command). Hope this helps.
This commit is contained in:
parent
4420740c66
commit
be40c0c1d8
1 changed files with 12 additions and 0 deletions
|
@ -28,6 +28,18 @@ class AudioSource:
|
||||||
'-b:a', str(bitrate) + 'k', '-ac', str(channels), '-ar', str(sample_rate),
|
'-b:a', str(bitrate) + 'k', '-ac', str(channels), '-ar', str(sample_rate),
|
||||||
'-f', 'mp3', '-')
|
'-f', 'mp3', '-')
|
||||||
|
|
||||||
|
# For those of you who have a mono (1 channel) mic, the '-ac' flag should be entered strictly
|
||||||
|
# before the '-i device'; if that flag is set after the device declaration, then the setting
|
||||||
|
# will apply for the output (as per the man page for ffmepg command). Hope this helps.
|
||||||
|
# Ultimatelly, it will look like this:
|
||||||
|
#
|
||||||
|
# self.ffmpeg_args = (
|
||||||
|
# ffmpeg_bin, '-f', audio_system, '-ac', '1', '-i', device, '-vn', '-acodec', 'libmp3lame',
|
||||||
|
# '-b:a', str(bitrate) + 'k', '-ac', str(channels), '-ar', str(sample_rate),
|
||||||
|
# '-f', 'mp3', '-')
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
self._ffmpeg_start_time = None
|
self._ffmpeg_start_time = None
|
||||||
self._first_sample_time = None
|
self._first_sample_time = None
|
||||||
self.latency = 0.
|
self.latency = 0.
|
||||||
|
|
Loading…
Reference in a new issue