Bug 274222
Summary: | MediaRecorder doesn't support audioBitsPerSecond, videoBitsPerSecond, and frameRate for 640x480 video | ||
---|---|---|---|
Product: | WebKit | Reporter: | Marcos G. <marcosdg3> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | eric.carlson, jer.noble, webkit-bug-importer, youennf |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 17 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Marcos G.
Overview: Unable to use MediaRecorder with audioBitsPerSecond of 128 kb/s, videoBitsPerSecond specification of 500kb/s, and frameRate of 24. Using ffprobe to inspect the video file output videoBitsPerSecond is 1-2 mb/s and frame rate is 30.
Steps to Reproduce:
1) Create a stream like the following:
navigator.mediaDevices.getUserMedia({
audio: {
echoCancellation: true
},
video: {
width: {
min: 640,
ideal: 640,
max: 800
},
height: {
min: 480,
ideal: 480,
max: 600
},
frameRate: 24,
aspectRatio: (4 / 3),
facingMode: "user"
}
})
2) Create a MediaRecorder instance:
mediaRecorder = new MediaRecorder(stream, {
mimeType: recordingConfig.mimeType,
audioBitsPerSecond: 128000,
videoBitsPerSecond: 500000
});
3) Capture stream using MediaRecorder and download.
4) Analyze using ffprobe and inspect the FPS and videoBitsPerSecond:
ffprobe version 7.0 Copyright (c) 2007-2024 the FFmpeg developers
built with Apple clang version 15.0.0 (clang-1500.3.9.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
libpostproc 58. 1.100 / 58. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'RecordRTC-202449-fnygeequm6.webm':
Metadata:
major_brand : iso5
minor_version : 1
compatible_brands: isomiso5hlsf
creation_time : 2024-05-09T00:12:40.000000Z
Duration: 00:01:08.65, start: 0.000000, bitrate: 10135 kb/s
Stream #0:0[0x1](und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], 10024 kb/s, 30.01 fps, 600 tbr, 600 tbn (default)
Metadata:
creation_time : 2024-05-09T00:12:40.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 187 kb/s (default)
Metadata:
creation_time : 2024-05-09T00:12:40.000000Z
handler_name : Core Media Audio
vendor_id : [0][0][0][0]
* Note video bitrate: 10024 kb/s (10024 > 500kb/s)
* Note audio bitrate: 187 kb/s (187 > 128kb/s)
* Note 30.01 fps (30 > 24)
Additional Builds and Platforms:
* Doesn't seem to be platform specific
* MacBook Pro 15-inch, 2019
Additional Information:
* Found in version Safari Version 17.4.1 (19618.1.15.11.14)
* When adjusting below width and height 638x478, the audioBitsPerSecond and videoBitsPerSecond spec seems to adjust as desired
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/128553798>