added stream checks

This commit is contained in:
Tobias Kurze
2020-02-21 07:22:26 +01:00
parent bb4db25dcd
commit 6971b4b618
10 changed files with 324 additions and 202 deletions

View 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)