I’ve neber tried it, and I’m probably a bit naive, but should this pseudo code work:
cnn = MyCnnModel()
lstm = MyLstmModel()

# Go through each image sequence in the dataset
for img_seq_batch in dataset:
    # Initialize hidden state of LSTM
    hidden = init_hidden()
    output, hidden = forward(img_seq_batch, hidden)
    # Push last hidden state trough additional layers
    # Calculate loss
    # Backprop

def forward(img_seq_batch, hidden):
    # Loop over each image in the sequences
    for img_batch in img_seq_batch:
        # Push batch of images through CNN
        encoded = cnn(img_batch)
        # Push CNN output through LSTM (just one time step)
        output, hidden = lstm(encoded, hidden)
    # Return the last output/hidden of the LSTM
    return output, hidden