Giter VIP home page Giter VIP logo

Comments (12)

drauggres avatar drauggres commented on July 26, 2024 1

Using these options by default is not an options.
I'm thinking about using profile=1,level=1 automatically on Android 10+ and keeping - for others, but I haven't decided yet.
Also I want to add possibility to change "codec options" (and new encoder parameter) at runtime same way as video settings.

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

To be clear, all three other decoders work for me on mac/linux/windows on chrome/firefox and safari. I don't know where to look at.
Any help or additional info (maybe there are logs in the console in dev-tools) appreciated.

Screenshot. Win10/Chrome 83

ws-scrcpy

from ws-scrcpy.

LeeGenD avatar LeeGenD commented on July 26, 2024

This situation may be caused by a special device(Android mobile phone), because the three decoders work for my first device, but not work for another.
Another reason is because broadway.js only support low quality video streaming.

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

@LeeGenD @pigass0512
Can you share the first two video frames that come over the websocket?
They have 0000 0001 67 and 0000 0001 65 bytes at the beginning.

Screenshot.

websoket-messages-base64

Upd: base64 is prefered.

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

Also please try to change this line to const CODEC_OPTIONS = 'profile=1,level=1';:

const CODEC_OPTIONS = '-';

You will need kill app_process, this parameter is passed as an argument to the scrcpy-server.

from ws-scrcpy.

pigass0512 avatar pigass0512 commented on July 26, 2024

@LeeGenD @pigass0512
Can you share the first two video frames that come over the websocket?
They have 0000 0001 67 and 0000 0001 65 bytes at the beginning.

Screenshot.
Upd: base64 is prefered.

Hi master,

But I can not using any decoders after I build the service with v0.4.1.....OMG!!
I had reboot my device and using the same wifi network, but still cannot launch the screenshot....lol

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

But I can not using any decoders after I build the service with v0.4.1.....OMG!!
I had reboot my device and using the same wifi network, but still cannot launch the screenshot....lol

After reboot do you open "device list" page first or directly /#!action=stream&? Server is installed after devices detection, which happens only when "device list" page requested.

from ws-scrcpy.

pigass0512 avatar pigass0512 commented on July 26, 2024

But I can not using any decoders after I build the service with v0.4.1.....OMG!!
I had reboot my device and using the same wifi network, but still cannot launch the screenshot....lol

After reboot do you open "device list" page first or directly /#!action=stream&? Server is installed after devices detection, which happens only when "device list" page requested.

Hi master,

My steps as below :

  1. Reboot my mobile device.
  2. Git clone the project with v0.4.1
  3. npm install and start the service.
  4. Go to Device list web page.
  5. Click one of decoder in list.

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

Also please try to change this line to const CODEC_OPTIONS = 'profile=1,level=1';:

const CODEC_OPTIONS = '-';

You will need kill app_process, this parameter is passed as an argument to the scrcpy-server.

Tried on OnePlus 6 (Android 10): with profile=1,level=1 Broaway and TinyH264 work just fine.
Will add fix to the next release.

UPD: but it breaks encoder on some devices with android 6...

from ws-scrcpy.

MartinRGB avatar MartinRGB commented on July 26, 2024

Also please try to change this line to const CODEC_OPTIONS = 'profile=1,level=1';:

const CODEC_OPTIONS = '-';

You will need kill app_process, this parameter is passed as an argument to the scrcpy-server.

Tried on OnePlus 6 (Android 10): with profile=1,level=1 Broaway and TinyH264 work just fine.
Will add fix to the next release.

UPD: but it breaks encoder on some devices with android 6...

works,better write in README.MD

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

I have implemented a configuration dialog in the develop branch.
Now, before opening the stream, you can configure video settings, including codec options and encoder.

Changing encoder look like a simpler solution than setting codec options.

If anyone can test it, please let me know the results.

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

To summarize:

  1. Broadway.js and Tiny H264 are capable to decode only video encoded with Baseline profile
  2. To change profile you can:
  • specify codec option (not necessary exactly profile=1,level=1, but it seems to work in some cases, for more information see --codec-options option in scrcpy)
  • select different encoder (hoping it has Baseline as default profile)

Otherwise you can use MSE based player, at the momen we use here xevokk/h264-converter.

from ws-scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.