NVIDIA / NVIDIA/DALI

video reader variable frame rate video false postitive

Open
#3,123 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question Video
Dominant language
C++
Stars
5.8k
Forks
678
Avg merge
3d 1h
Merged PRs (30d)
27

Description

Dear DALI Team,

I think the variable frame rate check inside the video reader produces false positives. I attach two files that are generated from the same .h264 stream, via:

ffmpeg -r 25 -i raw.h264 -t 10 -c copy 25.mp4
ffmpeg -r 40 -i raw.h264 -t 10 -c copy 40.mp4

Both can be checked for vfr via ffmpeg:

$ `ffmpeg -i 25.mp4 -vf vfrdet -an -f null -
[...]
[Parsed_vfrdet_0 @ 0x56230ecf0d40] VFR:0.000000 (0/249)
$ ffmpeg -i 40.mp4 -vf vfrdet -an -f null -
[...]
[Parsed_vfrdet_0 @ 0x55f17728de80] VFR:0.000000 (0/399)

Which indicates that both are free of vfr stuff. Yet, the 25 fps video works fine, but the 40 fps video produces:

Error when constructing operator: readers__Video encountered:
[/opt/dali/dali/operators/reader/loader/video_loader.cc:382] Assert on "skip_vfr_check_ || almost_equal(av_q2d(file.frame_base_), pkt.duration * av_q2d(file.stream_base_), 2)" failed: Variable frame rate videos are unsupported. Check failed for file: /bla/bla/blub/40.mp4

The two video files in question can be found here:
https://drive.google.com/drive/folders/1qPCO_vUAVwO4C-6kOFqGlDMmyXfhKsud?usp=sharing

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported reproduction commands and the two linked MP4 files, then inspect the variable-frame-rate assertion at dali/operators/reader/loader/video_loader.cc:382. Compare the metadata used by the reader for 25.mp4 and 40.mp4 with the ffmpeg vfrdet output; done means the valid 40 fps file no longer produces a false variable-frame-rate failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.