did some extensive testing on my setup (Intel-based Chromebook, hatch board) here are the logs/findings so you can take a look whenever you have time
-
The Video Performance
The video encoding works incredibly well! Capturing the screen at 1080p 60fps (and 30fps) is super smooth and efficient on the GPU.
-
The FLV / Double Audio Sink Issue
When trying to use both audio sources at the same time:
Bash
chard_gpusrc -w XWAYLAND0 -s 1920x1080 -f 60 -a cras_sink.monitor -a default_input -c flv -o "rtmp://live.twitch.tv/app/$TWITCH_KEY"
It fails with the classic FLV multiplexer error:
[flv @ 0x57f4bf358a80] more than one audio stream is not supported by most flv demuxers.
Since Twitch requires a single interleaved audio track, the script would need an internal mixer/resampler to merge both sources into one stream before passing it to FFmpeg.
- System Audio Distortion (cras_sink.monitor)
When streaming only the game audio using:
Bash
chard_gpusrc -w XWAYLAND0 -s 1920x1080 -f 30 -a cras_sink.monitor -c flv -ac aac -ab 128k -o "rtmp://live.twitch.tv/app/$TWITCH_KEY"
The audio sounds heavily distorted, crackling, and metallic (even on local .mp4 recordings). I tried forcing -ffmpeg-opts "ac=2,aresample=async=1,ar=44100" and ar=48000, but the distortion persists. It seems like a buffer size or sample rate mismatch between gpu-screen-recorder and the CRAS server inside the chronos terminal environment.
- Internal Microphone is Muted/Isolated
Trying to capture just the internal mic via -a default_input or -a cras-source results in completely muted audio.
I ran arecord -l inside the chronos shell and it returned:
arecord: device_list:279: no soundcards found...
Take your time with this! Let me know if you update the script or need me to test any new audio-buffer parameters in the future. Thanks for the awesome tool!
did some extensive testing on my setup (Intel-based Chromebook, hatch board) here are the logs/findings so you can take a look whenever you have time
The Video Performance
The video encoding works incredibly well! Capturing the screen at 1080p 60fps (and 30fps) is super smooth and efficient on the GPU.
The FLV / Double Audio Sink Issue
When trying to use both audio sources at the same time:
Bash
chard_gpusrc -w XWAYLAND0 -s 1920x1080 -f 60 -a cras_sink.monitor -a default_input -c flv -o "rtmp://live.twitch.tv/app/$TWITCH_KEY"
It fails with the classic FLV multiplexer error:
[flv @ 0x57f4bf358a80] more than one audio stream is not supported by most flv demuxers.
Since Twitch requires a single interleaved audio track, the script would need an internal mixer/resampler to merge both sources into one stream before passing it to FFmpeg.
When streaming only the game audio using:
Bash
chard_gpusrc -w XWAYLAND0 -s 1920x1080 -f 30 -a cras_sink.monitor -c flv -ac aac -ab 128k -o "rtmp://live.twitch.tv/app/$TWITCH_KEY"
The audio sounds heavily distorted, crackling, and metallic (even on local .mp4 recordings). I tried forcing -ffmpeg-opts "ac=2,aresample=async=1,ar=44100" and ar=48000, but the distortion persists. It seems like a buffer size or sample rate mismatch between gpu-screen-recorder and the CRAS server inside the chronos terminal environment.
Trying to capture just the internal mic via -a default_input or -a cras-source results in completely muted audio.
I ran arecord -l inside the chronos shell and it returned:
arecord: device_list:279: no soundcards found...
Take your time with this! Let me know if you update the script or need me to test any new audio-buffer parameters in the future. Thanks for the awesome tool!