elsampsa / valkka-core

Valkka - Create video surveillance, management and analysis programs with PyQt
GNU Lesser General Public License v3.0
181 stars 35 forks source link

Writing frames into rtsp stream #13

Closed ccdsad closed 4 years ago

ccdsad commented 4 years ago

According to lesson number 5, it is possible to receive a rtsp stream and send it to an outgoing rtsp stream. According to lesson number 6, it is possible to record the incoming stream to a file and broadcast the stream from this file. Is it possible to write raw data to the outgoing rtsp stream?

elsampsa commented 4 years ago

What do you mean by "write raw data to the outgoing rtsp stream" ?

If this is the case, then I guess you are trying to achieve some dodgy way of inter-process communication (rotating raw media stream through sockets to another process). There's no need for such stunts in libValkka, as you can get your media payload and timestamps to python side.

Please specify what you are trying to do.

ccdsad commented 4 years ago

with the help of this library I can only create a stream from a file or an incoming stream? Is it possible to make outgoing rtsp stream from already read frames in numpy arrays? Thank you for your answers.

elsampsa commented 4 years ago

With "already read frames in numpy arrays" you are referring to bitmap (i.e images), or H264 encoded stream (packets)?

If you want to turn bitmap images into H264 encoded stream, you need ENcoding.

Or do you just want to transmit some H264 encoded video you get outside libValkka?

ccdsad commented 4 years ago

Yes, I want to transmit some H264 encoded video

elsampsa commented 4 years ago

Ok, thanks for the clarification.

At the moment, payload can be pushed to the python side:

cpp side => shared memory => python side

But unfortunately, this one:

python side => shared memory => cpp side

has not been implemented.

A nice feature though. Payload could be pushed from python side to the libValkka infrastructure.

We can put it into a wishlist. Do you have time for this @eranpet .. ? If anyone wants to pay for this, it can be prioritized. :)

ccdsad commented 4 years ago

Thank you for answers!