Trying to read binary file into struct with julia

I rewrote the reader to allow loading of individual frames: https://gist.github.com/stillyslalom/36d72c216da18202d018025d3ef28fff

filename = "test.cine"
vid, header = readcine(filename) # Read the entire video file

# for individual frames:
header = cineheader(filename)         # Just the header
img = readframe(filename, header, 1)  # Read the first frame

# for sets of frames
subvid1 = readframe(filename, header, 1:10:500) # Read every tenth frame
subvid2 = readframe(filename, header, [1, 7, 42]) # Read arbitrary sets of frames