mirror of
https://github.com/smittix/intercept.git
synced 2026-07-07 09:08:12 -07:00
Flush ffmpeg audio stream packets
This commit is contained in:
+19
-14
@@ -424,20 +424,25 @@ def _start_audio_stream(frequency: float, modulation: str):
|
|||||||
# Ensure we use the found rx_fm path
|
# Ensure we use the found rx_fm path
|
||||||
sdr_cmd[0] = rx_fm_path
|
sdr_cmd[0] = rx_fm_path
|
||||||
|
|
||||||
encoder_cmd = [
|
encoder_cmd = [
|
||||||
ffmpeg_path,
|
ffmpeg_path,
|
||||||
'-hide_banner',
|
'-hide_banner',
|
||||||
'-loglevel', 'error',
|
'-loglevel', 'error',
|
||||||
'-f', 's16le',
|
'-fflags', 'nobuffer',
|
||||||
'-ar', str(resample_rate),
|
'-flags', 'low_delay',
|
||||||
'-ac', '1',
|
'-probesize', '32',
|
||||||
'-i', 'pipe:0',
|
'-analyzeduration', '0',
|
||||||
'-acodec', 'libmp3lame',
|
'-f', 's16le',
|
||||||
'-b:a', '128k',
|
'-ar', str(resample_rate),
|
||||||
'-ar', '44100',
|
'-ac', '1',
|
||||||
'-f', 'mp3',
|
'-i', 'pipe:0',
|
||||||
'pipe:1'
|
'-acodec', 'libmp3lame',
|
||||||
]
|
'-b:a', '128k',
|
||||||
|
'-ar', '44100',
|
||||||
|
'-f', 'mp3',
|
||||||
|
'-flush_packets', '1',
|
||||||
|
'pipe:1'
|
||||||
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Use shell pipe for reliable streaming
|
# Use shell pipe for reliable streaming
|
||||||
|
|||||||
Reference in New Issue
Block a user