-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 12.2 issue #50
Comments
I am also on beta 4 and the livestream is working without issues |
I have similar problem, but somehow my hub device (iPad Air) can stream the video while my iPhone cannot. |
iPhone updated with final release of ios 12.2 and I have exactly the same problem. Snapshot Ok, no live stream... |
Same as above iPad mini still streaming but iPhone only snapshot. Uk updated to latest iOS on both devices. |
Same here. After 12.2 my iPhone 8 won't stream video anymore. 😟 |
Same here, iPhone 8; iOS 12.2 - only preview, no Live Stream. macOS 10.14.3 - everything is fine. |
Same here,
|
Same issue here. |
Thanks for reporting this! I will not be able to continue working on this project until June/July. If someone figures out how to fix this issue feel free to create a pull-request 😉 |
I gave up on this plug-in and went back to homebridge-camera-ffmpeg and it's working nicely. (Except I had to disable bitrate limit to get better video quality) |
@SleepyPrince, cloud you elaborate what you did "exactly"? I tried to get it working but also only got stills. Which ffmpeg did you use? How did you establish a stream to grab by homebridge-camera-ffmpeg? I should mention I use a Pi Zero W. |
I followed this guide on my rpi 3A+, with the stock ffmpeg I think pi zero should be similar |
@SleepyPrince, thx! Do you also got a USB cam attached? I try to use the internal official pi cam. Do you know where get its stream from? Like in
I think it won't be the same, would it? |
I think if you have bcm2835-v4l2 in /etc/modules, the source should be the same (/dev/video# depends how many devices you have) |
@SleepyPrince, I was able to set it up. But I still only got stills. No video. Output is |
have you tried using the debug option to see what's wrong? |
Had similar problem yesterday. Only stills but no stream on /video0. Besides: maybe it‘s an iPhone/HomeKit-Bug? In my case two iPhone 8 on 12.2 aren’t working. |
@SleepyPrince I get:
and
For me it isn't working on macOS 0.14.4 nor on iOS 12.2 |
It seems to be having issue with "-tune zerolatency". I had this issue before on homebridge-camera-rpi, but not currently with my 3A+ homebridege-camera-ffmpeg setup. |
@10w73 I just tested on my pi zero w from scratch and it's working with a pi cam.
and here's my config.json
|
@SleepyPrince I need to start from scratch on another SD card to do so. My setup is a little more complex with automated encryped backups on a NAS drive and a REST api to remote control various stuff. I don't want to destroy that. Maybe I find time next weekend. I'll let you know! Thanks! |
@SleepyPrince I couldn't wait … I started from scratch and now I got it working with homebridge-camera-ffmpeg. Thx. |
Could it be that older devices are just fine streaming on the latest iOS an only the newer models struggle to? 2016 MacBook Pro running macOS 10.14.4: streams just fine the one difference between those devices is hardware encoding for h.265 (?) Did any of you have success in reconfiguring/repairing the plugin or get it to work gain in other ways?
I don't know where the "-tune zerolatency" comes from, but it's definitely not in the code |
Okay so, it seems that it won't work on newer devices (iPhone 8 and later and probably in combination with iOS 12.2) when you copy from the v4l2 camera using the It still would be interesting what exactly causes the problem when using the original video stream from the v4l2 devices. And you should probably add Edit: The one thing that is different in the log output is, that when changing from simply copying the video stream to transcoding it the following ffmpeg warning message does not appear again: |
The following error messages appear (error logs from iPhone gathered via Console.app on Mac) when trying to stream from an iPhone X iOS 12.2 when ffmpeg is configured to only copy the video from the rip camera: Is anyone able to make use of this?
|
Looks definitely like there is a timestamp issue with the /dev/video0 raw stream. However it seems to have been fixed in the video4linux drivers as per this GitHub issue - raspberrypi/linux#1836. I have tried the Unfortunately the only solution seems to be to re-encode the stream with |
The issue is pretty old and all commits should already be presents in the current kernels/kernel modules. However the issue does not really state that the issue was fixed. It seems pretty messed up. I don’t know if those flags have any effect when you just copy the input stream(?) It seems currently to be best practice to reencode the video stream with ffmpeg. There should be definitely instructions added on how to compile ffmpeg with hardware acceleration for h264 (do all pi models support that). Otherwise the CPU is gonna run pretty hot. |
Tested on a Pi 2 I'm around 130% CPU (4 cores). Just bellow 90% on a Zero W. |
Out of interest did anyone tried streaming from an Apple Watch. Edit: nvm, repaired it with HomeKit and works like a charm now |
Streaming to my Apple Watch actually works now that you mention it. Never got anything else than snapshot until now. The ffmpeg command I've been testing is slightly different from your PR. -f video4linux2 -input_format h264 -video_size ${width}x${height} -framerate ${fps} -i /dev/video0 \
-vcodec h264_omx -pix_fmt yuv420p -tune zerolatency -an -payload_type 99 -ssrc ${ssrc} -f rtp \
-srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ${srtp} \
srtp://${address}:${port}?rtcpport=${port}&localrtcpport=${port}&pkt_size=1378` |
I plan to continue working on this project in July. If h264_omx works ootb in Raspbian (and buildroot) and the CPU usage is not increased this seams to be the best solution. Otherwise fixing the timestamp would be the alternative. The timestamp in the v4l2 driver is based on the uptime of the system, but iOS seems to expect it to start with the streaming (i.e. 0). Maybe the actual initial timestamp can be communicated via srtp (the streaming protocol) or the timestamp could be modified. |
What I don’t quite get is why are only the newer devices affected? If this is indeed a timestamp issue why is it only present on newer devices and only from iOS 12.2 onwards? Did anyone test the current version with the latest iOS 12.3 beta? |
@Supereg , it's not just older devices, iOS 12.2 on an iPhone SE was affected as well until changing vcodec to h264. |
Definitely not the workaround I was hoping for as far as Zeros are concerned as I get 8 FPS at best... |
Does the Pi Zero not support h264 hardware acceleration? |
@tux-o-matic As far as I know @fredericfdran could you please post the output of |
There is a new kid on the block HKCam providing a ready to use setup for using n RPi Zero W as a HomeKit camera with a bridge written in Go. |
Yes have been using it for a fortnight now it’s very stable but as you mentioned the quality is still poor. Only improvements I’ve made so far was to allocate 256mb to the gpo memory for a little improvement. |
@magnip, exactly the same here |
It’s not homekit compatible but proof the pi zero is capable. |
@magnip, that's awesomely smooth! Remains me of https://github.com/ccrisan/motioneyeos/wiki which is smooth in the browser too |
7b1cbb9 should add support for iOS 12.2 and later :) It is not yet published on npm but can be tested by following the "standalone" instructions. I will publish a new version on npm later after some more testing ;) |
v0.0.5 is now available via npm |
new problem: the video stops working (i.e. it seems to be working but actually only the first frame is shown) when the Pi is up and running for some time. This is caused by the timestamp being generated by the kerneltime. Using |
This should be fixed by bdef766 |
@moritzmhmk, if the issue is now solved using the original encoding with a timestamp correction for iOS 12.2, can the issue be closed? |
bdef766 and the |
For me without the latter it stops working after some uptime (I checked after 8 hours) on two Pi zero W, one Pi 2 and one Pi 3 that I have been testing. Using absolute timestamps the results are now independent of the uptime! With the addition of I believe that using I will not be able to do much testing for another month now so feel free to experiment and post your results here and I will look into it in August :) |
I can confirm the same behaviour. However with |
No news in a while.
Would a switch to gstreamer (also has HW acceleration support on the Pi) be an alternative? |
I ended up using https://github.com/mpromonet/v4l2rtspserver with VLC on my iPhone. It is surprisingly fast in performance. I know it’s quite different concept but may be someone with more knowledge can find the trick we can use here. |
Hi all!
I'm currently using iOS 12.2 beta 4 (was using the 3rd one before today) and I'm no longer able to see any stream. The screenshot is still working, but no longer the live stream.
It's still working on my other devices like my Mac or my iPad. Don't know if it's because the beta is not working well or if Apple is gonna changed something soon on the stream part.
Just wanted to keep you updated. I'm gonna comment if something is changing.
Cheers!
J.
The text was updated successfully, but these errors were encountered: