Check this post on how to extract 2D CNN features  from a video CNN LSTM implementation for video classification 47
To save them  in binary format I think you can use this function torch.save and io.BytesIO()
https://pytorch.org/docs/stable/torch.html#torch.save 3