-
Notifications
You must be signed in to change notification settings - Fork 369
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
HLS on arm64 #697
Comments
On 0.18.0 RC1 I have investigated these issues. So far we were relying on RaspberryPi hardware h264 encoding capabilities.
Basically, Also, we will have to use FFmpeg built with |
As a solution, we can use software h264 encoding. Actually, Raspberry Pi 4 is powerful enough to do this without interfering with OctoPrint wannabe-realtime core. Good news is that even with I think I will work on |
For now, users can manually set encoder to |
not to add unuseful information, |
Thanks, @DrDrache , it’s actually useful. |
Good news - |
Bad news: ‘h264_v4l2m2m’ encoder in ffmpeg is pretty buggy. It does not work correctly when I’m trying to split streams from webcam to two h264 and one jpeg stream. |
Any updates on this? I am trying to use an older Logitech Pro 9000 webcam with OctoPi running on a new RPi 4B+ 8GB and when I specifically enable HLS, I get nothing at all. I have even tried to specifically change the config file to specify a resolution and refresh rate. I would very much like to run a H.264 stream out of OctoPi to import into OBS or into other software hardware platforms for monitoring if possible. |
None, also found this and there seems to be no news there neither: jellyfin/jellyfin#4023 (comment) |
Yeah, we can only run the software encoder on arm64 for now. |
@chudsaviet yeah I observed that too, using |
Is there a way to get |
Yep, just remove JPEG stream parameters from |
@chudsaviet So I could just get rid of the jpeg stream part, and it would work? I can still have 2 streams? |
@chudsaviet No luck, substituting Here's the full ffmpeg command that I'm running:
|
v4l2m2m is buggy :( |
HLS is also now broken on the 32 bit RPi OS images since the OMX encoders were removed - I tried to get it working myself but ran into very similar issues when actually debugging it as well (#770 (comment)). |
That’s bad news, and definitely a regression. I will go look into if I can debug v4l2m2m. |
It looks like |
Example for my Microsoft LifeCam Studio:
|
Yeah I experienced the same issues when using |
Ok, good news everyone!
These FFmpeg parameters (MS LifeCam Studio produces 720p@30fps only in MJPEG):
CPU load was around 10% on all cores. I will now work on putting it into OctoPi. |
Looks like I will need latest FFmpeg from ‘master’. It can be done, but it will increase image build time. |
@chudsaviet is the raspberry pi os 64-bit? octopi seems to be using Ubuntu instead for the 64 bit images though, don't know if this solution will work for it too. |
1 similar comment
@chudsaviet is the raspberry pi os 64-bit? octopi seems to be using Ubuntu instead for the 64 bit images though, don't know if this solution will work for it too. |
Ubuntu was chosen for 64bit only because there were no stable 64bit RaspberryPi OS builds. Now there are. Its time to switch back. V4L2 M2M It shall work on 32bit too, actually. I just haven't tested it yet. |
Time to reinstall I guess... |
I am not sure if we should switch from Ubuntu or not. Quick vote of hands - is there any preference to one or the other to you? |
If we can move over flawlessly and everything remains the same, I'm in vote
of moving to raspbian since its easier to use tools everyone is familiar
with like raspi-config etc. Ubuntu is lacking in that aspect.
… Message ID: ***@***.***>
|
As we see, RaspberryPi OS have better hardware support - correctly working V4L2 M2M is an example. My question was about building a copy of FFmpeg just for HLS on OS image build time. Will it be OK? |
It would make user-support much easier if the two distros were the same. No need for different guides or constant questions of which OS you installed before helping people. |
Created pull request #784 |
Ok, based on this and a few other similar answers I will move the 64bit build to use the rpi image. |
Ok! Does the 64-bit image work on 32-bit Pis? if it does then you could just use one image, no need for 2. |
No, 64bit image works on RPi 3+ and Zero 2+. |
64bit can only work on devices that can execute arm64bit instruction set. That means it will not run on Rpi1, zero 2, and 3, 1A+ etc |
Ok that's a small bummer. IMO tho, you shouldn't be using OctoPrint on a pi 1 or similar, the performance would be basically unusable. Yeah, you could just keep 2 images around then. |
@chudsaviet Does compiling ffmpeg from source work on Ubuntu too? I currently still have that installed. |
@chudsaviet Could you confirm if your ffmpeg version is above 5.0? I'm going to try compiling from source on my ubuntu image, hopefully I can get hardware encoding working too. If so, it could be possible to just stick with using ubuntu for the 64-bit image. |
Yes, of course, you can easily build FFmpeg from ‘master’ branch on Ubuntu. Its newer than any released version. Just use https://github.com/FFmpeg/FFmpeg . |
But on Ubuntu, I'm not sure you have the same latest kernel as on latest RpiOS. Kernel plays a major role in V4L2 M2M too. |
HLS does not work on arm64 build.
This is the bug to track these issues.
The text was updated successfully, but these errors were encountered: