Closed jedenastka closed 3 years ago
Could you run Mon2Cam with the -v (verbose) flag, and post the results?
Here you are, sorry for late response:
~/programy/Mon2Cam/src $ ~/programy/deno run -A -r -q --unstable mod.ts -v -r 1920:1080 -b -s
DEBUG Starting Mon2Cam with the following options: Options {
framerate: 60,
device: 50,
resolution: "1920:1080",
ffmpeg: [],
border: true,
sound: true,
wayland: false,
loggerOptions: { verbose: true },
execOptions: { verbose: true, output: 3 }
}
DEBUG Checking if V4L2 device exists
DEBUG V4L2 device found with id 50
Exec Context: c811e248-8c27-4dd6-8eba-f96edd290a04
Exec Options: { verbose: true, output: 3 }
Exec Command: pactl list sink-inputs
Exec Command Splits: [pactl,list,sink-inputs]
Exec Result: { code: 0, success: true },
output: "110. odp��yw wej��cia
Sterownik: protocol-native.c
W��a��ciciel modu��u: 9
Klient: 125
Odp��yw: 0
Okre��lenie pr��bki: s16le 2 k 48000���Hz
Mapa kana����w: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.channels = "2" format.rate = "48000" format.channel_map = "\"front-left,front-right\""
Zakorkowane: nie
Wyciszenie: nie
Poziom g��o��no��ci: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balans 0,00
Op����nienie bufora: 35875���us
Op����nienie odp��ywu: 90440���us
Metoda resamplingu: nie dotyczy
W��a��ciwo��ci:
media.name = "'Panda Eyes & Teminite - Adventure Time' autorstwa 'OfficialPandaEyes'"
application.name = "strawberry"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "33"
media.role = "music"
application.process.id = "14325"
application.process.user = "grzesiek11"
application.process.host = "pecet"
application.process.binary = "strawberry"
application.language = "pl_PL.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "92d06525e6514bd4bdccd0fed88afa08"
application.process.session_id = "3"
module-stream-restore.id = "sink-input-by-media-role:music"
media.title = "Panda Eyes & Teminite - Adventure Time"
media.artist = "OfficialPandaEyes""
Exec Context: c811e248-8c27-4dd6-8eba-f96edd290a04
NaN: strawberry
Choose which applications you want to route(space separated list):
NaN
DEBUG Exiting
PANIC You need to pass a space separated list e.g.:"3 14"
~/programy/Mon2Cam/src $
Hmm weird, for some reason the command's output is translated to your language. I'm not sure how we can disable this.
Could you run pactl list sink-inputs
but with the LANG environment variable set to en_US.UTF8
?
Edit: Nevermind, it seems to disrespect this variable it seems.
LANG=C pactl
is usually the lang most systems have generated
LANG=
worked, as usual:
~ $ LANG= pactl list sink-inputs
Sink Input #5
Driver: protocol-native.c
Owner Module: 9
Client: 20
Sink: 0
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.channels = "2" format.rate = "48000" format.channel_map = "\"front-left,front-right\""
Corked: no
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 105916 usec
Sink Latency: 83389 usec
Resample method: n/a
Properties:
media.name = "'TheFatRat & Slaydit - Solitude' autorstwa 'TheFatRat'"
application.name = "strawberry"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "33"
media.role = "music"
application.process.id = "3349"
application.process.user = "grzesiek11"
application.process.host = "pecet"
application.process.binary = "strawberry"
application.language = "pl_PL.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "92d06525e6514bd4bdccd0fed88afa08"
application.process.session_id = "3"
module-stream-restore.id = "sink-input-by-media-role:music"
media.title = "TheFatRat & Slaydit - Solitude"
media.artist = "TheFatRat"
~ $
Oh! I found the problem. It's actually the language, not anything else. I ran LANG= ~/programy/deno run -A -r -q --unstable mod.ts -v -r 1920:1080 -b -s
and it works as intended!
Maybe the code has trouble parsing non-ASCII characters (we have quite a lot of them in Polish - ęóąśłżźćń) or non-English languages at all?
I noticed that the output of pactl
in my native language does indeed give the right Unicode characters and not �
:
~/programy/Mon2Cam/src $ pactl list sink-inputs
5. odpływ wejścia
Sterownik: protocol-native.c
Właściciel modułu: 9
Klient: 20
Odpływ: 0
Określenie próbki: s16le 2 k 48000 Hz
Mapa kanałów: front-left,front-right
Format: pcm, format.sample_format = "\"s16le\"" format.channels = "2" format.rate = "48000" format.channel_map = "\"front-left,front-right\""
Zakorkowane: nie
Wyciszenie: nie
Poziom głośności: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balans 0,00
Opóźnienie bufora: 42083 us
Opóźnienie odpływu: 89540 us
Metoda resamplingu: nie dotyczy
Właściwości:
media.name = "'TheFatRat & Phaera - Sunlight' autorstwa 'TheFatRat'"
application.name = "strawberry"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "33"
media.role = "music"
application.process.id = "3349"
application.process.user = "grzesiek11"
application.process.host = "pecet"
application.process.binary = "strawberry"
application.language = "pl_PL.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "92d06525e6514bd4bdccd0fed88afa08"
application.process.session_id = "3"
module-stream-restore.id = "sink-input-by-media-role:music"
media.title = "TheFatRat & Phaera - Sunlight"
media.artist = "TheFatRat"
~/programy/Mon2Cam/src $
So the problem isn't in pactl
itself.
Yeah, the program can only parse the english version. Glad it worked out.
TODO: Add LANG=
before commands, so this doesn't happen.
Just Deno.env.set("LANG", "");
might work for the entire program, testing needs to be done
I'll setup an arch vm with non english lang to reproduce and test this
I pushed a change that should fix non English lang systems
For some reason, the index of any audio sources I have is shown as NaN, making it so I can't select it.
My system:
Log (trying VLC here):