Camera cannot use high resolution with high FPS for Linux platform.
May be AIR doesn't work with MJPEG mode and use YUV limited mode.
It cause that AIR cannot be used for real tasks right now if you need camera usage for Linux.
Tested with latest AIR 51.1.1.3 with multiple different Linux x86_64 devices (Ubuntu and Debian), different OS versions, cameras and different applications.
Same issue in all cases.
There is no such issue using non-AIR applications.
There is no such issue with the same devices and cameras but with Windows OS.
Tested with Logitech C270 HD webcam, Prestigio Windows Hello FullHD Camera and many others.
For FullHD cameras
ffmpeg -f v4l2 -list_formats all -i /dev/video0
returns:
Launch application with code below with any Linux device with connected FullHD (or even HD) camera.
It will try to start camera output with 1920x1080@30 mode.
package {
import flash.display.Sprite;
import flash.media.Camera;
import flash.media.Video;
public class LinuxCameraHighFPSBbug extends Sprite {
private var cam:Camera;
public function LinuxCameraHighFPSBbug() {
cam = Camera.getCamera();
cam.setMode(1920, 1080, 30);
const vid:Video = new Video();
vid.width = cam.width;
vid.height = cam.height;
vid.attachCamera(cam);
addChild(vid);
trace(cam.width, cam.height, cam.fps);
}
}
}
Actual Result:
In traces you will see:
1920, 1080, 30
But actually (by eye and events) it looks and works like ~5 FPS.
Also camera output has incorrect color profile. Colors little different when you use the same example and camera for Windows.
Absolutely the same situation when you try to use 720p mode with high FPS.
Expected Result:
AIR application use 1920x1080@30 mode.
Problem Description
Camera
cannot use high resolution with high FPS for Linux platform. May be AIR doesn't work with MJPEG mode and use YUV limited mode. It cause that AIR cannot be used for real tasks right now if you need camera usage for Linux.Tested with latest AIR 51.1.1.3 with multiple different Linux x86_64 devices (Ubuntu and Debian), different OS versions, cameras and different applications. Same issue in all cases. There is no such issue using non-AIR applications. There is no such issue with the same devices and cameras but with Windows OS.
Tested with Logitech C270 HD webcam, Prestigio Windows Hello FullHD Camera and many others. For FullHD cameras
ffmpeg -f v4l2 -list_formats all -i /dev/video0
returns:And you can use:
ffplay -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 -i /dev/video0
to test it with non-AIR apps:Related issues: https://github.com/airsdk/Adobe-Runtime-Support/issues/2699 https://github.com/airsdk/Adobe-Runtime-Support/issues/2693 https://github.com/airsdk/Adobe-Runtime-Support/issues/2691 https://github.com/airsdk/Adobe-Runtime-Support/issues/2687 https://github.com/airsdk/Adobe-Runtime-Support/issues/2018 https://github.com/airsdk/Adobe-Runtime-Support/issues/1980 https://github.com/airsdk/Adobe-Runtime-Support/issues/1895 https://github.com/airsdk/Adobe-Runtime-Support/issues/1802 https://github.com/airsdk/Adobe-Runtime-Support/issues/906
Steps to Reproduce
Launch application with code below with any Linux device with connected FullHD (or even HD) camera. It will try to start camera output with 1920x1080@30 mode.
Application example with sources attached. linux_camera_high_fps_bug.zip
Actual Result: In traces you will see:
1920, 1080, 30
But actually (by eye and events) it looks and works like ~5 FPS. Also camera output has incorrect color profile. Colors little different when you use the same example and camera for Windows. Absolutely the same situation when you try to use 720p mode with high FPS.Expected Result: AIR application use 1920x1080@30 mode.
Known Workarounds
none May be write native extension to use camera.