Recent

Author Topic: How to use Lazarus to record video from other windows?  (Read 10365 times)

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: How to use Lazarus to record video from other windows?
« Reply #45 on: February 23, 2021, 01:25:02 pm »
@BosseB

Quote
I am feeding my speakers from the audio output of a USB-C connected multi-adapter
+ I am not getting any audio until I switch off the speaker output
You can not connect and enable an audio-capable external Device (here via USB-C) and
record from Your built-in 'Conexant ISST Audio' at the same Time.
Same with USB-Headphones as mentioned by Mr.Madguy.
Both Devices act as an external Soundcard with its own AudioChip and its own Mixer.

Quote
In my understanding the output of a mixer device is what its controls are set to.
Right, but You listen via an external SoundCard and try to record from the built-in SoundCard.
The 'Stereo Mix' is not an AudioMix between Soundcards, like DJ- or VJ-Apps do.
It's only done for the SoundCard, which is currently activ/selected in Your SystemControl-Panel.
(see the Explication by Mr.Madguy: "it captures only sound, that is played by this audio chip")
IMHO that's not too tricky.
 
Looks like the Naming was more meaningful in elder WindowsVersions, where it was called
"What U Hear", so "what's coming out of the Soundcard's AudioOutput-Jack".
So, You should set that 'USB-C connected Device' as the active SoundCard for Recording, which
makes no Sense for Latency-Issues (if it's not a really fast professional One).

Quote
As you can see my enabled Windows mixer is present
Yes, but Your 'USB-C connected Device' is not, means it's not recognized by 'FFmpeg' (or
it was not connected/enabled, when the List was created).

Quote
Anyone here knows how to do that?
Check all Soundcard-Settings, before You start Recording, as shown here.
There You can see, to which Soundcard the 'Stereo Mix' is connected to (there 'Realtek High Definition Audio').

Quote
by setting it to 750 ms the audio came into lip-sync
This means, that doing it this Way via the 'virtual-audio-capturer' results in an awfully long Latency.
I wouldn't use that Option - Don't complicate Your Life.

Quote
How can I set a volume scaling factor when recording?
https://trac.ffmpeg.org/wiki/AudioVolume

Quote
Is it possible to adjust the lip sync while recording?
https://superuser.com/questions/982342/in-ffmpeg-how-to-delay-only-the-audio-of-a-mp4-video-without-converting-the-au

How do I find all that within Milliseconds in Internet ?  ;)
« Last Edit: February 24, 2021, 04:23:50 pm by metis »
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

BosseB

  • Sr. Member
  • ****
  • Posts: 468
Re: How to use Lazarus to record video from other windows?
« Reply #46 on: February 23, 2021, 07:08:34 pm »
@BosseB

Quote
How can I set a volume scaling factor when recording?
https://trac.ffmpeg.org/wiki/AudioVolume
This outlines the exact way I have used to adjust the volume of a video file. (I actually found this page before)
But it uses a file as input and another as output, which I already have a script for to process already downloaded videos.
What I was asking for was a way to do this on the fly while capturing the video...

Quote
Quote
Is it possible to adjust the lip sync while recording?
https://superuser.com/questions/982342/in-ffmpeg-how-to-delay-only-the-audio-of-a-mp4-video-without-converting-the-au
Same here, I have a separate script to do the job using the arguments in the suggestion but when I try to put this into the capture command itself it outputs an error message about an unrecognized argument...

Quote
How do I find all that within Milliseconds in Internet ?  ;)

I think that you are better at searching and interpreting the pages that pop up...
I am not asking here before first doing a lot of googling and failing....
I have been googling and testing for a few days now since I had to go back to screen capturing...

And the worst problem I have is getting the ffmpeg commands working on Ubuntu Mate.
I am just getting black video all the time, but audio is fine.

I need to move the capturing onto a Linux laptop I have available with Ubuntu Mate 20.04 LTS since I need my main pc for general use and cannot have a window open from which the shows are captured.

The plan is that I will also create a capture handler with Lazarus where I can schedule the videos to capture and define the jobs in advance.
Then using TProcess (possibly inside separate threads) to run the captures.
Sometimes I capture 3 hours as one file and at the same time separate hour long files for the same time.

And please accept my thanks for responding to my questions! I am really grateful!  :)
--
Bo Berglund
Sweden

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: How to use Lazarus to record video from other windows?
« Reply #47 on: February 26, 2021, 12:27:44 pm »
@BosseB

Quote
it uses a file as input and another as output ... What I was asking for was a way to do this on the fly while capturing
So, for Recording, the recorded File (so not the VideoDevice) is the InputFile, which
then can be processed to an other OutputFile. I didn't try that out, but it should work, because
in general several FFmpeg-Tasks can be combined in one CommandLine (with more CPU-Load, of course).

Quote
it outputs an error message about an unrecognized argument
Means, that the FFmpeg-Option does not support this Argument.
You've put it at a wrong Place in the FFmpeg-CommandLine.

Quote
I am not asking here before first doing a lot of googling and failing...
O.k., sorry.
All of Your Efforts are actually related to FFmpeg-CommandLines.
Maybe You find some more Help, if You put Your Questions in the VideoHelp-Forum.

Quote
And the worst problem...working on Ubuntu Mate...just getting black video
'gdigrab' is a VideoDevice for Windows; for LINUX You should use one of these, listed under "LINUX".
I saw in Your next Thread, that You've already found that out by Yourself, but maybe it's interesting for others, too.

'x11grab' has a Feature, that You've asked earlier in this Thread:
Move the recorded Region with the Mouse with -follow_mouse
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

 

TinyPortal © 2005-2018