title: How do I extract the frames from video using tensorflow?
body: <p>I am trying to extract the frames from video , I have to pass the video (mp4) to deep learning model . I have successfully runs it on the gif but working on videos .</p>
  <p><strong>Code for gif:</strong></p>
  <pre><code>image_path = 'video.gif'
  image = tf.io.read_file(image_path)
  image = tf.image.decode_gif(image)
  print(image.shape)
  </code></pre>
  <p><strong>Output:</strong></p>
  <pre><code>TensorShape([30, 640, 352, 3]) #(num_frames, height, width, channels)
  </code></pre>
  <p>I have to pass the video like mp4 to model and some pre defined function should returns the same thing as above code is returning . Any pre defined function is available which should returns the output with (num_frames, height, width, channels) , if I pass any video ?</p>