Git Product home page Git Product logo

zmqvideochat's Introduction

ZMQ Video Chat

This Android project serves as a simple showcase application to demonstrate the use of ØMQ and Node.js to stream Video from one Android smartphone to another. The project uses ØMQ as the communication layer to send and receive video frames and chat messages in a publish-subscribe pattern. The messages are published to a server running a Node.js module which forwards the messages to all subscribers.

ØMQ on Android

The ØMQ library was created for Android by checking out and following the steps described on https://github.com/claudemamo/android-jzeromq

Node.js Server

To run the Video Chat server, first thing to do is install the node.

$ cd server/videochat.node
$ npm install

If you encounter problems downloading zmq for node.js, try this first:

$ sudo add-apt-repository ppa:chris-lea/libpgm
$ sudo apt-get update
$ sudo apt-get install libzmq-dev

Now you can run the node:

$ node videochat_server.js

By default, the server uses the following ports:

  • Chat Incoming Port 4000
  • Chat Outgoing Port 4001
  • Video Incoming Port 4010
  • Video Outgoing Port 4011
  • Event Incoming Port 4020
  • Event Outgoing Port 4021

Alternatively, the incoming ports can be defined as commandline arguments when starting the node, while the outgoing ports are always set to incoming port +1

$ node videochat_server.js 5000 5002 5004

Android App

The Android App can be compiled from source or downloaded from the Android market as ZMQ Video Chat

Upon startup, first thing to do is edit the connection settings from the menu.

Settings

Settings Dialog

Choose a nickname for yourself (the nickname should be unique, but as of now no checks are made to ensure that), set the address of the server you are running the videchat.node and enter the ports that you use on the server. By default this would be:

  • Chat Port 4000
  • Video Port 4010
  • Event Port 4020

Once the settings are saved, connection will be established. No connection status is available, as the design of ØMQ is done in such a way that publishers can exist without a subscriber present, thus we have no direct feedback if a connection is established. However, if you see your own nickname in the list of users, connection was successfully established. If not, select Refresh from the menu first and check the list of users again before searching for the problem.

Main View

Main View

The application consists of 3 main areas. On top is the Video area, on the left side is the chat window, on the right side is the list of currently registered users.

Video

On the left is the video from your own camera. By default, the front camera should be used. If your smartphone doesn't have a front camera, the back camera will be used. On the right side, the video of your partner will be displayed. In order to receive a video you first have to select a user from the list (of course you can also choose yourself). Clicking a second time on the user will stop the video again.

By default the video will be unscaled and it's size depends on the smartphone of your partner. Press long on the partner's video and a menu will pop up to give you the option to scale the image or rotate it.

Chat

Sent and received chat messages will be displayed in the chat window.

Users

The nicknames of all currently registered users will be displayed. By selecting a nickname from the list, the video of this user will be displayed as partner. Selecting the name again will stop the video feed.

Conclusion

As mentioned before, this application is meant as a showcase. It is not tested extensively and may have bugs still. However, feel free to use it as it is or to improve on it. If you use it in another project, a notification would be appreciated.

zmqvideochat's People

Stargazers

 avatar Patrício Cordeiro avatar  avatar Jkenny avatar jeff avatar Emre avatar  avatar Tyhj avatar  avatar  avatar  avatar  avatar ArthurPang avatar Andrii Davydov avatar leone avatar Dorren Chen avatar lannyyuan avatar  avatar  avatar Lerist avatar Muhammet Faik avatar HaveF avatar  avatar  avatar Mustafa Bozkaya avatar  avatar duxiao avatar xiaocong avatar  avatar  avatar Nam Nguyen avatar Yusuke Konishi avatar David.Gao avatar chenn avatar  avatar 刘子阳 avatar Rony avatar  avatar Valera Makeev avatar roadlabs avatar Enkhbayar Doljinsuren avatar Sean Liu avatar huzongyao avatar Rocky avatar peerless2012 avatar bigsml avatar haebin yoon avatar Tinashe avatar 锐哥 avatar  avatar Sascha Kiefer avatar  avatar 李小义 avatar  avatar Michael Anthony avatar  avatar Hao avatar Alexandr Mitev avatar Philipp Grulich avatar Qasim Ali avatar  avatar hh avatar Marin Atanasov Nikolov avatar Zeb avatar yuqifan avatar NutButterflY avatar NML [Android] avatar Alvaro avatar  avatar WinboZhou avatar Gitai avatar 孔楠 avatar Primitivo R. Montero avatar  avatar  avatar Johnny Kartakov avatar . avatar hems.io avatar  avatar Andy avatar huanglianbing avatar Johnny Eric Amancio avatar qi avatar Kento Moriwaki avatar Alexey Melnichuk avatar  avatar  avatar Jimmy Yen avatar  avatar Mark Sinkovics avatar  avatar M Rezkya F Hairy avatar Seal La-Tunje avatar  avatar Gtnun Etc avatar Aldy Chrissandy avatar Ahmed Hussein avatar WRT avatar  avatar Rainer Borene avatar

Watchers

Jimmy Lam avatar roadlabs avatar  avatar Thomas avatar Aldy Chrissandy avatar Michael Anthony avatar Dominik Egger avatar blackswan avatar  avatar Kishore Kandikere avatar WRT avatar  avatar  avatar Zhe Chen avatar Weiwei Chen avatar Enes Dayangac avatar  avatar  avatar Binyao Jiang avatar Perkins Zhu avatar

zmqvideochat's Issues

Audio Issue

mister
plis add audio in video call for my graduate
please help fast mister

Chat message issue

I use the default config, and the server can receive the chat messages I send, but the chatroom can not receive the messages.
I debug the code and find that "ZMsg.recvMsg(m_oMsgReceiver)" blocks and no messages are received. What's the problem?

Error: Could not locate the bindings file

I followed the steps in the description of the project but I get this error any help please.
Error: Could not locate the bindings file. Tried:
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/build/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/build/Debug/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/build/Release/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/out/Debug/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/Debug/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/out/Release/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/Release/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/build/default/zmq.node
→ /home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/compiled/5.6.0/linux/x64/zmq.node
at bindings (/home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/bindings/bindings.js:88:9)
at Object. (/home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/lib/index.js:6:30)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (/home/firas/Desktop/PFE/ZmqVideoChat-master/server/videochat.node/node_modules/zmq/index.js:2:18)
at Module._compile (module.js:413:34)

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.