# iterate on video frames & initiate a generation for each
cap = cv2.VideoCapture('game.mp4')
while cap.isOpened():
check, frame = cap.read()
# compute symbols based on frame and symbol_size
data_in = bytearray(frame)
settings['symbol_size'] = 1400
settings['symbols'] = int(math.ceil(len(data_in)/settings['symbol_size']))
# setup kodo encoder & send settings to server side
encoder = kodo.RLNCEncoder(
field=kodo.field.binary8,
symbols=settings['symbols'],
symbol_size=settings['symbol_size'])
encoder.set_symbols_storage(data_in)
# Encode, produce and send packets
# Setup kodo decoder
decoder = kodo.RLNCDecoder(
field=kodo.field.binary8,
symbols=settings['symbols'],
symbol_size=settings['symbol_size'])
data_out = bytearray(decoder.block_size())
decoder.set_symbols_storage(data_out)
# Decode coded packets
..............
#Recover the original video frame
original_frame = np.frombuffer(data_out, dtype=np.dtype(int))
Hi Ahmad,
Just to understand correctly. The decoder reports that it is
complete - but the decoded data is not in data_out? Did I
understand that correctly?
- M
--
You received this message because you are subscribed to the Google Groups "steinwurf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steinwurf-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/steinwurf-dev/659b3866-6c3b-4b59-8aca-efb834248f93%40googlegroups.com.
settings['symbols'] = len(data_in)/settings['symbol_size']
data_in=bytearray(frame)
To unsubscribe from this group and stop receiving emails from it, send an email to steinw...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to steinw...@googlegroups.com.