Help a newbie with weird FFmpeg cpu use

Questions involving a Windows version of FFmpeg.
Post Reply
Posts: 1
Joined: Tue May 28, 2019 1:43 am

Help a newbie with weird FFmpeg cpu use

Post by daibatzu » Tue May 28, 2019 1:53 am

Hello, I heard chrome uses ffmpeg to play videos and images and was thinking about building a media player with it. I have downloaded ffmpeg for windows. Now, I have a bunch of 4k hdr videos I downloaded off the internet. When I view this videos in chrome (not online, just dragging them onto a chrome window), I notice my cpu barely goes above 10 percent and memory use is maybe 100 to 200mb. Really great because playing the same video in windows movies and tv uses about 30 percent cpu and a lot more ram (around 600-900). Now, so I tried to play the same video with the ffmpeg I download like so:

Code: Select all

ffplay -x 804 -y 524 "C:\Users\masterDai\Real 4K HDR 60fps - Panasonic Fresh Colors in HDR-vyN84xI8OKQ.webm"
And goddam. The cpu use was almost 100 percent. Infact I noticed that 720p videos, which barely use 1 percent cpu on my laptop, are using 100mb of ram and about 7 percent cpu. How is chrome able to have such a low footprint while using ffmpeg while I am having badluck on the command line? Am I doing something wrong? I'd really like to build my own media player as my favorite (media player classic), seems a bit dead and microsoft movies and tv simply doesn't play video formats properly and there is no option to add a codec pack. And no, I am not crazy, I already built my own photo viewer ( Taking things into my hands instead of waiting for "the community"
Many Thanks

Posts: 1
Joined: Wed Jun 05, 2019 9:02 pm

Re: Help a newbie with weird FFmpeg cpu use

Post by Anton1699 » Wed Jun 05, 2019 9:06 pm

Chrome uses GPU-acceleration to decode video. I don't know how you can make ffplay do this automatically, but you can try calling "ffplay -vcodec h264_cuvid <file>" for H.264-files and "ffplay -vcodec hevc_cuvid <file> for HEVC files.

Post Reply