dthpham / sminterpolate

Make motion interpolated and fluid slow motion videos from the command line.
MIT License
1.38k stars 91 forks source link

Not utilizing Nvidia card #118

Open noobtoob4lyfe opened 5 years ago

noobtoob4lyfe commented 5 years ago

Apologies if this is a noob question, but when I run a movie through BF it makes my cpu usage go to about 90% and my videocard usage remains flat. I ran .\butterflow -d and got the following. Any suggestions? Do I need to add something to the command to activate hardware acceleration? OpenCL devices: Platform : NVIDIA CUDA Platform Vendor : NVIDIA Corporation Platform Version : OpenCL 1.2 CUDA 10.0.132

dthpham commented 5 years ago

Try using the -device option: butterflow -device 0 <other args>

noobtoob4lyfe commented 5 years ago

Thanks very much for the suggestion. I am using that option and the graphics card usage is about the same (somewhere between 3 and 5%). CPU usage is up to 70 -90% though. Is this normal?

dthpham commented 5 years ago

It might be selecting the wrong device. Run with -vv to confirm your GPU is being selected.

noobtoob4lyfe commented 5 years ago

Thanks again. Here's what it printed out.
butterflow:INFO: Version 0.2.4a4 butterflow:INFO: Cache directory: c:\users\user\appdata\local\temp\butterflow-0.2.4a4 butterflow:INFO: At least one compatible OpenCL device was detected butterflow:INFO: Using device: GeForce GTX 1080 Ti butterflow:INFO: Hardware acceleration is enabled

butterflow:INFO: Sequence: Duration=0:00:03.788000 (3.79s), Frames=227, Rate=59.9400596619

Maybe ffmpeg needs to have HW acceleration enabled somehow?

pseudosavant commented 4 years ago

I'm not able to get it to leverage my Nvidia GPU either. It detects it fine with -d and the verbose messages says it auto selects the GPU and hardware acceleration is on, but my GPU usage never goes above a few percent.

Here is the verbose output from running `butterflow -r 2x -v video.mp4':

butterflow:INFO: Version 0.2.4a4 butterflow:INFO: Cache directory: c:\users\paul\appdata\local\temp\butterflow-0.2.4a4 butterflow:INFO: At least one compatible OpenCL device was detected butterflow:INFO: Using device: GeForce RTX 2070 SUPER (autoselected) butterflow:INFO: Hardware acceleration is enabled

butterflow:INFO: Sequence: Duration=0:00:22.923000 (22.92s), Frames=687, Rate=29.9700298309 butterflow:INFO: Subregion (0): Time=0:00:00-0:00:22.923000 Frames=0-686 Speed=1.0,Duration=?,Fps=? butterflow:INFO: Rendering to: kobe vs lebron.remux.21560.mp4 butterflow:INFO: Final destination: output\kvl.mp4 butterflow:INFO: [Subprocess] Opening a pipe to the video writer butterflow:INFO: Rendering progress: 0.00% butterflow:INFO: Start working on Subregion (0): Time=0:00:00-0:00:22.923000 Frames=0-686 Speed=1.0,Duration=?,Fps=? butterflow:INFO: Frames in region: 0-686 butterflow:INFO: Region length: 687 butterflow:INFO: Region duration: 22.923000s butterflow:INFO: Number of frame pairs: 686 butterflow:INFO: Interpolation rate: 2 butterflow:INFO: Time stepping: 0.333,0.667 butterflow:INFO: Frames to write: 1374 butterflow:INFO: Will interpolate: 2058 butterflow:INFO: Extra frames (to discard): 684 butterflow:INFO: Drop every: 3 butterflow:INFO: Dupe every: 0 butterflow:INFO: Ready to run: 687 times butterflow:INFO: Showing a sample of the first and last 15 runs: butterflow:INFO: To write: S0 I1,1 0.15% butterflow:INFO: To write: S1 I1,1 0.29% butterflow:INFO: To write: S2 I1,1 0.44% butterflow:INFO: To write: S3 I1,1 0.58% butterflow:INFO: To write: S4 I1,1 0.73% butterflow:INFO: To write: S5 I1,1 0.87% butterflow:INFO: To write: S6 I1,1 1.02% butterflow:INFO: To write: S7 I1,1 1.16% butterflow:INFO: To write: S8 I1,1 1.31% butterflow:INFO: To write: S9 I1,1 1.46% butterflow:INFO: To write: S10 I1,1 1.60% butterflow:INFO: To write: S11 I1,1 1.75% butterflow:INFO: To write: S12 I1,1 1.89% butterflow:INFO: To write: S13 I1,1 2.04% butterflow:INFO: To write: S14 I1,1 2.18% butterflow:INFO: To write: S15 I1,1 2.33% butterflow:INFO: <Snipping 657 runs from the console, but will update progress periodically every 65 frames rendered> butterflow:INFO: <Rendering progress: 9.46%> butterflow:INFO: <Rendering progress: 18.92%> butterflow:INFO: <Rendering progress: 28.46%> butterflow:INFO: <Rendering progress: 37.92%> butterflow:INFO: <Rendering progress: 47.38%> butterflow:INFO: <Rendering progress: 56.91%> butterflow:INFO: <Rendering progress: 66.38%> butterflow:INFO: <Rendering progress: 75.91%> butterflow:INFO: <Rendering progress: 85.37%> butterflow:INFO: <Rendering progress: 94.83%> butterflow:INFO: To write: S673 I1,1 98.33% butterflow:INFO: To write: S674 I1,1 98.47% butterflow:INFO: To write: S675 I1,1 98.62% butterflow:INFO: To write: S676 I1,1 98.76% butterflow:INFO: To write: S677 I1,1 98.91% butterflow:INFO: To write: S678 I1,1 99.05% butterflow:INFO: To write: S679 I1,1 99.20% butterflow:INFO: To write: S680 I1,1 99.34% butterflow:INFO: To write: S681 I1,1 99.49% butterflow:INFO: To write: S682 I1,1 99.64% butterflow:INFO: To write: S683 I1,1 99.78% butterflow:INFO: To write: S684 I1,1 99.93% butterflow:INFO: To write: S685 I2,0 100.15% butterflow:INFO: Run 686 (this is the final run): butterflow:INFO: To write: S686 butterflow:INFO: Done rendering Subregion (0) butterflow:INFO: [Subprocess] Closing pipe to the video writer butterflow:INFO: Rendering is finished butterflow:INFO: Moving: kobe vs lebron.remux.21560.mp4 -> output\kvl.mp4 [butterflow:WARNING]: Unexpected write ratio [butterflow:WARNING]: Write ratio: 1376/1374, (100.15%) butterflow:INFO: Final output frames: 686 source, +690 interpolated, +0 duped, -0 dropped butterflow:INFO: Output file size: 7829.78 kB (4420.24 kB) butterflow:INFO: Rendering took 1.8 mins, done.

NgocSon159 commented 3 years ago

Try using the -device option: butterflow -device 0 <other args>

Thanks you. That's work!

jonathancolledge commented 2 years ago

Has anyone apart from NgocSon159 solved this?