Skip to content

allow forcing the input format for ffmpeg backend with env var#15102

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
dgel:force_input_format_ffmpeg
Aug 6, 2019
Merged

allow forcing the input format for ffmpeg backend with env var#15102
opencv-pushbot merged 1 commit intoopencv:3.4from
dgel:force_input_format_ffmpeg

Conversation

@dgel
Copy link
Copy Markdown

@dgel dgel commented Jul 19, 2019

Allows forcing the input format for ffmpeg backend to VideoCapture

I ran into a problem where ffmpeg would not recognise the video format of a .dav file produced by a security camera. Forcing ffmpeg to just assume h264 worked for me, but I had no way of specifying this using OpenCV.

This small patch allows you to specify input format using the OPENCV_FFMPEG_CAPTURE_OPTIONS environment variable, adding the key input_format. I figured it might be useful for others too, hence the PR.

@mshabunin mshabunin self-assigned this Jul 31, 2019
@alalek
Copy link
Copy Markdown
Member

alalek commented Aug 1, 2019

This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@opencv-pushbot opencv-pushbot merged commit 96a27f4 into opencv:3.4 Aug 6, 2019
@alalek alalek mentioned this pull request Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants