Ahoy Bruno ( @brunobastardi ) !
Yeah, in case recording Haiku desktop and sound altogether using Haiku the possibilities are actually scarce.
If you search recording at package manager, you get understandable response regarding audio
Audacity, ffmpeg, ffmpeg5, ffmpeg6, ffmpeg8 packages.
If you search recorder at package manager, you get following regarding audio
Tenacity, which is a fork of Audacity
And finally appears the one and only video recorder application program :
BeScreenCapture.
Somehow the built-in Soundrecorder had not come up for the package manager search - as it is possibly within a bundled package.
I asked in a Web search :
- → recording desktop and mic with ffmpeg
and finally specifically on Haiku, as ffmpeg works differently for Windows, Linux and macOS as well, so I was curious, wether the AI find those devices/applications I can call in an ffmpeg in Haiku terminal command prompt as in this case I can avoid syncing audio/video – I get a whole AV file. As there is no x11grab (video) and pulse (audio) as in case Linux.
- → recording desktop and mic with ffmpeg on Haiku
Recording the desktop and microphone simultaneously using FFmpeg on Haiku is not directly supported via native screen-grabbing APIs because FFmpeg’s device grabbers on Haiku are historically designed for file conversion rather than real-time display capture. To achieve desktop recording, consider these optimal, functional methods: [1, 2]
Recommended Approaches
Use
BeScreenCapture(Native GUI): InstallBeScreenCapturevia the HaikuDepot. It is a native GUI tool that uses Haiku’s Media Kit to capture the screen. [1, 2, 3]Haiku-in-VM Recording: Run your Haiku environment inside a Virtual Machine (e.g., QEMU, VirtualBox) on a host OS. You can then use desktop recording utilities (like OBS Studio or the host’s native screen recorder) to capture the VM window, which reliably records both desktop and mic. [1, 2, 3, 4]
Capture Card: Route your Haiku machine’s output through an external HDMI capture card to a second computer, using OBS Studio on that second machine to capture both the screen and microphone. [1]
FFmpeg Command Format
If you compile FFmpeg from source or use third-party libraries that enable x11grab (if you are running the X11 server for Haiku) or frame-grabbing plugins, the typical
ffmpegcommand structure to sync and record both your display and microphone looks like this:ffmpeg -f x11grab -video_size 1920x1080 -i :0.0 -f oss -i /dev/audio/oss/your_mic_node -c:v libx264 -c:a aac output.mp4
For more streamlined use, you can utilize graphical front-ends like HaikuArchives/ffmpegGUI to construct your FFmpeg command-line for encoding. [1]
Unfortunately as you could read above ffmpeg can not be used directly, that commandline above is for Linux, so this is a typical wrong part in the AI answer.
The VM solution also viable, if you would rather not deal with Haiku solutions, as for me BeScreenCapture recording logic was disappointment when I tried out recently.
As basically writes the recording into the RAM memory, and starts to flush to disk as you stopped the recording. It risks the recording get lost meanwhile saving into the file, as bytes are on the disk … are on the disk ! Also annoyimg to wait long minutes while the frames written to disk. It last long, as if you have 30 frame / sec video, and FHD frames saved about 2 frame / sec to disk .. I could see 520 frames written to disk by about 250-260 secs.
4 mins 10-20 secs waiting AFTER the recording ended … just to flush all out lesser than 9 secs FHD video image to disk. I felt myself in the Pentium1 era, on an 8 core 4th Gen core i7 CPU.
I admit, I use Haiku from an USB 3.0 thumbdrive, so saving maybe it caused to save from memory to disk took so long … but despite that : why not directly to disk ?
If you have enough money I would suggest the HW solution :
- Capture Card + Microphone with recording capabilities
cheaper solution
- Record the VM + Microphone in the host machine or Microphone with recording capabilities
and just finally
- BeScreenCapture + Audacity
If your sound card does not work in Haiku - you won’t be capable to record any sound within Haiku.
Then outside of Haiku , with help of other OS, even other machine (phone ?), or an independent mic with recording capabilities … just works !
EDIT#1 :
I almost forgot to mention - if you have VLC installed, then you can theoretically use it to record the Desktop or if the USB cam works for you in Haiku, then you can even record the webcam output. You just use the Media (first menu tab) → Open recording device (or similar, I have HU translated VLC :)) )
There you can select the device .. select Desktop, under that you can setup the frame/sec, and also there is - as always - down there the panel you select the file format and decoding details.
Questionable - if it wether tailored to Haiku, as devices names/pathes typically different in all OSes than default Windows or even Linux devices, so you may cannot select them. In this case drag & drop does not help as in case DVD desktop icon to workaround the device name.
EDIT2 :
Also forgot to mention that
as supporting audio transfer via HDMI actually does not work in Haiku the described external HDMI capture device solution by AI missed this actual status, so HDMI cable would transmit only the video image feed to the capture device : this way to the other PC as well.
So you must record the sound independently in that case - this way I wrote my suggestion about using capture card + Microphone with recording capabilities (mic recording capability required only in case you want to secure sound recording in any circumstances, as OBS can record the sound directly if the mic configured to OBS as a resource as you want to use OBS for streaming as well, not only recording purpose).