Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

how to record video without lags

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
tom2374
n00b
n00b
Posts: 28
Joined: Sat May 10, 2025 9:49 am

how to record video without lags

  • Quote

Post by tom2374 » Mon Jun 02, 2025 3:31 pm

I have a weak computer and when I record video using ffmpeg or OBS they use 80 percent of the processor, so everything freezes when recording. Is there a lightweight utility or a way to not lose performance so much?
my start ffmpeg

Code: Select all

ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 probnik.mp4
Last edited by tom2374 on Mon Jun 02, 2025 4:49 pm, edited 1 time in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56084
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Jun 02, 2025 4:15 pm

tom2374,

Its the compression that takes all the CPU cycles.
Grab the video first. WIthout compression. That will be big. Compress it later when you don't mind that it uses all the resources.

If you must do it all in one, try to nice the ffmpeg process.
However, depending on what else is going on, that can lead to dropped frames in the recording.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
tom2374
n00b
n00b
Posts: 28
Joined: Sat May 10, 2025 9:49 am

  • Quote

Post by tom2374 » Mon Jun 02, 2025 5:01 pm

sorry for being stupid, but how do I record a video without compression? I tried this

Code: Select all

ffmpeg -framerate 60 -f x11grab -i :0.0+0,0 probnik.mp4
but it didn't help, could you give me a specific command to record without compression?
Top
b11n
Guru
Guru
User avatar
Posts: 303
Joined: Wed Mar 26, 2003 8:15 am
Location: New Zealand

  • Quote

Post by b11n » Tue Jun 03, 2025 12:27 am

try adding

Code: Select all

-vcodec rawvideo -pix_fmt rgb32
before the output filename (but after the '-i'). Alternatively, if your "weak" computer at least has a capable GPU, even a 10 year old one, encoding could be offloaded to it to free up CPU
Top
tom2374
n00b
n00b
Posts: 28
Joined: Sat May 10, 2025 9:49 am

  • Quote

Post by tom2374 » Tue Jun 03, 2025 2:41 am

i try

Code: Select all

ffmpeg -framerate 60 -f x11grab -i :0.0+0,0 -vcodec rawvideo -pix_fmt rgb32 probnik.mp4
but get this

Code: Select all

[x11grab @ 0x5580a89fb600] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0+0,0':
  Duration: N/A, start: 1748918166.759938, bitrate: 3981312 kb/s
  Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 3981312 kb/s, 60 fps, 1000k tbr, 1000k tbn
File 'probnik.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[mp4 @ 0x5580a8a04880] Could not find tag for codec rawvideo in stream #0, codec not currently supported in container
[out#0/mp4 @ 0x5580a8a04780] Could not write header (incorrect codec parameters ?): Invalid argument
[vf#0:0 @ 0x5580a8a05580] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0x5580a8a05580] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0x5580a8a05580] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x5580a8a04780] Nothing was written into output file, because at least one of its streams received no packets.
Top
b11n
Guru
Guru
User avatar
Posts: 303
Joined: Wed Mar 26, 2003 8:15 am
Location: New Zealand

  • Quote

Post by b11n » Tue Jun 03, 2025 3:42 am

ah yes, you'll also need to use

Code: Select all

-f rawvideo
and drop the .mp4 suffix, as the MP4 container can't handle raw RGB frames
Top
Post Reply

6 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic