amiaopensource / ffmprovisr

Repository of useful FFmpeg commands for archivists!
https://amiaopensource.github.io/ffmprovisr/
520 stars 65 forks source link

Capture desktop video script? #438

Open ablwr opened 4 years ago

ablwr commented 4 years ago

After seeing @kieranjol make a comment on a request for recording software, I saw that this can be done via ffmpeg pretty easily and I think it'd be helpful to have this script added in.

It might be a bit of a challenge due to the multiple operating systems? https://trac.ffmpeg.org/wiki/Capture/Desktop

Even if we added just one and referenced this perfectly-good-wiki-entry, I think that might add value because it showcases that something is possible for people who might not know that it is possible.

kieranjol commented 4 years ago

Aye, I'd thought about adding this actually! I use the windows gdi grab command mostly as I now make a lot of training videos on my Windows work laptop. I guess we can pick an O.S and link to the wiki as you say?

retokromer commented 4 years ago

I would suggest to have the different OS explained, like we did for the batch processing.

kieranjol commented 2 years ago

OK, so I still use ffmpeg video capture and I always end up checking the wiki or looking through my notes. I'm now thinking that Reto's example of batch processing could be the way to go, where there's two separate recipes for Mac and Windows, as there's just too much to explain within each operating system. I'm leaving out linux here, but perhaps someone else might want to work on that? I'd be happy to do up Mac and Windows examples -unless people feel strongly about a single recipe?

kfrn commented 2 years ago

Thanks for resurrecting this, @kieranjol!

I'm fine with either approach - adding an entry that links to the wiki, or adding separate recipes by OS.

I'm a Linux user, so could test + add that one!

privatezero commented 2 years ago

Thanks you two! Separate recipes makes sense to me! This is reminding me I need to resurrect https://github.com/amiaopensource/ffmprovisr/issues/365 and get that added in as well. Drives me crazy to hunt for it every time I need that command!

ablwr commented 2 years ago

Thanks all of you!!!

retokromer commented 2 years ago

Separate recipes makes sense to me!

I fully agree. As said, this would not be the first time we do it that way in ffmprovisr.

retokromer commented 2 months ago

FYI: for my last year’s SEAPAVAA video I used only FFmpeg:

1st command to lossless record in SD:

ffmpeg -video_size 640x480 -framerate 25
-f avfoundation -i "0:0"
-c:v libx264rgb -crf 0 -preset ultrafast -color_range 2
-c:a pcm_s24le -ar 96k -ac 2
output_archive.mkv

2nd command to re-encode lossy with subtitles:

ffmpeg -i output_archive.mkv
-c:v libx264 -crf 18 -preset veryslow -pix_fmt yuv420p
-filter:v "subtitles=subtitles.srt"
-c:a aac -ar 48k
-movflags +faststart
output_streaming.mp4
retokromer commented 2 months ago

P.S. – The 1st command above is for macOS: