Add device pick
This commit is contained in:
parent
259ce49c1e
commit
5fee511315
|
@ -15,6 +15,11 @@ function sleep(time: number) {
|
|||
}
|
||||
|
||||
void (async function () {
|
||||
const pick_device =
|
||||
await $`ls -1 /dev/video* | xargs -I {} bash -c "v4l2-ctl --device {} --info | grep --extended-regexp \\"(Model|Card type)\\" | awk -F: '{print \\$2}' | awk '{print \"{}\" \",\" \\$0}' | tr , '\n'" | zenity --list --column=device --column=name`;
|
||||
|
||||
const dev = `/dev/video${pick_device.stdout.split(" ")[0]}`;
|
||||
|
||||
const source = spawn("ffmpeg", [
|
||||
"-f",
|
||||
"video4linux2",
|
||||
|
@ -25,7 +30,7 @@ void (async function () {
|
|||
"-video_size",
|
||||
"3840x2160",
|
||||
"-i",
|
||||
"/dev/video2",
|
||||
dev,
|
||||
"-f",
|
||||
"nut",
|
||||
"-c",
|
||||
|
|
Loading…
Reference in New Issue
Block a user