-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
My goal is to capture desktop videos, and videos via RTSP: On a PC connected to by RDP.
Not a complete surprise, but ffmpeg doesn't identify an input source while ran on a rdp PC.
And RoughDraft doesn't handle it either. See the #final code block below.
I've tried with two separate PC's.
I copied the DirectShow extension script, and created a rough RTSP, and GdiGrab extension. I saved them to the RoughScript extensions folder, and restart my shell. It didn't help allow the use of Receive-Media. I end up with parameter errors. Here's an example run.
Receive-Media -InputType GdiGrab -Time 10 -OutputPath .\Desktop.mp4
MethodInvocationException: C:\Users\<me>\Documents\PowerShell\Modules\RoughDraft\0.4\Get-RoughDraftExtension.ps1:900
Line |
900 | … $extensionParams = $extCmd.GetDynamicParameters($DynamicP …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "GetDynamicParameters" with "4" argument(s): "Cannot index into a null array."
MethodInvocationException: C:\Users\<me>\Documents\PowerShell\Modules\RoughDraft\0.4\Get-RoughDraftExtension.ps1:900
gdigrab works fine with the Use-FFMpeg command.
So no doubt I can do the same for rtsp. It would be better to have it work in Receive-Media though.
$ffOut= Use-FFMpeg -FFMpegArgument '-y','-f',gdigrab,'-framerate',20,'-i',desktop,'-t','00:00:10', output.mp4
#final code block
ffmpeg -list_devices true -f dshow -i dummy
[dshow @ 000001d7bd01eb40] "Microphone (Realtek High Definition Audio)" (audio)
[dshow @ 000001d7bd01eb40] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{178884AA-2230-43A1-A593-1323BF226C8A}"
[in#0 @ 000001d7bd021d00] Error opening input: Immediate exit requested
Error opening input file dummy.
Install-Module -Name RoughDraft
Get-FFMpeg -ListCaptureDevice
←[31;1mUse-FFMpeg: ←[0mC:\Users\<pc2>\Documents\PowerShell\Modules\RoughDraft\0.4\Extension\CaptureDevice.rd.ext.ps1:32←[0m
←[31;1m←[0m←[36;1mLine |←[0m
←[31;1m←[0m←[36;1m←[36;1m 32 | ←[0m $ffOut= ←[36;1mUse-FFMpeg -FFMpegArgument '-list_devices',true,'-f',$cdt←[0m …←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m | ←[31;1m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m | ←[31;1mAlternative name←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m←[31;1m←[36;1m | ←[31;1m"@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{178884AA-2230-43A1-A593-1323BF226C8A}"←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m←[31;1m←[36;1m←[31;1m←[36;1m | ←[31;1mError opening input: Immediate exit requested←[0m
←[31;1mUse-FFMpeg: ←[0mC:
```\Users\<pc2>\Documents\PowerShell\Modules\RoughDraft\0.4\Extension\CaptureDevice.rd.ext.ps1:32←[0m
←[31;1m←[0m←[36;1mLine |←[0m
←[31;1m←[0m←[36;1m←[36;1m 32 | ←[0m $ffOut= ←[36;1mUse-FFMpeg -FFMpegArgument '-list_devices',true,'-f',$cdt←[0m …←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m | ←[31;1m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m | ←[31;1mError opening input: Immediate exit requested Alternative name←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m←[31;1m←[36;1m | ←[31;1m"@device_cm_{33D9A762-90C8-11D0-BD43-00B0C911CE86}\wave_{178884AA-2230-43A1-A593-1323BF326C8A}"←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m←[31;1m←[36;1m←[31;1m←[36;1m | ←[31;1m"Microphone (Realtek High Definition Audio)" (audio) Could not enumerate video devices (or none←[0m
←[31;1m←[0m←[36;1m←[36;1m←[0m←[36;1m←[0m←[36;1m←[31;1m←[31;1m←[36;1m←[31;1m←[36;1m←[31;1m←[36;1m←[31;1m←[36;1m | ←[31;1mfound).←[0m
[dshow @ 000001ca11b5eb40] Could not enumerate video devices (or none found).`
more...