RV1126 Note 12: Realize RTMP single-channel streaming

If the article is an original article, please indicate the source of the original article when reprinting.

1. Introduction

Compared with pushing stream, pulling stream is a bit simpler. You only need to connect to the RTMP server, get the stream, decode the data, display and play it. The Ebaina board is used. The audio output is abnormal during the test, so just View data is parsed, audio is not processed. If you want to test the audio, it is recommended to use other development boards, the punctual atomic ones are good.

After pulling the stream, if there is a screen, it can be displayed on the screen. Here, the soft decoding method is used for display. It is more convenient to display multiple streams later. You can also refer to rkmedia and use the hard decoding method.

2. Flowchart

 The implementation method is probably how to do it, which is simpler than pushing the stream.

3. Code Analysis

The code is relatively simple, there are two main points:

1. The initialization parameters of ffmpeg can be set correctly 

2. After decoding, it needs to be scaled to the screen size and displayed

1. VO initialization

 2. ffmpeg initialization

 Image color space conversion, resolution scaling, pre- and post-image filtering processing

Guess you like

Origin blog.csdn.net/weixin_38807927/article/details/128426798