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

Changing the video codec #10

Closed
HamletEagle opened this issue Mar 23, 2024 · 2 comments
Closed

Changing the video codec #10

HamletEagle opened this issue Mar 23, 2024 · 2 comments
Assignees

Comments

@HamletEagle
Copy link

Hello!

I have one quick question for you, is it possible to change the video codec used when saving the effect to a video? Currently, it appears it is using the h264 codec, and I would like to use the png codec.

If there is no such feature, could you please point me to where in the code I can make this change?

Thank you!

@Tremeschin
Copy link
Member

Tremeschin commented Mar 23, 2024

Yes it is possible!

It's kinda hard coded right now as I'm yet to think of FFmpeg presets and better code paths for this configuration

You'll need to edit the file at BrokenSource/Projects/ShaderFlow/ShaderFlow/Scene.py on this linked line, depthflow uses this other project/package as the base for all video and shaders stuff

You can just comment out the stuff you don't want and call .custom("arguments", "strings") for manual work

eg. for using h265

self.ffmpeg = (
    self.ffmpeg
    .custom("-c:v", "libx265")
    .custom("-crf", "28")
    .custom("-preset", "veryslow")
    (...)
    .custom("-t", self.duration)
)

@HamletEagle
Copy link
Author

Thank you, it works!

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