Video scaling with JavaScript MediaStream

avio-4k

#1

I’m capturing a video stream from an AV.io 4k using the JavaScript MediaStream (i.e. MediaDevices.getUserMedia()) interface. The input resolution to the Epiphan is 2560x1440. If I specify exactly that resolution in the JavaScript, the results are perfect. However, I would like to get output from the Epiphan scaled down to 1920x1080 to make the stream more bandwidth-friendly. It does not appear that specifying 1920x1080 in the getUserMedia constraints is “seen” by the Epiphan, as the resulting output is pretty poor. Conversely, if I use something like ffmpeg to capture from the Epiphan and specify 1920x1080, I get very clean (and smaller!) output.

Does anyone know if there is a way to accomplish what I am trying to do?

Thanks!

Matt


#2

The AV.io 4k will indeed scale in hardware to whatever resolution is requested by the application. Though it is possible that in this case the application is doing the scaling itself? I do not know though. At the very least I would recommend making sure you have the latest firmware version running, as the scaling quality was improved compared to older firmware versions. You can download the current firmware (version 4.0.0) and the tool to upload it on the Software tab of this page: https://www.epiphan.com/products/avio-4k/resources/