Git Product home page Git Product logo

Comments (17)

rdp avatar rdp commented on September 12, 2024

what command lines did you use? if you're encoding to libx264 it should
by default use multiple cores, AFAIK

On Thu, Nov 6, 2014 at 1:31 AM, Andras Fuchs [email protected]
wrote:

I've tested some cases and it looks like ffmpeg can't use the
multi-threaded encoding with screen-capture-recorder. It might be a problem
with ffmpeg's way to handle dshow inputs, I don't know.

Did anyone else had the same experience? It tried to record a full-hd
screen and could not get above the 25% CPU usage on my 4-core machine. I
tried both 32 and 64 bit Zeranoe builds (http://ffmpeg.zeranoe.com/builds/
).


Reply to this email directly or view it on GitHub
#49
.

from screen-capture-recorder-to-video-windows-free.

andrasfuchs avatar andrasfuchs commented on September 12, 2024

Yes, I also think it should, that's why I'm surprised. I tried to do the encoding with both x264 and x264rgb with the same results.
The multi-core functionality worked fine when I selected a video file as an input though.

Here are my command lines:
1,
ffmpeg -loglevel warning -f dshow -i video="screen-capture-recorder" -f dshow -i audio="Microphone (Samson Meteor Mic)" -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -s 1280x720 -vsync vfr -acodec libmp3lame -f mpegts - | ffmpeg -f mpegts -i - -c copy "test_x264_01.mp4"

max. 25% CPU

2,
ffmpeg -loglevel warning -f dshow -i video="screen-capture-recorder" -f dshow -i audio="Microphone (Samson Meteor Mic)" -vcodec libx264rgb -preset ultrafast -crf 0 -pix_fmt rgb24 -s 1920x1080 -vsync vfr -acodec libmp3lame -ac 1 -ar 44100 -b:a 96k -f mpegts - | ffmpeg -f mpegts -i - -c copy "x264rgb_crf00_uf_rgb24.mp4"

Max 25% CPU

and

3,
ffmpeg -loglevel warning -i x264rgb_crf00_uf_rgb24.mp4 -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -s 1280x720 -vsync vfr -acodec libmp3lame -f mpegts - | ffmpeg -f mpegts -i - -c copy "test_x264_01.mp4"

Max. 45% CPU

I used the latest (2014-11-05) Zeranoe 64 bit build for the tests...

from screen-capture-recorder-to-video-windows-free.

rdp avatar rdp commented on September 12, 2024

my guess is that it's using multi-thread but that your system has enough
CPU to keep up in realtime [?]

On Thu, Nov 6, 2014 at 6:34 AM, Andras Fuchs [email protected]
wrote:

Yes, I also think it should, that's why I'm surprised. I tried to do the
encoding with both x264 and x264rgb with the same results.
The multi-core functionality worked fine when I selected a video file as
an input though.

Here are my command lines:
1,
ffmpeg -loglevel warning -f dshow -i video="screen-capture-recorder" -f
dshow -i audio="Microphone (Samson Meteor Mic)" -vcodec libx264 -preset
ultrafast -pix_fmt yuv420p -s 1280x720 -vsync vfr -acodec libmp3lame -f
mpegts - | ffmpeg -f mpegts -i - -c copy "test_x264_01.mp4"

max. 25% CPU

2,
ffmpeg -loglevel warning -f dshow -i video="screen-capture-recorder" -f
dshow -i audio="Microphone (Samson Meteor Mic)" -vcodec libx264rgb -preset
ultrafast -crf 0 -pix_fmt rgb24 -s 1920x1080 -vsync vfr -acodec libmp3lame
-ac 1 -ar 44100 -b:a 96k -f mpegts - | ffmpeg -f mpegts -i - -c copy
"x264rgb_crf00_uf_rgb24.mp4"

Max 25% CPU

and

3,
ffmpeg -loglevel warning -i x264rgb_crf00_uf_rgb24.mp4 -vcodec libx264
-preset ultrafast -pix_fmt yuv420p -s 1280x720 -vsync vfr -acodec
libmp3lame -f mpegts - | ffmpeg -f mpegts -i - -c copy "test_x264_01.mp4"

Max. 45% CPU

I used the latest (2014-11-05) Zeranoe 64 bit build for the tests...


Reply to this email directly or view it on GitHub
#49 (comment)
.

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

-preset ultrafast
chnage to
-preset slow

now you should have 100% :D

from screen-capture-recorder-to-video-windows-free.

andrasfuchs avatar andrasfuchs commented on September 12, 2024

Oh, bloody hell, you're right, it's 70% now :D

But then, how come that I can't capture more than 15 fps in 1920x1080?
(I've set the max fps in SCR to 100)

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

you must set more for real time buffer. Like 400M

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

ffmpeg -loglevel info -re -rtbufsize 400M -f dshow -i video="UScreenCapture" -f dshow -i audio=
...

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

and dont use ultrafast never. Practicial use is veryfast preset for live capture

from screen-capture-recorder-to-video-windows-free.

andrasfuchs avatar andrasfuchs commented on September 12, 2024

@mca64
Thanks for the tips!

The default parameters were the following:
ffmpeg -loglevel warning -re -rtbufsize 10M -f dshow -i video="screen-capture-recorder" -f dshow -i audio="Microphone (Samson Meteor Mic)" -vcodec libx264rgb -preset veryfast -crf 1 -pix_fmt rgb24 -s 1920x1080 -vsync vfr -acodec libmp3lame -ac 1 -ar 44100 -b:a 96k -f mpegts - | ffmpeg -f mpegts -i - -c copy "test_x264rgb_scr_re_rtbs010M.mp4"

I've made some tests:

  • without RE, without rtbuffersize | 13.063 fps
  • without RE, with 10M rtbs | 13.104 fps
  • with RE, with 10M rtbs | 11.732 fps
  • without RE, with 800M rtbs | 12.877 fps
  • with RE, with 800M rtbs | 11.713 fps

@rdp
Is it possible the SCR can't feed the data fast enough for FFmpeg?

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

did you disabled Windows Aero on Windows 7? On Windows 8 you cant do that without little hack. What OS do you have?

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

btw this is painful libmp3lame -ac 1 -ar 44100 -b:a 96k
use something like this
libmp3lame -q:a 2 -ar 44100
or -q:a 0 (MP3 V0) or even CBR 320. MP3 V2 is close to audio transparent. Preserve quality! ;)

from screen-capture-recorder-to-video-windows-free.

andrasfuchs avatar andrasfuchs commented on September 12, 2024

Probably not, I have Win 8.1. I'll try again after disabling Aero.

You're right, the above settings are for testing only.
SCR uses 44kHz, 2 chan, CBR 128 by default, I think.

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

so you cant use it for higher framerate on Windows 8. Unless you will sespend there winlogon.exe process, kill explorer.exe and dwm.exe

from screen-capture-recorder-to-video-windows-free.

mca64 avatar mca64 commented on September 12, 2024

RDP please add support for fast Windows 8 desktop capture
here you can see how they did it in OBS https://github.com/jp9000/OBS/blob/master/Source/DesktopImageSource.cpp

from screen-capture-recorder-to-video-windows-free.

andrasfuchs avatar andrasfuchs commented on September 12, 2024

@mca64 Wow, this OBS is awesome! 👍

from screen-capture-recorder-to-video-windows-free.

rdp avatar rdp commented on September 12, 2024

someday I might even own windows 8 LOL

On Thu, Nov 6, 2014 at 9:56 AM, mca64 [email protected] wrote:

did you disabled Windows Aero on Windows 7? On Windows you cant do that
without little hack. What OS do you have?


Reply to this email directly or view it on GitHub
#49 (comment)
.

from screen-capture-recorder-to-video-windows-free.

Walkman100 avatar Walkman100 commented on September 12, 2024

@rdp Nah, Windows 7 FTW.

from screen-capture-recorder-to-video-windows-free.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.