Skip to content

ronenc/webRTC-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video channel CLI

This example illustrates the establishment of a video stream using an RTCPeerConnection.

By default the signaling channel used is "copy and paste", but a number of other signaling mecanisms are available.

By default the sent video is an animated French flag, but it is also possible to use a MediaPlayer to read media from a file.

This example also illustrates how to use a MediaRecorder to capture media to a file.

First install the required packages:

$ pip install aiortc opencv-python

Running the example

To run the example, you will need instances of the cli example:

  • The first takes on the role of the offerer. It generates an offer which you must copy-and-paste to the answerer.
$ python cli.py offer
  • The second takes on the role of the answerer. When given an offer, it will generate an answer which you must copy-and-paste to the offerer.
$ python cli.py answer

Additional options

If you want to play a media file instead of sending the example image, run:

$ python cli.py --play-from video.mp4

If you want to recording the received video you can run one of the following:

$ python cli.py answer --record-to video.mp4
$ python cli.py answer --record-to video-%3d.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages