FFMPEG desktop recording / streaming

Moderator: Forum moderators

Post Reply
hikohan
Posts: 48
Joined: Wed Mar 13, 2024 12:08 am
Has thanked: 8 times
Been thanked: 13 times

FFMPEG desktop recording / streaming

Post by hikohan »

FFMPEG supports desktop capture. :thumbup2:

Code: Select all

ffmpeg -video_size 1024x768 -framerate 5 -f x11grab -i :0.0+100,200 -t 30 -y /tmp/output.mp4

This will grab the image from desktop, starting with the upper-left corner at x=100, y=200 with a width and height of 1024⨉768, 5fps to video recording 30 seconds.

Without -t 30 option, press [Q] to exit.

FFMPEG supports streaming server push or HLS streaming(LL-HLS), publish video to Youutube / Streaming / HTTP server is Live Cast.

Detect desktop recording position, Get the current mouse coordinates in bash.

Code: Select all

	for((;;)); do
		xdotool getmouselocation
		sleep 1
	done

or by mtpaint screen capture

mtpaint -s

User avatar
mikewalsh
Moderator
Posts: 6518
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 993 times
Been thanked: 2170 times

Re: FFMPEG desktop recording / streaming

Post by mikewalsh »

@hikohan :-

Absolutely. Ffmpeg is an unbelievably versatile tool, and the combinations of tricks & stuff you can pull off with it can be overwhelming to Joe Average. BUT:-

Ya have to remember one thing, though. The vast majority of Linux users - regardless of their distro of choice - don't want to live in the terminal, and do everything via command-line. Geeks/ubergeeks/neckbeards LOVE the terminal. Joe/Jane Average wants his/her GUIs.....because that's what he/she has always been used to with MyCrudSoft's offerings.

Which is why, even in a featherweight/lightweight 'hobbyist' distro like Puppy, we still tend to prioritise noobs/Windoze 'refugees'.....and try to make stuff as 'user-friendly' as we can. Ffmpeg is phenomenally versatile & powerful, nobody will deny that. User-friendly, however, it very definitely is NOT. However.....

.....if you're happy to do things in that manner, let no man stand in your way! Go for it. :D

Mike. ;)

hikohan
Posts: 48
Joined: Wed Mar 13, 2024 12:08 am
Has thanked: 8 times
Been thanked: 13 times

Re: FFMPEG desktop recording / streaming

Post by hikohan »

Hi Mike, agree with you!

FFMPEG is versatile in command-line, bash is friendly to geek. :D

Modify Puppy Linuux your style is great fun!

mikewalsh wrote: Wed Mar 19, 2025 2:55 am

Mike. ;)

ozsouth
Posts: 1713
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 260 times
Been thanked: 780 times

Re: FFMPEG desktop recording / streaming

Post by ozsouth »

@hikohan - s15pup64 (& some other pups) have ffconvert in the Multimedia menu (I posted a version in Fossa-Mid thread). This also has an option to screen-capture. Not all settings are straightforward, but I found preset avi works, as do some other presets & other preset/detail combos.
Fossapup64 & Bookwormpup64 have Simple Screen Recorder, which works well. I do appreciate your commandline efforts though.

Last edited by ozsouth on Thu Mar 20, 2025 12:36 am, edited 5 times in total.
geo_c
Posts: 3054
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2373 times
Been thanked: 946 times

Re: FFMPEG desktop recording / streaming

Post by geo_c »

ozsouth wrote: Wed Mar 19, 2025 6:12 am

@hikohan - s15pup64 (& some other pups) have ffconvert in the Multimedia menu. This also has an option to screen-capture. Not all settings are straightforward, but I found with preset mp4, changing detail to mpeg4 video & aac sound produces decent mp4's. Fossapup64 & Bookwormpup64 have Simple Screen Recorder, which works well. I do appreciate your commandline efforts though.

Well I'm gonna grab this command for my command library!

Would an ffmpeg screen capture work in a tty environment? Sometimes I like to work that way just to prove to myself that I'm capable of it.

geo_c
Old School Hipster, and Such

Post Reply

Return to “Graphics/Video”