Open russelltg opened 4 months ago
Let me know if I can do anything else to add info to the issue. I tried looking at the code, but this is way above my head, sorry.
No problem--I'm pretty sure this is because the file open command hangs until a client connects, and I think the A/V desync duration is the same as how long it took for someone to connect? Not totally sure :)
Hey, I tested with the latest version you published. Running the command locally works perfectly, audio and video :
wl-screenrec --geometry "1920,0 1920x1080" --audio --ffmpeg-muxer flv --codec avc --ffmpeg-muxer-options "listen=1" --audio-codec aac --filename "rtmp://localhost:1234"
While the one I'd use to stream still produces an error:
wl-screenrec --geometry "1920,0 1920x1080" --audio --ffmpeg-muxer flv --codec avc --ffmpeg-muxer-options "listen=1" --audio-codec aac --filename "rtmp://live.twitch.tv/app/live_xxx_xxxx"
[rtmp @ 0x5bd7bb7dbdc0] Cannot open connection tcp://live.twitch.tv:1935?listen&listen_timeout=-1000&tcp_nodelay=0
thread 'main' panicked at src/main.rs:1323:87:
called `Result::unwrap()` on an `Err` value: ffmpeg::Error(99: Cannot assign requested address)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I tried with a remote client connected, but I assume twitch must do some kind of buffering or something. Maybe ? I don't know. Let me know if I can test more stuff !
So it indeed works locally, there is sound and video working.
There are two caveats left.
When I read the stream in local host, mpv reports :
Second, when trying to send the audio/video stream to an actual endpoint (twitch in my case),
wl-screenrec
reports:Originally posted by @hraytilakhealthcare in https://github.com/russelltg/wl-screenrec/issues/73#issuecomment-2124121332