Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 64

Trying to load a .mp4 Video fails

$
0
0
Hey guys, I've installed ffmpeg and opencv on my linux server, like that: git clone cd FFmpeg ./configure --enable-shared make sudo make install sudo apt-get install build-essential sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev git clone cmake mkdir release cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make sudo make install I wrote a little Python script: import cv2 cap = cv2.VideoCapture('video.mp4') total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) But I'm not able to load that video and `total_frames` are always 0. I did some research why this doesn't work and found tons of answers tried so many ways to install it, but it didn't worked for me. What did I do wrong? Am I missing some detail? I'm really annoyed and from installing it

Viewing all articles
Browse latest Browse all 64

Trending Articles