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)