In an RNN the temporal dimension is variable, not the feature dim.
You could use the channels (dim1) as the feature dimension and the height*width as the temporal dimension as a workaround.
However, based on your description you would like to use the width as the time dim: [B X C_out X Frequency X Time ].