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

ERROR: PILI_RTMP_ReadPacket, failed to read PILI_RTMP packet header #174

Open Sachinsaris0912 opened 7 years ago

Sachinsaris0912 commented 7 years ago

I am getting this error when i am trying to stream video but got this error, this is my code LFLiveStreamInfo *stream = [LFLiveStreamInfo new]; stream.url = @"rtmp://xxx.xxx.xx.xxx:1935/live/myStream"; [self.session startLive:stream];

nathanhosselton commented 7 years ago

I was having this problem, which was fixed by the suggestion in #127. Admittedly your issue may not be related as mine was due to using the streamId property.

rhedgpeth commented 7 years ago

I am also facing this issue. Why doesn't this library just use whatever comes after "..live/" as the stream key?

For instance if use my url: rtmp://xxx.xxx.xx.xxx:1935/live/myStream I receive the error.

However, if I simply tack on a character (or string of characters) "rtmp://xxx.xxx.xx.xxx:1935/live/myStream/1" it works.

But why? And does it simply use the character(s) at the end for some kind of local stream organization and strip it before connecting? Because It claims it connects.

Qu000 commented 7 years ago

I tried everything!!But it was always a mistake this is my code:

LFLiveStreamInfo *stream = [LFLiveStreamInfo new]; stream.url = @"rtmp://live.hkstv.hk.lxdns.com:1935/live/FEMH"; [self.session startLive:stream];

But why? whatever,Xcode is always ------ failed to read PILI_RTMP packet header Please!

timeview commented 6 years ago

I also had the same issues and did what rhedgpth said of putting a single character after stream name and it worked - This must be an issue with the packet header reader parser

biyu6 commented 5 years ago

原因是连接失败。您可以尝试将URL更改为您自己的服务器的URL; 或者试试这个:(rtmp://116.196.87.91:1935 / live / VC000099)注意“VC000099”是自定义的,不要与其他人重复。推荐两个测试软件:OBS,VLC