1

Here is my code:

import numpy as np
import matplotlib.pyplot as plt
import skvideo
skvideo.setFFmpegPath("C:/Users/User/PycharmProjects/MachineLearning/venv/lib/site-packages/skvideo/io")
import skvideo.io
input_parameters ={}
output_parameters ={}
reader=skvideo.io.FFmpegReader("Cool_Kids.mp4",inputdict=input_parameters,outputdict=output_parameters)
num_frames,height,width,num_channels =reader.getShape()
print(num_frames, height, width, num_channels)

For analyzing Cool_Kids.mp4 video using skvideo library, before I would use

skvideo.setFFmpegPath("C:/Users/User/PycharmProjects/MachineLearning/venv/lib/site-packages/skvideo/io")

I was getting following error:

AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).

Then after researching a bit I found this setFFmpegPath command, but got the same error. What part am I missing? There is this link Cannot find installation of real FFmpeg (which comes with ffprobe), but I can't do more. What should I do?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65

1 Answers1

0

You have to install FFmpeg command line tool.

It looks like have to install FFmpeg in your system outside of Python (I can't find a way to download ffmpeg.exe and ffprobe.exe using pip install command).

[Note: Installing FFmpeg in Windows, is different from the way described in your link].

You may also take a look at my answer to the following post.


Recommended solution:

  • Download FFmpeg (include FFprobe) executable for Windows (download the statically linked version).

  • Place ffmpeg.exe and ffprobe.exe in the same folder.
    For example at: c:/FFmpeg/bin

  • Set setFFmpegPath to the above folder:

     import skvideo
     skvideo.setFFmpegPath("C:/FFmpeg/bin")
     import skvideo.io
     ...
    

Note:
You may choose to place ffmpeg.exe and ffprobe.exe in the folder:
C:/Users/User/PycharmProjects/MachineLearning/venv/lib/site-packages/skvideo/io.

Rotem
  • 30,366
  • 4
  • 32
  • 65