@@ -0,0 +1,1243 @@
+#!/usr/bin/env python3%0Aimport requests%0A%0Aframes = %5B%5D%0Adata = b%22%22%0Afound_first = False%0Aresponse = requests.get(%22http://navigation.local:8080/stream/video.h264%22, stream=True)%0A%0Afor chunk in response.iter_content(chunk_size=1024):%0A    if chunk:%0A        starting_offset = len(data)%0A%0A        if starting_offset %3E= 2:%0A            if data%5B-1%5D == b%22%5Cx00%22:%0A                print(%22last byte is zero, backing up one%22)%0A                starting_offset -= 1%0A            if data%5B-2%5D == b%22%5Cx00%22:%0A                print(%22second to last byte is zero, backing up one more%22)%0A                starting_offset -= 1%0A%0A        data = data + chunk%0A        offset = data.find(b%22%5Cx00%5Cx00%5Cx01%22, starting_offset)%0A%0A        if offset != -1:%0A            print(%22found frame%22)%0A            remaining = data%5Boffset:%5D%0A%0A            if not found_first:%0A                print(%22dropping partial first frame%22)%0A                found_first = True%0A            else:%0A                print(%22adding frame%22, len(frames) + 1)%0A                frames.append(data%5B:offset%5D)%0A                %0A                if len(frames) == 120:%0A                    break%0A%0A            data = remaining%0A%0Awith open(%22navigation.h264%22, %22wb%22) as out:%0A    out.write(b%22%5Cx00%22)%0A    for frame in frames:%0A        out.write(frame)%0A

Add script to stream h264 frames from uv4l