Coder Social home page Coder Social logo

qrtmp's Introduction

Qrtmp

What is this?

Qrtmp ("Quick RTMP") is a lightweight package to interface, as a client, with applications and platforms (e.g. servers) that work by using the Real Time Message Protocol.

This package is aimed at maintaing this aged protocol and keeping it up-to-date in comparison to the older libraries that are available to use out there (for client purposes) for the Python language.

Originally adapted from Prekageo's rtmp-python (which was derived from the RTMPy project), this library provides various layers of abstraction to allow the user to interface more directly with any application they want connect to and transfer data over.

Dependencies

The only dependency at the moment is that the package can only be used with Python 2.7 (10+) which can be downloaded from python.org.

Installation

The package can be installed simply by executing:

>>> python setup.py install

Example

To demonstrate some basic functionality, a very basic RTMP connection is illustrated within the rtmp_connect.py script.

Usage

qrtmp's People

Contributors

goelbiju avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

qrtmp's Issues

Allow variable RTMP header sizes

RTMP headers currently (from rtmp-python) is sent over in their maximum size, type 0. This includes sending the header format, chunk stream id, timestamp, body size, type id and stream id.

We should have a method of sorting if the header needs to follow the full size or, if it needs to be made smaller, depending on what was sent before it on the stream.

We also need to be able to create headers of varying sizes by just possible specifying the header format e.g. RtmpHeader(format=0x01, chunkstream_id=3, timestamp(delta)=100, body_size=100, message_type=0x14(AMF0_COMMAND)).

Message Types and Messages

Types:

  • Support Aggegrate messages timestamps (issue when playback of audio/video as timestamps are too large).

  • Fix timestamps in aggregate sub-messages (related to timestamp in header).

Implement FLV handling

We can look at projects such as rtmplite which has managed to parse flv files to read and send data to an RTMP server, via sockets.

We need to make a class which can do something similar but allow users to easily add an flv file to queue into a stream.

Remove dependency on PyAMF (?)

Explore and see if we can remove the usage of PyAMF or possibly remove the usage of a file object. Maybe hold functions such as reading int/ read uints in another class.

NetConnection and NetStream

We can abstract the RtmpClient into a BaseConnection class to interface with only sockets and then allow NetConnection to inherit this. NetStream should be an object within NetConnection which allows for the client to interface with the NetConnection stream.

AMF Command encoding issue

When sending multiple AMF Command messages, especially with a chunk type of 1, the second message's body is not encoded properly.

It could be due to the structure of how we use the RtmpStream variable.

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.