LaiFengiOS / LFLiveKit

LaiFeng IOS Live Kit,H264 and AAC Hard coding,support GPUImage Beauty, rtmp transmission,weak network lost frame,Dynamic switching rate
MIT License
4.39k stars 1.11k forks source link

RTMP SLL (RTMPS) SOLVED #237

Open atiqmumtaz507 opened 7 years ago

atiqmumtaz507 commented 7 years ago

HI, first of all i am really thankful for such a wonderful work. The library works awesome with RTMP Stream.

I need RTMPS Stream. Is there anyone who can guide me how to configure the library in order to support RTMPS stream.

Thanks & Regards Atiq

atiqmumtaz507 commented 7 years ago

I solved my problem with some changes....

you need to upgrade your pod file.

Step1 Add : pod 'OpenSSL', '~> 1.0' Step1.1 Pod install (Use this command to update your pod. this command will install openssl 1.0 as a pod to your project). Step 2 Edit rtmp.c File https://drive.google.com/open?id=0B6i-kpwQxpkpVUtTS2RLc214eUk Step 3 Edit handshake.h File https://drive.google.com/open?id=0B6i-kpwQxpkpcTZBN3lBZlhVWWs Step 4 Edit rtmp.h File https://drive.google.com/open?id=0B6i-kpwQxpkpYjhBcFpUN0dwSjQ

Please Note in rtmp.h File there is a line at the start define NO_CRYPTO if you comment it out then your app may send RTMPS stream otherwise RTMP Stream.

Enjoy :-)

atiqmumtaz507 commented 7 years ago

@toss156 can you update the repository so that people get this update by default.

evanxlh commented 5 years ago

My app supports youtube and facebook live broadcast. For youtube, I should use rtmp, for facebook, I should use rtmps. But pili-rtmp lib use macros, can not support rtmp and rtmps at the same time. So, I can only have one solution, do not use macros. Do you have any better solution?

wojtowiczm commented 5 years ago

@webdeutschland Hello, your sollution is great but i've got problem with importing headers from openssl i.e.: 'openssl/rc4.h' file not found How did you overcome this problem?

PachydermSoftware commented 5 years ago

@webdeutschland I added "${PODS_ROOT}/Headers/Private/OpenSSL" and "${PODS_ROOT}/Headers/Public/OpenSSL" to LFLiveKit's "Header Search Paths" and that seems to clear up the issue. Not sure why it's not picked up automatically on pod install.

Like @evanxlh I would also like to know if it's possible to support both rtmp and rtmps at the same time? Or perhaps using #define CRYPTO offers backwards compatibility to rtmp? Any help appreciated.

atiqmumtaz507 commented 5 years ago

I think you can use rtmp and rtmps url with the same library.

PachydermSoftware commented 5 years ago

Yes, thanks, I have verified using the CRYPTO setting does allow for both rtmps and rtmp, at least in my limited testing. Now to keep this thread going...

Is it possible to enable username/password authentication with this library?

wojtowiczm commented 5 years ago

Thank you so much guys. I really appreciate your help. You just literally saved my project. I also made fork with those changes so feel free to use it. Just type in your podfile: pod 'LFLiveKit', :git => 'https://github.com/wojtowiczm/LFLiveKit.git', :branch => 'rtmps'

richardhsu commented 5 years ago

@wojtowiczm @webdeutschland thank you! These changes look good! 🙏

muzammil-triffort commented 5 years ago

@wojtowiczm Thanks. It works great when I use Xcode 10.1 and Swift 3.

bbkelleroglu commented 4 years ago

pod 'LFLiveKit', :git => 'https://github.com/wojtowiczm/LFLiveKit.git', :branch => 'rtmps'

Thank you so much still working in Swift5 🙏🏻

vmprashantkios commented 3 years ago

Yes, thanks, I have verified using the CRYPTO setting does allow for both rtmps and rtmp, at least in my limited testing. Now to keep this thread going...

Is it possible to enable username/password authentication with this library?

Have you found a way to enable username/password authentication.

cherishloveyou commented 1 year ago

can rmtps work fine? I test it failed,any one can help?

hongkong792 commented 1 year ago

您好,我已收到您的邮件,感谢您对我的支持!香港回复