voxel51/eta

Sample select frames problem

Closed this issue ยท 5 comments

There seems to be an issue when using sample_select_frames in eta.core.video and setting fast=False. I am getting videos that look like this.
test (copy)

When I sample with fast=True it returns the expected output.
test

I had the same observation today when working with a BDD video in .mov format. This was the impetus for #445.

Run this on your video (using the latest eta:develop):

video_path = "/path/to/video.mov"
etav.VideoMetadata.build_for(video_path, verbose=True)

I get this:

...
    "width": 720,
    "height": 1280,
...
Extracted video metadata: {
    "frame_size": [
        720,
        1280
    ],
    "frame_rate": 30.08854221566354,
    "total_frame_count": 1903,
    "duration": 63.246667,
    "size_bytes": 32841746,
    "mime_type": "video/quicktime",
    "encoding_str": "avc1"
}

The problem is that FFmpegVideoReader (which uses ffprobe internally) is confused and thinks the width and height of the video are reversed......

As per your second screenshot, the width is 1280 and the height is 720

Here's where the stream info for the video is read:

def _get_stream_info(inpath, verbose=False):

And here's where it's used to determine the frame size:

def frame_size(self):

If anyone can figure out a solution to this, please do!!!!!!!!!!!

Here's a test video that exhibits the problem:

# Downloads to your working directory
eta gdrive download 1izpoUwMDPsmJMbyKzTgGmkoSgBk0a2IQ bdd100k_dd5e0167-fe59b827.mov

ooooooooooohhhhhhhh. thanks!