Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg-config issue with fps #24

Closed
Karl48071 opened this issue May 14, 2022 · 3 comments
Closed

ffmpeg-config issue with fps #24

Karl48071 opened this issue May 14, 2022 · 3 comments

Comments

@Karl48071
Copy link

Looking at the ffmepg-imageio docs, there does appear to be a parameter called "fps" that changes the output frames per second rate of the anonymized video. However, when setting ffmpeg-config '{"fps": 15} I get an error of: got multiple values for argument 'fps'

How do you properly set that parameter so that the output video is 15 frames per second?

@mdraw
Copy link
Member

mdraw commented May 18, 2022

The fps is already passed explicity here based on the source video fps value:

opath, format='FFMPEG', mode='I', fps=meta['fps'], **ffmpeg_config
.
I had implemented it like this because I did not think there was a use case for simultaneously anonymizing a video and changing its frame rate.

Edit: My workaround code didn't work. Pushing an actual fix now.

mdraw added a commit that referenced this issue May 18, 2022
fps value still defaults to source fps, but you can now override it
to e.g. 15 through --ffmpeg-config='{"fps": 15}'.

Thanks for the report @Karl48071

Closing #24
@mdraw mdraw closed this as completed May 18, 2022
@mdraw
Copy link
Member

mdraw commented May 18, 2022

Please update from the latest git version and feel free to reopen if you encounter any problems.

@Karl48071
Copy link
Author

Thank you!!

StealUrKill pushed a commit to StealUrKill/anonfaces that referenced this issue Sep 21, 2023
commit 1976ac5
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Wed Jul 19 16:06:50 2023 +0200

    readme: Add docs for mosaic filter

commit 4a91126
Merge: 7082b35 d9393c6
Author: Martin Drawitsch <martin.drawitsch@gmail.com>
Date:   Wed Jul 19 16:01:07 2023 +0200

    Merge pull request ORB-HD#42 from Shazi199/master

    add replace with mosaic option

commit d9393c6
Author: shazi199 <shazi199@gmail.com>
Date:   Fri Jul 14 16:40:00 2023 +0800

    add replace with mosaic option

commit 7082b35
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Tue Jul 4 15:36:59 2023 +0200

    Use LRU cache for shape transformation

    Only cache transform if shapes are actually the same

commit 814e6a2
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Tue Jul 4 15:22:23 2023 +0200

    Don't cache input shapes because they can vary

    Input shape transforms were previously only calculated once (i.e. for
    one frame / one image) and then cached for all subsequent calls.
    This is fine in 99% of use cases but if you want to process differently
    shaped inputs in the same deface process (given multiple input paths),
    this leads to crashes or even silently incorrect outputs.

    Transforms now have to be recalculated for each frame but this is
    very cheap, so it's okay to do this for the sake of better stability.

    Fixes ORB-HD#41

commit a023f97
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Mon Jul 3 22:54:34 2023 +0200

    Switch model to bn-optimized version, update docs

    Slightly improves resource usage. End results are the same.
    Closes ORB-HD#39.

commit c555264
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Mon Jun 5 03:24:33 2023 +0200

    Auto-select optimal ORT Execution Provider

    Accelerated onnxruntime execution providers like OpenVINO are now
    automatically selected for inference if available. The presumably fastest
    provider is chosen by default. To override this choice you can use the new
    --execution-provider CLI argument.

    Fixes ORB-HD#40.

commit ca5c651
Author: Martin Drawitsch <martin.drawitsch@gmail.com>
Date:   Tue May 2 01:05:37 2023 +0200

    readme: Add links to badges

commit 5647935
Author: Martin Drawitsch <martin.drawitsch@gmail.com>
Date:   Mon May 1 22:34:42 2023 +0200

    readme: Add badges for PyPI and build

commit f80dfaa
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Mon May 1 22:19:12 2023 +0200

    readme: Update description

commit 79f4cb4
Author: Martin Drawitsch <martin.drawitsch@gmail.com>
Date:   Mon May 1 14:44:15 2023 +0200

    Use github workflow for publishing

    Publish on PyPI automatically when a tagged release is detected.

commit 5ae6ded
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Mon Apr 24 02:32:55 2023 +0200

    Switch to pyproject.toml for meta data and build

    Eliminating the need for many setup files and versioneer

commit 48b655e
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Mon Apr 24 01:44:02 2023 +0200

    Add --keep-audio option

    With --keep-audio the audio track is carried over to the output file if
    the input is a video.

    Fixes ORB-HD#4

commit 0d2eba8
Merge: 852286e d013a08
Author: Martin Drawitsch <martin.drawitsch@gmail.com>
Date:   Tue Jan 10 17:47:42 2023 +0100

    Merge pull request ORB-HD#28 from mysablehats/master

    Fixes inconsistent fps issues (fps reading vs fps writing)

commit 852286e
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Tue Jan 10 17:25:40 2023 +0100

    Automatically convert images to RGB color space

    Inference only works in RGB, so RGBA and grayscale images need to be
    transformed first. Output is always RGB, regardless of input format.

commit edfe190
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Tue Jan 10 17:11:56 2023 +0100

    Fix centerface type hint

commit d013a08
Author: Frederico B. K <frekle@kth.se>
Date:   Thu Jun 9 10:36:07 2022 +0200

    fix 25fps issue

commit b1f0656
Author: Frederico B. K <frekle@kth.se>
Date:   Thu Jun 9 10:34:37 2022 +0200

    fix 25fps issue

commit b80a601
Author: mdraw <martin.drawitsch@gmail.com>
Date:   Wed May 18 15:48:53 2022 +0200

    Support overriding fps in --ffmpeg-config flag

    fps value still defaults to source fps, but you can now override it
    to e.g. 15 through --ffmpeg-config='{"fps": 15}'.

    Thanks for the report @Karl48071

    Closing ORB-HD#24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants