Created attachment 410156 [details] Video file downloaded from codepen. I attempted to specify the mediastream constraints using: navigator.mediaDevices.getUserMedia({ audio: { sampleRate: 24000, echoCancellation: true }, video: { width: { min: 480, ideal: 640, max: 800 }, height: { min: 360, ideal: 480, max: 600 }, frameRate: 16, aspectRatio: (4 / 3) } }) No sound is recorded. Ex: https://codepen.io/marcosdg3/pen/jOqogQd ffprobe: $ ffprobe test-8.mp4 ffprobe version 4.2.2 Copyright (c) 2007-2019 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test-8.mp4': Metadata: major_brand : iso5 minor_version : 1 compatible_brands: isomiso5hlsf creation_time : 2020-09-30T22:14:51.000000Z Duration: 81:07:26.76, start: 292045.840000, bitrate: 0 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 0 kb/s, 15.29 fps, 15 tbr, 600 tbn, 1200 tbc (default) Metadata: creation_time : 2020-09-30T22:14:51.000000Z handler_name : Core Media Video
Confirmed audio:true works.
<rdar://problem/69831144>
From my testing on macOS, it seems that {{audio : {sampleRate : 24000}} is the issue: audio capture does not work.
This seems also to require restarting Safari to enable capture again.
From the logs: "53771 error 13:20:25.675570+0200 Safari unsupported Out sample rate"
So the MediaStreamTrack ends due to capture failing.
Created attachment 410221 [details] Patch
Committed r267838: <https://trac.webkit.org/changeset/267838> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410221 [details].