openstf / minicap

Stream real-time screen capture data out of Android devices.
Other
1.72k stars 623 forks source link

Is it possible to send frames at a constant rate? #147

Closed fatbitx closed 5 years ago

fatbitx commented 6 years ago

Hello,

I'm trying to record a video of an application run. On the pc I'm using ffmepg. My problem is that, apparently, minicap is providing frames only when screen changes. I couldn't see any option to set a constant framerate output. Do you know how can achieve this?

Sorry to ask here, but I wanted to know before digging into the C++/native android source code (which I'm not familiar with). Would this be a nice to have feature?

Thanks for your awesome project.

fatbitx commented 5 years ago

I'm still getting fast video playback when there's nothing moving on the screen, but I close this issue because it was more a question that an issue. Keep rocking!

thulasipavankumar commented 5 years ago

@fatbitx in README file please look at Global header section you can find quirk bitflags, under it QUIRK_DUMB option value = 1, sends frames even if there is no change in screen image. Hope this helps

fatbit-dev commented 5 years ago

@thulasipavankumar hey thanks a lot! Yes maybe I overlooked it. In any case maybe you can help me. When launching the run.sh script, how can I command minicap to use the QUIRK_DUMB = 1? Or how can I force the capture method from the command line call to minicap? I ask you this because IIRC, I only got the header from the minicap server, but I wasn't able to set its contents. I used minicap for a fast PoC and maybe I overlooked something... Thanks for your help!

sorccu commented 5 years ago

You can’t set them. You have to change your approach based on the flags you get.

fatbitx commented 5 years ago

@sorccu thanks! Then I'm still stuck, dealing with ffmpeg, which is another funny battle :) I tried duplicating the arrived frames based on timestamps, but the resulting video was heavier than Iron Maiden. Thanks for answering and for your fabulous project.