jishnujayakumar / MV-Tractus

A simple tool to extract motion vectors from h264 encoded videos.
108 stars 27 forks source link

file example / standards ? #8

Closed amiravni closed 4 years ago

amiravni commented 5 years ago

Hi,

I tried to use your repository, everything has compiled correctly but the line

./extract_mvs <video-file-path>.

doesn't run (tried it with several videos)

It does detect the video is H264 format and print its properties

Input #0, h264, from '../aaaa.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive),......

but then print

**************************************************************************************
*       Tool : MV-Tractus                                                            *
*     Author : Jishnu Jaykumar Padalunkal (https://jishnujayakumar.github.io)        *
*  Used Libs : FFmpeg                                                                *
*Description : A simple tool to extract motion vectors from MPEG videos              *
**************************************************************************************

--------------------------------------------------------------------------------------
framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,motion_x,motion_y,motion_scale,flags
--------------------------------------------------------------------------------------
Couldn't open file for reading

The examples I have were converted to H264 using the "x264" package, but I also tried several mkv files.

Do you have an idea what is the problem or can supply an example file so I can compare with my files?

Thanks! :)

praneet195 commented 5 years ago

Try using a MPEG video. The conversion might have failed to say the least in your videos. Use FFmpeg for conversion. Seems to work fine with FFmpeg conversions. Try using a MPEG format or MP4 or flv.

amiravni commented 5 years ago

Thanks for the fast response I tried to convert my video in several ways:

ffmpeg -i ~/tests/test2.avi ~/tests/test2.mp4
ffmpeg -i ~/tests/test2.avi ~/tests/test2.flv
ffmpeg -i ~/tests/test2.avi ~/tests/test2.mpeg

But still get the same error as before

Couldn't open file for reading

Did I miss something? I don't know if it matters but my video is at very low resolution ( around 200x200 pixels)

praneet195 commented 5 years ago

Please try using a 480p video and let us know the results.