jvgemert / pbMoMa

Phase based video motion magnification
133 stars 40 forks source link

result of pbMoma on guitar.mp4 is an unplayable 128 byte avi file #2

Open czyz opened 8 years ago

czyz commented 8 years ago

I was excited to try this script out, but the result indicates that something has gone wrong.

Here's the console output:

`$ /usr/local/bin/python phasebasedMoMag.py Reading: media/guitar.mp4 300 frames (432 x 192) FPS:29 Writing: media/guitar.mp4-Mag20Ideal-lo72-hi92.avi FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29/Library/Python/2.7/site-packages/perceptual/filterbank.py:155: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]] /Library/Python/2.7/site-packages/perceptual/filterbank.py:156: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future nangle = angle[lostart[0]:loend[0], lostart[1]:loend[1]] /Library/Python/2.7/site-packages/perceptual/filterbank.py:165: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future resdft[lostart[0]:loend[0], lostart[1]:loend[1]] = nresdft * lomask

v-v commented 8 years ago

Hi,

you're just having an issue with your OpenCV installation not being compiled with ffmpeg support so it's not creating the video properly. Given your directory structure, I see that you're a Mac user. I was also surprised that brew does not install it with ffmpeg support by default. Just do a "brew install opencv --with-ffmpeg" after making sure to have ffmpeg and you should fix your problem.

The warnings you c/p-ed are irrelevant to your problem.

Hope this helps - feel free to close this issue as it's not related to the code in this repository.

Jearcci commented 7 years ago

Hi Mr v-v

I may have the same problem without 'a non-integer number instead of an integer will result in an error in the future' problem, It just like 8kb out file problem.

My opencv version is 2.4.8, and I had try to "brew install opencv --with-ffmpeg" , the problem is :

Loo:~ Loo$ brew install opencv --with-ffmpeg

Error: No available formula with the name "opencv" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... These formulae were found in taps: homebrew/science/opencv homebrew/science/opencv3
To install one of them, run (for example): brew install homebrew/science/opencv

Loo:~ Loo$

What should I do ?

Thank you~

v-v commented 7 years ago

You probably have to tap into it before, as brew is suggesting: "brew tap homebrew/science".