Giter VIP home page Giter VIP logo

kivyrtc's Introduction

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:
# On Mac, Linux
pip3 install --upgrade virtualenv
python3 -m virtualenv .env
source ./.env/bin/activate

# On Windows
py -3 -m pip install --upgrade virtualenv
py -3 -m virtualenv .env
.\.env\Scripts\activate
  • Install lib:

    • On OS X run:
    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:
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
      <ConfigurationType>DynamicLibrary</ConfigurationType>
      <PlatformToolset>v140</PlatformToolset>
      <WindowsTargetPlatformVersion>Your Windows SDK version</WindowsTargetPlatformVersion>
      </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:

pip install -r requirements.txt
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.
# On Mac, Linux
source ./.env/bin/activate
# On Windows
.\.env\Scripts\activate
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 [email protected] for further instructions.

Copyright Notice

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

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

kivyrtc's People

Contributors

thong-tran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kivyrtc's Issues

window 10 ImportError: cannot import name 'AudioStreamTrack' from 'aiortc'

Traceback (most recent call last):
File "C:\Users\aakas\Desktop\kivymd\lib\kivyrtc-master\main.py", line 6, in
from kivyrtc.app import KivyRTCApp
File "C:\Users\aakas\Desktop\kivymd\lib\kivyrtc-master\kivyrtc\app.py", line 21, in
from .mediastreams import VideoImageTrack, AudioTrack
File "C:\Users\aakas\Desktop\kivymd\lib\kivyrtc-master\kivyrtc\mediastreams.py", line 10, in
from aiortc import AudioStreamTrack
ImportError: cannot import name 'AudioStreamTrack' from 'aiortc' (C:\Users\aakas\AppData\Local\Programs\Python\Python39\lib\site-packages\aiortc_init_.py)

mobile support

๐Ÿ‘‹

What does it take for kivyrtc to work on a mobile phone?

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.