Basically you have to prepare you frames for the sequence. You should have a vector like (Batch_size, sequence_length = 5, features = 240*320). Then create your 3 Stacked LSTM using:
layer1 = rnn.BasicLSTMCell(number_lstm_units)
layer2 = rnn.BasicLSTMCell(number_lstm_units)
layer3 = rnn.BasicLSTMCell(number_lstm_units)
Group the cells and pass it to a Multi RNN Cell:
cells = [layer1, layer2, layer3]
multirnn = rnn.MultiRNNCell(cells)
Then with your flattened vector of features you only have to pass each element though the LSTM
for feature in your_flattened_vector:
lstm_output, state = cell(feature,state)
You will have an output of the same size as your input.
For additional info check the API here.
Hope it helped.