Soo let’s say that you are using absolute cartessian coords. Your 5D tensor is BATCH,T,X,Y,Z.
From here onwards let’s consider a sample as one segment of your long timeseries.
In order to feed this into an RNN you have to consider that each position of each sample at each time t is defined by [Xt,Yt,Zt], these would be your features. Whether these features are adequate or not to represent your data in this problem is not my concern.
Let me mention that you could consider the whole trajectory as a single sample. Assuming you want to split them. Following your case your input should be T,BATCH_SIZE,[X,Y,Z]
Here
T --> arbitrary time resolution chosen by you
N_SAMPLES = Timeseries_length/ T
BATCH_SIZE <= N_SAMPLES 

LSTM docs 4
Realize your input_size is 3 [XYZ] at the time of instantiating the RNN module.
What is the proper T? You have to struggle to discover it. Think that an RNN expects to encode the information of T events into the hidden state. The larger your sequence is the more parameter the hidden state needs to encode that information.  There is also a limit on how many information the hidden state can encode efficiently. (Note that translators work well for short sentences but tend to fail more for larger)
Realize that you don’t have specify T to the RNN instance, T can be variable even if you fix it. You have to specify input_size, which is 3 assuming spatial coordinates, but it could be whatever length according to the representation you use.
The hidden state can also have an arbitrary size, it’s a hyperparameter as it’s a representation of your data.
The last but not the least is you don’t really need to precompute splits of a fixed length, you can take random crops of variable length in order to make your network more robust.
Hope it helps!