tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 1068169aa231ab0013fcfd31ebb6f51b5e3ce0ef
parent c2812eb46b674487ab008d6c0fb3b2d89641e837
Author: rbckman <rob@tarina.org>
Date:   Fri, 21 Jan 2022 19:20:30 +0000

better sound sync when streaming

Diffstat:
Mtarina.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tarina.py b/tarina.py @@ -2990,7 +2990,7 @@ def startstream(camera, stream, plughw, channels): #print('using key: ' + key[0]) #stream_cmd = 'ffmpeg -f h264 -r 25 -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac '+str(channels)+' -i hw:'+str(plughw)+' -ar 44100 -vcodec copy -acodec libmp3lame -b:a 128k -ar 44100 -map 0:0 -map 1:0 -strict experimental -f flv ' + youtube + key[0] #stream_cmd = 'ffmpeg -f h264 -r 25 -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac '+str(channels)+' -i hw:'+str(plughw)+' -ar 44100 -vcodec copy -acodec libmp3lame -b:a 128k -ar 44100 -map 0:0 -map 1:0 -strict experimental -f mpegts tcp://0.0.0.0:3333\?listen' - stream_cmd = 'ffmpeg -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac '+str(channels)+' -i hw:'+str(plughw)+' -ar 44100 -acodec mp2 -b:a 192k -ar 44100 -vcodec copy -map 0:0 -map 1:0 -g 25 -strict experimental -tune zerolatency -f mpegts udp://172.168.27.125:5000' + stream_cmd = 'ffmpeg -f h264 -r 25 -i - -itsoffset 5.5 -fflags nobuffer -f alsa -ac '+str(channels)+' -i hw:'+str(plughw)+' -ar 44100 -acodec mp2 -b:a 128k -ar 44100 -vcodec copy -map 0:0 -map 1:0 -g 0 -f mpegts udp://172.168.27.125:5000' try: stream = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE) camera.start_recording(stream.stdin, format='h264', bitrate = 2000000)