tarina

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

commit c2812eb46b674487ab008d6c0fb3b2d89641e837
parent 5e23eeb2960bcb19568ba33ace958d1403e8118c
Author: rbckman <rob@tarina.org>
Date:   Fri, 21 Jan 2022 16:59:42 +0000

fast stream

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

diff --git a/tarina.py b/tarina.py @@ -2989,7 +2989,8 @@ def startstream(camera, stream, plughw, channels): # key = fp.readlines() #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 -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' try: stream = subprocess.Popen(stream_cmd, shell=True, stdin=subprocess.PIPE) camera.start_recording(stream.stdin, format='h264', bitrate = 2000000)