idb icon indicating copy to clipboard operation
idb copied to clipboard

In video-stream minicap format doesn't support fps argument

Open tburakdemir opened this issue 2 years ago • 2 comments

Description

Hello, in video-stream on minicap format fps argument doesnt work. I use idb in a typescript project. Simply spawn idb video-stream process and listen it's stdout then send images to client with socket.

I spawn a process which is:
this.proc = spawn('idb', [ 'video-stream', '--udid', this.udid, '--fps', '5', '--format', 'minicap', '--compression-quality', '0.002', '--scale-factor', (0.5).toString(),]);

And captures the frames and send it to frontend which can be seen in image. https://cdn.discordapp.com/attachments/770978553155682315/1007343980012380190/unknown.png

in network tab, 3891 request is completed in 1.1 min (~66 sec.). and total data usage is 125 MB. Average frame size is ~30KB. Approximately fps is 3800 / 66 = 57 fps. It looks like my fps argument in spawn function doesnt work. Can you help with this problem.

Reproduction

https://github.com/tburakdemir/idb-stream-fps-demo You can clone this repo then; npm install make sure idb is installed and your device plugged in, then play some youtube 60fps videos. it makes the screen 60fps set device udid in fpsDemo.js node fpsDemo.js

My output: AverageFps: 59.2851451574

tburakdemir avatar Aug 22 '22 20:08 tburakdemir

@tburakdemir For me, I am getting some values in the console only when I use 'h264'. When I use minicap or mjpeg, I don't get any responses at all. Do you know why? Do you get anything when use minicap format? idb video-stream --fps 30 --format minicap --compression-quality 1.0 --udid 0C9CCA92-7D08-4013-889F-F8B31D5F7357

jsramraj avatar Apr 16 '23 16:04 jsramraj

@jsramraj Hi, for minicap the screen must be open. Try restarting and delete idb sock files from computer which in /tmp/idb.

tburakdemir avatar Apr 19 '23 15:04 tburakdemir