title: Loading a video dataset (Keras)
body: <p>I'm trying to implement an LRCN/C(LSTM)RNN to classify emotions in videos. My dataset structure is split in two folders - "train_set" and "valid_set". 
  When you open, either of them, you can find 3 folders, "positive", "negative" and "surprise". Lastly, each of these 3 folders has video-folders, each of which is a collection of frames of a video in .jpg. Videos have different length, hence a video-folder can have 200 frames, the one next to it 1200, 700...! To load the dataset I am using flow_from_directory. Here, I need a few clarifications:</p>
  
  <ol>
  <li>Will in my case <code>flow_from_directory</code> load the videos 1 by 1, sequentially? Their frames? </li>
  <li>If I load into batches, does <code>flow_from_directory</code> take a batch based on the sequential ordering of the images in a video?</li>
  <li>If I have video_1 folder of 5 images and video_2 folder of 3 videos, and a batch size of 7, will <code>flow_from_directory</code> end up selecting two batches of 5 and 3 videos or it will overlap the videos, taking all 5 images from the first folder + 2 of the second? Will it mix my videos?</li>
  <li>Is the dataset loading thread-safe? Worker one fetches video frames sequentially from folder 1, worker 2 from folder 2 etc... or each worker can takes frames from anywhere and any folder, which can spoil my sequential reading?</li>
  <li>If I enable <code>shuffle</code>, will it shuffle the order in which it would read the video folders or it will start fetching frames in random order from random folders?</li>
  <li>What does <code>TimeDisributed</code> layer do as from the documentation I cannot really imagine? What if I apply it to a CNN's dense layer or to each layer of a CNN?</li>
  </ol>