Swift uses the Ijkplayer framework to play live video 2 (RTSP video stream playback)

Source: Internet
Author: User
Tags git clone

I introduced the configuration and use of the Ijkplayer framework. The Ijkplayer default compilation configuration was used, that is, the streamlined configuration. This compiled package is relatively small and supports most video formats. Live video, such as the RTMP or HTTP protocol, can be played.

But sometimes we need to support more types of video (such as live video on the RTSP protocol), then we need to modify the default compilation configuration.

1, download the Ijkplayer project to the local, this is not much to say

git clone https://github.com/Bilibili/ijkplayer.git Ijkplayer-ios

2, before integrating ffmpeg, you need to modify the default module.sh

The original use is module-lite.sh, this change into module-default.sh


CD Ijkplayer-ios
CD Config
RM module.sh
Ln-s module-default.sh module.sh
Cd..
CD iOS
SH compile-ffmpeg.sh Clean

3, the next integration ffmpeg the same as before


CD Ijkplayer-ios
Git checkout-b latest k0.6.0

./init-ios.sh

CD iOS
./compile-ffmpeg.sh Clean
./compile-ffmpeg.sh All

4,framework compilation, project configuration These are also the same as the previous article. There's not much to say here.

5, use the sample above to do the test
Change address to RTSP video address (RTSP://218.204.223.237:554/LIVE/1/66251FC11353191F/E7OOQWCFBQJOO80J.SDP)
You can see the video playback success:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.