added stream checks
This commit is contained in:
15
backend/tools/stream_handling.py
Normal file
15
backend/tools/stream_handling.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user