Page 1 of 1

Please, help

Posted: Wed May 22, 2019 7:24 am
by verylamer
Help, can I automatically detect capture devices?
I have a clean ffmpeg build, also UScreenCapture and virtual-audio-capturer.

I wrote myself a set of commands:

"% patch% -rtbufsize 1500M -f dshow -i video ="% video% ": audio ="% audio1% "-f dshow -i audio ="% audio2% "-filter_complex amix = inputs = 2 -f flv% server% \% username% .flv "

Where are the devices I do:
video = UScreenCapture
audio1 = Microphone (Realtek High Definition Audio)
audio2 = virtual-audio-capturer

Can I use the command "ffmpeg -list_devices true -f dshow -i dummy"
At the beginning of executing the commands, get a list of devices and set variables in order to start recording.

Re: Please, help

Posted: Fri May 24, 2019 1:41 pm
by verylamer
I thought for a long time and wrote it.
But, I can not determine the order of devices correctly.
Help me do it = (

set "server=\\\gaydarzhi"
for /f "tokens=2 delims==" %%d in ('wmic os get localdatetime /format:list') do set d=%%~nd
for /f "tokens=6" %%i in ('2^<^&1 ffmpeg -list_devices true -f dshow -i dummy^|find "@device"') do ^
ffmpeg.exe -analyzeduration 2147483647 -probesize 2147483647 -rtbufsize 1500M -f dshow -i video=%%i:audio=%%i -f dshow -i audio=%%i -filter_complex amix=inputs=2:duration=first:dropout_transition=3 -pix_fmt yuv420p -f flv %server%\%username%-%d:~0,4%-%d:~4,2%-%d:~6,2%-%d:~8,2%-%d:~10,2%-%d:~12,2%.flv