Update scripts to use stream.py API

Change-Id: I3aabfaf3e96b064970075431c4f9b22c03f444fb