Project

General

Profile

DesignVideo » History » Version 18

Adrian Georgescu, 09/04/2010 02:15 PM

1 2 Adrian Georgescu
2 1 Adrian Georgescu
3
4 18 Adrian Georgescu
h1. Video Blueprint
5 1 Adrian Georgescu
6 18 Adrian Georgescu
7
Design and implement Ticket [#255]
8
9
10
h2. Goals
11
12
13 1 Adrian Georgescu
The goal is to implement the support for p2p and multi-party video sessions is the SIPSIMPLE middleware.  VP8 and H.264 codecs must be supported.
14
15
The video stream should behave like the audio stream at the transport level: SRTP and ICE should be usable. It must comply with the IMediaStream interface, the same way AudioStream does.
16 11 Adrian Georgescu
17 1 Adrian Georgescu
18 18 Adrian Georgescu
h2. Integration
19
20
21 1 Adrian Georgescu
In the picture below the integration of the video support into SIPSIMPLE is shown divided into it's different components:
22
23 18 Adrian Georgescu
!{}video_design.png!
24 1 Adrian Georgescu
25 18 Adrian Georgescu
* PJSIP: a new transport is needed. Instead of creating a whole new transport, which would require to implement SRTP and ICE again, a transport adapter will be implemented. A transport adapter sits between a real transport and a pjmedia_stream. To the stream, this adapter will look like a media transport, and to existing media transport, this adapter will look like a stream. The benefit of this approach is we can use the same adapter for both kind of media transports, that is the UDP and ICE media transport. This is exactly the approach that was taken for SRTP. This transport adapter will be responsible for encoding/decoding the video information.
26 1 Adrian Georgescu
27 18 Adrian Georgescu
* Middleware:
28 17 Adrian Georgescu
29 18 Adrian Georgescu
** VideoTransport: the VideoTransport will use RTPTransport to carry the video data and will be responsible for building the SDP for the video stream. A new option will be added to RTPTransport so that it starts the video transport adapter instead of the regular transport when needed.
30 1 Adrian Georgescu
31 18 Adrian Georgescu
** VideoStream: implements IMediaStream interface. Will export a plugable mechanism so that the application layer can access the video data and display it in a window for example, similar to ExternalVNCViewer on MSRP streams.
32 1 Adrian Georgescu
33 18 Adrian Georgescu
* Application: the application will receive the video data from the stream and 'paint' it on a window.
34 1 Adrian Georgescu
35
36 18 Adrian Georgescu
h2. Video Acquisition
37
38
39 1 Adrian Georgescu
First approach will be to create pjmedia_videostream object which will do the video acquisition at low level and pass it to transport_video.
40
41 4 Saúl Ibarra Corretgé
42 18 Adrian Georgescu
h2. Roadmap
43
44
45 1 Adrian Georgescu
This milestones should be achieved in order to get video working:
46 12 Adrian Georgescu
47 18 Adrian Georgescu
* SDP negotiation: make SIPSIMPLE able to generate and negotiate a valid video SDP.
48
* Null video: SIPSIMPLE will generate a valid RTP payload with dummy data that will be exchanged after a successful SDP negotiation.
49
* Video reception an still image sending: add the ability to receive and display the remote video stream and generate a valid video stream from an still image.
50
* Video acquisition: send real video data.
51 12 Adrian Georgescu
52 9 Saúl Ibarra Corretgé
53 18 Adrian Georgescu
h2. Encoder and Acquisition Choices
54 1 Adrian Georgescu
55 18 Adrian Georgescu
56
* libVLC can be used for encoding and decoding the video data. It has ctypes based Python bindings, that should be used at the application level to display remote video. Acquisition will most likely be done in C. A libVLC shared library will need to be built with all necessary module statically linked: h264 encoder/decoder, core modules, etc.
57
* ffmpeg may be used instead of libvlc, is more lightweight
58
59
60
h2. Video Mixer
61
62 17 Adrian Georgescu
63
For multi-party conferencing  scenario, the party that is the  mixer must overlay its own video with the inputs from the conference participants RTP video streams into a new composed screen that is then sent back to the participants. 
64
65 1 Adrian Georgescu
http://freej.org/ is a multi-layer video mixer C++ with Python bindings
66
67
The active speaker must be rendered more prominently than the listening parties. The video overlay must be dynamically changed by detecting the party that speaks louder from the RTP audio stream. The active speaker takes the top side of the screen while the other participants must be rendered in thumbnail mode horizontally.