项目作者: skglobal-jsc

项目描述 :
A simple video call for Kivy use aiortc.
高级语言: C
项目地址: git://github.com/skglobal-jsc/kivyrtc.git
创建时间: 2019-06-10T10:48:07Z
项目社区:https://github.com/skglobal-jsc/kivyrtc

开源协议:MIT License

下载


Kivy RTC

A simple video call for Kivy use aiortc.

  • Note:

    • Use python 3.7 or above.
    • Currently, mobile is not supported.
    • Camera use OpenCV, not use kivy camera provider.
    • Have some problems when handling audio.

TODO:

  • Add new app icon in kivyrtc/data (replace existing file) and remove this todo.
  • Generate a new GUID for Inno setup when create new project and remove this todo.
  • When change version, remember change in files: main.py and buildtools/create-installer.iss
  • When you release app please change IS_RELEASE in utils/platform.py to True and remember change back to False when done it.

Usage

Launching the app

  • Create env:
  1. # On Mac, Linux
  2. pip3 install --upgrade virtualenv
  3. python3 -m virtualenv .env
  4. source ./.env/bin/activate
  5. # On Windows
  6. py -3 -m pip install --upgrade virtualenv
  7. py -3 -m virtualenv .env
  8. .\.env\Scripts\activate
  • Install lib:

    • On OS X run:

      1. brew install ffmpeg opus libvpx pkg-config
    • On Windows:

      • Download Microsoft C++ Build tools to build PyAV, aiortc and opus.
      • You can copy include, lib folders in win-lib to .env, to avoid following the steps below.
      • Dowload libvpx and ffmpeg(shared and dev) or build it yourself.
      • Extrack it and copy all content in folder include to .env\Include and lib to .env\libs.
      • Copy path/to/lib/bin to os.environ["PATH"] in main.py.
      • For opus you have to build it yourself because I can’t find any builds. Download source opus and extrack it in %USERPROFILE%.
      • Open opus-1.3.1\win32\VS2015\opus.vcxproj, find and add SDK version to:

        1. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
        2. <ConfigurationType>DynamicLibrary</ConfigurationType>
        3. <PlatformToolset>v140</PlatformToolset>
        4. <WindowsTargetPlatformVersion>Your Windows SDK version</WindowsTargetPlatformVersion>
        5. </PropertyGroup>
      • Build it by Command Prompt for VS: msbuild "opus-1.3.1\win32\opus.vcxproj" /property:Configuration=ReleaseDLL;Platform=x64 /m /v:minimal

      • Copy x64\ReleaseDLL\opus.lib to .env\libs, opus-1.3.1\Include to .env\Include and add path/to/x64/ReleaseDLL/opus.dll to os.environ["PATH"].
  • Install requirements and run:

  1. pip install -r requirements.txt
  2. python main.py

Packaging project

Make sure you follow all steps in Environment preparing and check all TODO

  • For Windows/MacOS, you must activate env and run pyinstaller:
    • Output folder will save in dist folder.
    • You must close app and the opened file or folder in dist folder before packaging app. If you not, pyinstaller can’t build project.
  1. # On Mac, Linux
  2. source ./.env/bin/activate
  3. # On Windows
  4. .\.env\Scripts\activate
  5. pyinstaller ./desktop.spec
  • To create installer:
    • Windows: download Inno Setup and run .\buildtools\create-installer.iss. Output file will save in .\buildtools\Output folder.
    • Mac: run cmd pkgbuild --install-location /Applications --component 'dist/Kivy RTC.app' 'dist/Install Kivy RTC v0.1.0.pkg'

If you get error, read this to fix it or contact to python@sk-global.biz for further instructions.

Copyright (C) 2019 Spring Knowledge Global,.JSC. All rights reserved.

Licensed under the MIT
license (see the LICENSE file).