Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming screen recorder - output issues

I want record screen (by capturing 15 screenshots per second). This part I know how to do. But I don't know how to write this to some popular video format. Best option which I found is write frames to separated PNG files and use commandline Mencoder which can convert them to many output formats. But maybe someone have another idea?

Requirements:

  • Must be multi-platform solutions (I'm using Free Pascal / Lazarus). Windows, Linux, MacOS
  • Exists some librarys for that?
  • Could be complex commandline application which record screen for me too, but I must have possibility to edit frames before converting whole raw data to popular video format
  • All materials which could give me some idea are appreciated. API, librarys, anything even in other languages than FPC (I would try rewrite it or find some equivalent)
  • I considered also writting frames to video RAW format and then use Mencoder (he can handle it) or other solution, but can't find any API/doc for video RAW data

Regards

like image 700
Dibo Avatar asked Jun 20 '12 15:06

Dibo


People also ask

Can a program detect screen recording?

Can Websites Detect Screen Recording? Similar to screenshots, websites can detect screen recording if done through browsers or tools on browsers like plugins and extensions. However, if you use a screen recording program like Hypercam that is separate from the browser, websites will not be able to detect them.

Why is audio delayed in screen recording?

Screen recording is an inherently CPU-intensive process. Therefore, some inconsistencies between audio and visual inputs are possible if you have a lot of competing programs, applications, and processes running while you're recording. Ways to reduce inconsistencies: Close all other tabs or applications.


1 Answers

Argalatyr mentioned ffmpeg already.

There are two ways that you can get that to work:

  1. By spawning an new process. All you have to do is prepare the right input (could be a series of jpeg images for example), and the right commandline parameters. After that you just call ffmpeg.exe and wait for it to finish.

  2. ffmpeg makes use of some dll's that do the actual work. You can use those dll's directly from within your Delphi application. It's a bit more work, because it's more low-level, but in the end it'll give you a finer control over what happens, and what you show the user while you're processing.

Here are some solutions to check out:

  • FFVCL Commercial. Actually looks quite good, but I was too greedy to spend money on this.

  • Open Source Delphi headers for FFMpeg. I've tried it, but I never managed to get it to work.

  • I ended up pulling the DLL wrappers from an open source karaoke program (UltraStar Deluxe). I had to remove some dependencies, but in the end it worked like a charm.

    The relevant (pascal) code can be found here: http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/src/lib/ffmpeg-0.10/

like image 168
Wouter van Nifterick Avatar answered Nov 15 '22 08:11

Wouter van Nifterick