-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
ffmpeg-omx #82
Comments
I've not had success getting that to work. #62 (comment) I didn't have a real rstp stream to test with, so it might work for you. My
version: '2'
services:
homebridge:
image: oznu/homebridge:debian-raspberry-pi
restart: always
network_mode: host
privileged: true
devices:
- /dev/vchiq:/dev/vchiq
volumes:
- ./config:/homebridge
environment:
- PGID=1000
- PUID=1000
- HOMEBRIDGE_CONFIG_UI=1
- HOMEBRIDGE_CONFIG_UI_PORT=8080
Then edit the You can also edit the Add this to the bottom: . /etc/os-release
if [ "$ID" = "debian" ]; then
[ -f /homebridge/ffmpeg.deb ] || wget goo.gl/gMGA81 -O ffmpeg.deb
[ -e /usr/local/bin/ffmpeg ] || dpkg -i ffmpeg.deb
usermod -aG video abc
fi Then restart the entire container
or in the config-ui-x plugin: Docker Menu Icon > Restart Container. Then install the As I said, I have not been able to get this to work, but I suspect it may be because I was using a sample rstp stream I found on the internet. If this works for you please let me know. |
As a sanity check: is homebridge running as abc in the container? Or root? |
Homebridge runs as |
yeah... it took me WAY too long to realize you had a debian-pi container... 😄 thanks for shepherding this newb. i definitely had it running outside a container before, so ill keep this thread updated. |
Hi, when I want to use ffmpeg on my version I run apk add --no-cache ffmpeg ffmpeg-libs. When I enable audio I receive the following error: _ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers libavutil 55. 78.100 / 55. 78.100 Guessed Channel Layout for Input Stream #0.1 : mono
Duration: N/A, start: 0.000000, bitrate: N/A Unknown encoder 'libfdk_aac' [2018-3-14 16:03:25] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1_ Do you have a clue ? thanks again, |
As a side note. Got this running in the container. So now I’m just trying out different plugins. The multi-stream seems promising. |
And yap. Definitely did not run the Alpine version. The Debian seems the best pick for raspberry pi. Don’t ask me why 😉 |
Good to hear you got it working @drewcovi. Were the instructions I posted above all that was required to get the omx version running? @Itsmmai @Jeff146 - Your issue is different I think. I've got a cheap Xiaomi camera enroute, once it arrives I'll be able to write up a definitive how-to guide on ffmpeg and this docker image. |
@Jeff146 - The suggestion above won't work. ffmpeg needs to be compiled with aac support. |
@oznu Ok thanks looking forward to it. I got the video to load but the audio I get the exit code of 1. I'm thinking because the docker image doesn't have libfdk_aac and it's not included in the ffmpeg and that's why it's not working for us. |
Yeah, the homebridge-camera-ffmpeg repo says this:
Neither debian or alpine linux provide ffmpeg with this flag as part of their default repos. |
I'm using the Docker with Synology and the Alpine Linux image, so is there an easy way to change it to enable libfdk-aac? |
See #82 (comment) |
@oznu that worked for me, now I just have to adjust to optimize the packet size, is there a recommended one to try, I tried 188 and it seems to be better for the video but audio still a little choppy |
Hi Jeff. Wat camera and plugin are you using?
Kind regards,
Ab Helversteijn-Smit
…On 20 Mar 2018, 21:20 +0100, Jeff146 ***@***.***>, wrote:
@oznu that worked for me, now I just have to adjust to optimize the packet size, is there a recommended one to try, I tried 188 and it seems to be better for the video but audio still a little choppy
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@Itsmmai I have a Foscam FI9816 and the plug-in is homebridge-camera-ffmpeg |
@Itsmmai - if you run If you're still using homebridge-config-ui-x you can access the container terminal by clicking Docker Menu > Terminal. If the
Make sure you're running the latest version of this image as well, the update I pushed 10 days ago fixed some issues installing ffmpeg. |
Reloading the latest docker file did the trick. So now it works. My only problem now is that the recordings/video are not smooth and stops after a couple of seconds. But that is not your problem :-) |
@oznu Hi, I've used your compiled address to run successfully in the docker container homebridge sh command. Do I want to install homebridge-camera-ffmpeg-omx or homebridge-camera-ffmpeg again next, do you need to install the 2 plug-ins? |
Hi @1043717432 , The From the readme:
https://github.com/KhaosT/homebridge-camera-ffmpeg I would start by just trying to get the |
Did you guys manage to build the ffmpeg with omx on alpine or only use the debian package from someone else? This is what I got so far:
Which will fail:
|
I'd like to eventually include a build of ffmpeg that includes The current arm builds are done using Travis CI + QEMU and are already getting very close to 50 minute maximum job runtime allowed (QEMU is slow). Adding |
which is a better setup to run FFmpeg, Alpine or Debian container? FFmpeg or FFmpeg OMX? Currently have FFmpeg setup in an Alpine container, very slow on RPI3... #42 |
ffmpeg with omx should speed things up when running on a rPI. Operating system shouldn't matter. I haven't tested if this works in practice inside the docker container yet. |
I manage to follow your instructions and got it working on a Debian build container in a Raspberry Pi3. The still stream works with an update at every 12 seconds, however, live streaming doesn't. Homebridge Config
DOCKER YMAL
LOG FILES
|
I got a camera to test this with a month or two back. I have spent many hours compiling ffmpeg on a rPi 3 with the different options, including I think the solution here is, if you need omx support, then you'll need to run homebridge natively. |
running inside or outside of docker doesn't make a difference. You can run with
Tricky part for me was to be able to compile it for alpine, and a solution for not having to run with privileged permissions (in kubernetes) |
How do you go about doing your way? I don’t mind trying since I have the rig setup up. Just wondering, has anyone tried the VLC approach, replacement to ffmpeg? |
Was wondering if the ffmpeg package changed? I suddenly have the same issue, I made sure I was on the lastest docker and ran the commands and the same issue. Anyone else have issues? |
@jeylites see my previous comment if you mean how I was trying to build it for alpine |
@balboah @oznu I'm not sure if your docker build is using "systemd" but if you have some time to verify the findings, it will be a great leap. On another note, Snapshot refreshes every 11seconds on a docker build, while 60 seconds on homebridge native on cell network. On wifi 10-11 sec for both build... |
@oznu Was that package changed by any chance? I've removed and installed it as instructed, but it still doesn't show it as having --enable-libfdk-aac in the flags. (Running in alpine docker) |
After a lot of messing around as all pre-build packages don't support fdk-aac (libaac), and the package linked above doesn't work either unfortunately, I manually compiled with the following commands (first get the latest ffmpeg build from their site (https://www.ffmpeg.org/download.html) and unpack it in your alpine docker). It might be backwards or a stupid way of going about it, but I was toying around and this worked hehe. So for anyone who needs it to have audio support on their FFMPEG camera stream, here's the commands I ran from the unpacked ffmpeg folder:
And there you have it, audio can now be set to true. |
I was encountering this issue myself, running an alpine docker-homebridge based image on Synology. To resolve the issue I built a new docker image based on oznu/docker-homebridge with FFmpeg copied from alfg/ffmpeg. See https://hub.docker.com/r/nicholasrobinson/ffmpeg-homebridge or https://www.github.com/nicholasrobinson/ffmpeg-homebridge for more details. To get the fix on Synology, just stop your existing homebridge container and replace it with |
There is a good working solution to run ffmpeg in Docker with almost no performance impact - use stream copy without re-encoding (Xiaomi streams in H264, so can be easily viewed on Apple devices without it): |
Will you be so kind to provide the updated version of ffmpeg with aac support? |
I would like to try out your version. Can you please send me the instruction link? Thank you. |
Everything in this topic.
|
Was anyone able to get aac working? |
Works like a charme.
Van: black01gt <notifications@github.com>
Beantwoorden - Aan: oznu/docker-homebridge <reply@reply.github.com>
Datum: zaterdag 11 januari 2020 om 22:37
Aan: oznu/docker-homebridge <docker-homebridge@noreply.github.com>
CC: Ab Helversteijn-Smit <ab@helversteijn-smit.nl>, Mention <mention@noreply.github.com>
Onderwerp: Re: [oznu/docker-homebridge] ffmpeg-omx (#82)
Was anyone able to get aaa working?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#82>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF37T4UZZBE3FDY2B2VDFXTQ5I3YVANCNFSM4EVHPA6Q>.
|
I tried these steps but am not getting --enable-libfdk-aac |
BEFORE:
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (Alpine 9.2.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
AFTER:
apk del ffmpeg ffmpeg-libs
apk --allow-untrusted add --no-cache --repository http://alpine.dl.oz.nu/ffmpeg ffmpeg ffmpeg-libs
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.0 (Alpine 9.2.0)
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping --disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Van: black01gt <notifications@github.com>
Beantwoorden - Aan: oznu/docker-homebridge <reply@reply.github.com>
Datum: dinsdag 14 januari 2020 om 02:10
Aan: oznu/docker-homebridge <docker-homebridge@noreply.github.com>
CC: Ab Helversteijn-Smit <ab@helversteijn-smit.nl>, Mention <mention@noreply.github.com>
Onderwerp: Re: [oznu/docker-homebridge] ffmpeg-omx (#82)
@Itsmmai<https://github.com/Itsmmai> - if you run ffmpeg inside the container, what is the output?
If you're still using homebridge-config-ui-x you can access the container terminal by clicking Docker Menu > Terminal.
If the --enable-libfdk-aac flag is not show please try running these two command again manually:
apk del ffmpeg ffmpeg-libs
apk --allow-untrusted add --no-cache --repository http://alpine.dl.oz.nu/ffmpeg ffmpeg ffmpeg-libs
Make sure you're running the latest version of this image as well, the update I pushed 10 days ago fixed some issues installing ffmpeg.
I tried these steps but am not getting --enable-libfdk-aac
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#82>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF37T4VEYB7RB2LIPDVM7ALQ5UGHXANCNFSM4EVHPA6Q>.
|
Thanks this worked for me. |
Not sure what to do now. Copy/paste doesn’t work for me 😊
Van: black01gt <notifications@github.com>
Beantwoorden - Aan: oznu/docker-homebridge <reply@reply.github.com>
Datum: dinsdag 14 januari 2020 om 15:39
Aan: oznu/docker-homebridge <docker-homebridge@noreply.github.com>
CC: Ab Helversteijn-Smit <ab@helversteijn-smit.nl>, Mention <mention@noreply.github.com>
Onderwerp: Re: [oznu/docker-homebridge] ffmpeg-omx (#82)
After a lot of messing around as all pre-build packages don't support fdk-aac (libaac), and the package linked above doesn't work either unfortunately, I manually compiled with the following commands (first get the latest ffmpeg build from their site and unpack it in your alpine docker). It might be backwards or a stupid way of going about it, but I was toying around and this worked hehe. So for anyone who needs it to have audio support on their FFMPEG camera stream, here's the commands I ran from the unpacked ffmpeg folder:
apk add yasm gnutls gnutls-dev gcc lame lame-dev opus opus-dev libtheora libtheora-dev libass libass-dev libvorbis libvorbis-dev libvpx libvpx-dev x265 x265-dev x264 x264-dev xvidcore xvidcore-dev v4l-utils-libs libxcb libxcb-dev v4l-utils-dev libva libva-dev libvdpau libvdpau-dev
apk add fdk-aac fdk-aac-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
./configure --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-l
ibxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --disable-stripping
…--disable-static --disable-librtmp --enable-vaapi --enable-vdpau --enable-libopus --disable-debug --enable-libfdk-aac --enable-nonfree
make
make install
And there you have it, audio can now be set to true.
Thanks this worked for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#82>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF37T4RLWYYQMQMPC433FA3Q5XFCHANCNFSM4EVHPA6Q>.
|
This worked for me. Thank you!! Note: careful with the copy/paste of the super long
|
For me it don’t work... cannot find ./configure (sh: ./configure: not found) tried to run after start and inside: Docker Container startup.sh
I still use (but with no sound):
apk --allow-untrusted add --no-cache --repository http://alpine.dl.oz.nu/ffmpeg ffmpeg ffmpeg-libs
|
@oznu I am getting the following error. Is the repository still available? |
Sorry doesn't work for me but maybe because I'm on a NUC and not on a PI ? |
Good news.
|
That is great but what if it still isn't working :-( ... I'm using a Intel NUC and the ozone docker :-( |
@Itsmmai It won't be able to find configure if you haven't downloaded ffmpeg yet. |
https://github.com/legotheboss/homebridge-camera-ffmpeg-omx (and pretty much any camera plugin) would likely require ffmpeg.
Any chance this could get a pi release with this ffmpeg optimized for raspberry pi? https://github.com/legotheboss/YouTube-files/raw/master/ffmpeg_3.1.4-1_armhf.deb
The text was updated successfully, but these errors were encountered: