How to use h264-converter - 2 common examples

To help you get started, we’ve selected a few h264-converter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NetrisTV / ws-scrcpy / src / decoder / NativeDecoder.ts View on Github external
public play(): void {
        super.play();
        if (this.getState() !== Decoder.STATE.PLAYING || !this.screenInfo) {
            return;
        }
        if (!this.converter) {
            const fps = 60;
            // for some reason stream work only with fps === 60
            // if (this.videoSettings) {
            //     fps = this.videoSettings.frameRate;
            // }
            const fpf = this.fpf;
            console.log(`Create new VideoConverter(fps=${fps}, fpf=${fpf})`);
            this.converter = new VideoConverter(this.tag, fps, fpf);
        }
        this.converter.play();
    }
github NetrisTV / ws-scrcpy / src / index.js View on Github external
} else {
      let data;
      try {
        data = JSON.parse(e.data);
      } catch (e) {
        console.log(e.data);
        return;
      }
      switch (data.type) {
      case CONST.MESSAGE_TYPE_STREAM_INFO:
        if (converter) {
          converter.appendRawData(new Uint8Array([]));
          converter.pause();
        }
        streamInfo = data;
        converter = new VideoConverter(element, data.frameRate, DEFAULT_FPF);
        converter.play();
        break;
      case CONST.MESSAGE_TYPE_TEXT:
        console.log(data.message);
        break;
      default:
        console.log(e.data);
      }
    }
  }, false);

h264-converter

Convert H.264 Video Streaming to Fragmented MP4

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular h264-converter functions

Similar packages