jshridha / docker-blueiris

Blueiris in a docker using wine!
Apache License 2.0
106 stars 52 forks source link

H265 Encoder missing #49

Open w84no1 opened 3 years ago

w84no1 commented 3 years ago

When I try to record with a h.265 camera I get this in the log. Clip: H265 Encoder Missing even if I have direct to disk enabled.

Is there anyway to add the encoder?

If I switch the camera back to h.246 it works fine, but takes up a lot of space with my 4K camera.

wasiman81 commented 3 years ago

I confirm the same issue for me. I am not an expert on WINE, but I tried to install the klite-codec-pack with no success. What I did was logging into the container console, wget https://files3.codecguide.com/K-Lite_Codec_Pack_1612_Basic.exe wine explorer /desktop=MyApp,800x600 K-Lite_Codec_Pack_1612_Basic.exe

Then in the VNC session already open from BlueIris I could successfully complete the installation wizard. But as said, I still get the same error message on the missing codec.

Somebody has an idea?

davewatson91 commented 3 years ago

Also same issue for myself - fresh install just now.

allflame commented 2 years ago

This is the issue with wine/winetrick installation being outdated. You can basically replicate the Dockerfile steps with the newer wine version, it should work fine

Edit: Another possibility to this problem is that if you're running this particular image, you are running 32bit variation of wine in it and you should just add 32bit version of h265 libraries to your docker system. apt-get install libde265-0:i386 or something similar

lightheaded commented 2 years ago

Same issue here. Has anyone managed to resolve it? I just did a fresh run with the most recent image.

CalebFenton commented 2 years ago

I started getting this error when I enabled hardware encoding with my nvidia GPU. Blue Iris detects it but encoding fails, even if I install drivers on the linux host. Maybe I need to install them on wine as well? I "solved" the problem by disabling hardware acceleration and making sure my cameras were sending h264 or h265. I'm also using substreams.

I tried (unsuccessfully) to install every possible codec or library, so on the docker host that was:

RUN \
    apt update && \
    apt -y install ubuntu-restricted-extras gstreamer1.0-libav \
      libavcodec58 libdvdnav4 gstreamer1.0-plugins-bad \
      gstreamer1.0-plugins-ugly libdvd-pkg && \
    apt clean

RUN \
    apt update && \
    apt -y install nvidia-driver-460 && \
    apt clean

And I installed the k-lite codec pack. Nothing helped. Direct recording should just save the file if the stream is h264/5 unless you're doing something that tirggers a re-encode.

CalebFenton commented 2 years ago

After many months, I got nvidia GPU hardware acceleration working and enabled h256 on all my cameras :)

The key was using VirtualGL and Nvidia's CUDA image as the base.

https://github.com/CalebFenton/docker-blueiris/blob/master/docker/blueiris/Dockerfile#L52 shows how to install VirtualGL

https://github.com/CalebFenton/docker-blueiris/blob/master/docker/blueiris/supervisord.conf#L10 shows how to run Xvfb

Note you'll need to disable shared memory or you'll get crashes: https://github.com/CalebFenton/docker-blueiris/blob/master/docker/blueiris/Dockerfile#L9

I apologize for not offering a PR since I forked this a while back and the code bases have diverged too much. Many thanks to @jshridha for showing the way and saving me many hours of work.

CalebFenton commented 2 years ago

Also many thanks to https://github.com/ehfd/docker-nvidia-egl-desktop for showing it's possible to have a full wine desktop with hardware acceleration running in a docker container. I borrowed many ideas from here.