Files
lrc-backend/backend/tools/stream_handling.py
2020-02-21 07:22:26 +01:00

16 lines
352 B
Python

import ffmpeg
packet_size = 4096
process = (
ffmpeg
.input('rtsp://172.22.246.207/extron1')
#.input('rtsp://172.22.246.207/extron3')
.output('/tmp/test.jpg', vframes=1)
#.output('-', format='h264')
.run_async(pipe_stdout=True)
)
while process.poll() is None:
packet = process.stdout.read(packet_size)