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 sr filter speed #6

Open
sonicdebris opened this issue Sep 2, 2020 · 1 comment
Open

FFmpeg sr filter speed #6

sonicdebris opened this issue Sep 2, 2020 · 1 comment

Comments

@sonicdebris
Copy link

Hello,I managed to generate a model for the srcnn filter from the checkpoints, and tried to use it to process a video with ffmpeg, with this command:

ffmpeg -i input.3gp -vf sr=model=/path/to/srcnn.model:scale_factor=2 upscaled.avi

The processing speed ~2 fps for a 176x144px video. I am on a 16-thread, 4GHz machine. Is that expected?

@Witiko
Copy link

Witiko commented Sep 14, 2020

You are using the single-threaded native ffmpeg implementation, which is slow. By compiling ffmpeg with the --enable-tensorflow option and converting with the sr=[…]:dnn_backend=tensorflow option, you can use the tensorflow library instead, which can use all your CPU cores or a GPU. On my machine, I am seeing around 8 fps when using 4 CPU cores and around 15 fps when using a GPU.

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