Closed Noir- closed 1 year ago
Do you have the mediainfo of the file you are trying to transcode ? I've never seen this bug with standard mkv container with h264 video.
Some files where the error occurs:
But I think I also depends on the client whether it is transcoded or not. Maybe it helps with testing if you force transcoding. I'm using DLNA on a WebOS TV but it doesn't work with the web interface in Chromium as well. There was no such Issue with these files before I upgraded from 10.5.3 (I recently upgraded my NixOS from 19.09 to 20.03).
Hello, I tested a bit on my end, and can't reproduce your failure on Jellyfin 10.6.3:
Here's how I tested:
jellyfin.nix
test to disable the firewall and install ffmpeg-full
as a system packagenix build -L -f ./nixos/tests/jellyfin.nix driver
QEMU_NET_OPTS=hostfwd=tcp::8096-:8096 ./result/bin/nixos-run-vms
mkdir /tmp/medias
cd /tmp/medias
ffmpeg -f lavfi -i testsrc=duration=10 -f lavfi -i anoisesrc=duration=10 -c:v h264 -c:a ac3 test.mkv
Then went through the jellyfin configuration wizard and tried playing on both Firefox and Chromium (both worked).
I tried creating the xvid case, but ffmpeg segfaults with libxvid (I should investigate that).
Also the screenshot of jellyfin's media info for good measure.
@Noir- can you confirm this is the same format as the one that fails on your end? Could you try adding the same test.mkv
to your instance and see if it works?
Also, do you have any particular transcoding options?
Here are the options that I have on a fresh Jellyfin 10.6.3 install.
What I can see is that there's a way older ffmpeg version configured in my installation because I'm on the stable channel: /nix/store/nc7ic78k0zl3b9ar9kcin9pw93lfhwaw-ffmpeg-3.4.7-bin/bin/ffmpeg
Could this be the crucial difference in our installations. I installed Jellyfin from unstable because I needed the fixes in upstream. I included it like this:
let
unstable = import <nixos-unstable> {};
in
{
disabledModules = [ "services/misc/jellyfin.nix" ];
imports =
[
./hardware-configuration.nix
<nixos-unstable/nixos/modules/services/misc/jellyfin.nix>
];
services.jellyfin = {
enable = true;
package = unstable.jellyfin;
};
}
The other transcoding options are identical. Do you know what would be the preferred way to include ffmpeg from the other channel? I'd like to try that before I continue with the other steps you suggested.
I just tried the quick and dirty way: I installed ffmpeg-full from the unstable channel and configured Jellyfin to use it. This fixed all the problems for me. I somehow assumed that the dependencies of unstable packages will be installed from the unstable channel as well. But obviously I was wrong?
From the top of my head, I think you're right actually, ffmpeg
is a dependency of jellyfin
and the path to the binary is passed through a wrapper, so you should have ffmpeg
from unstable.
If you do systemctl cat jellyfin
and then cat <path-of-jellyfin-in-the-systemd-service>
, can you tell me the version of ffmpeg
you see in the wrapper?
The way I installed jellyfin
on my system is this:
{
nixpkgs.overlays = let
unstable = import <nixpkgs-unstable> {};
in [
(self: super: {
inherit (unstable) jellyfin;
})
];
services.jellyfin = {
enable = true;
};
}
and I do have ffmpeg-4.3.1
set in the wrapper.
I can confirm that this is the same on my system:
#! /nix/store/6737cq9nvp4k5r70qcgf61004r0l2g3v-bash-4.4-p23/bin/bash -e
export LD_LIBRARY_PATH='/nix/store/f7lws879jarjs40qznw95pwz4ngc7ib0-sqlite-3.32.3/lib:/nix/store/n9n570xdj4gnza8yp1vkgqlidadcwkbj-fontconfig-2.13.92-lib/lib:/nix/store/6nlkl2jqywpyxwk7c8il8kr5d3fkplpz-freetype-2.10.2/lib:/nix/store/v589pqjhvxrj73g3r0xb41yr84z5pwb7-gcc-9.3.0-lib/lib:/nix/store/q2wwkkllkcn8pzai29z10m4m18gklmyn-jellyfin-10.6.3/opt/jellyfin/runtimes/linux-x64/native/'${LD_LIBRARY_PATH:+':'}$LD_LIBRARY_PATH
exec "/nix/store/3d12d60dixhlx29vqqb38y29abb77ii6-aspnetcore-runtime-3.1.5/bin/dotnet" /nix/store/q2wwkkllkcn8pzai29z10m4m18gklmyn-jellyfin-10.6.3/opt/jellyfin/jellyfin.dll --ffmpeg /nix/store/1xhddl3lgy36hycz7ch2xs2jkkrw06zz-ffmpeg-4.3.1-bin/bin/ffmpeg "$@"
Weird stuff. My guess is that the application config overwrites the command line flag. I never touched this value until now. Feels a bit counter intuitive because it should be the other way around. On the other hand I also can't imagine that this behavior worked well with NixOS in the past, unless it was introduced in a recent change. I'll have a look at the source.
Ah, I was having the same problem. Clearing the ffmpeg field fixed it. However it appeared to get repopulated the next time I started jellyfin. I wonder if we will need some way to fix that field. Maybe needs a patch.
I'm encountering the same issue, how could I solve this, do I need to install ffmpeg-full
from the unstable NixOS repo ?
@AkechiShiro according to the previous messages, going into the settings on the web interface, under Playback, FFmpeg path, clearing the field and restarting the server solved the issue for them. Does it work for you?
Hi @minijackson I'm using Jellyfin version 10.7.1 and there is no FFmpeg path in the web interface however, I did found a way to fix it, I followed instruction given in issue #103218 and I found out that the hash path used by jellyfin was different from the path set inside /var/lib/jellyfin/config/encoding.xml
in the tag <EncoderAppPath>/nix/store/path-to-old-derivation-of-ffmpeg/ffmpeg<EncoderAppPath>
And also <EncoderAppPathDisplay>/nix/store/path-to-old-derivation-of-ffmpeg/ffmpeg<EncoderAppPathDisplay>
, after changing these values I did a systemctl restart jellyfin
and that fixed the problem.
@AkechiShiro a more future-proof fix would be to use /run/current-system/sw/bin/ffmpeg
as the FFmpeg path
Assuming that ffmpeg is globally installed that is.
@kevincox I believe the services.jellyfin
option installs ffmpeg
globally -- I'm using a volatile, single-purpose container config and didn't specify ffmpeg
explicitly.
Thanks for the recommendation @Thesola10, will definitely try this out !
@Thesola10 I checked actually and ffmpeg
is not installed globally, @kevincox's comment is relevant to me, even with services.jellyfin
being enabled.
The path /run/current-system/sw/bin/ffmpeg
returns no such file or directory
.
> which ffmpeg
/home/user/.nix-profile/ffmpeg
Or am I missing something very dumb ?
I think this can be closed, see https://github.com/NixOS/nixpkgs/issues/178123#issuecomment-1159814884.
Describe the bug If Jellyfin tries to transcode certain media using ffmpeg it fails because of a faulty dependency regarding libm and glibc. This prevents any playback.
To Reproduce I'm not sure which kind of media triggers this bug. This is the ffmpeg log of a failed transcode:
Additional context Since Jellyfin 10.6.3 is not in the nixos-unstable channel yet, I manually patched the derivation to make it build.
Notify maintainers @nyanloutre @minijackson
Metadata
"x86_64-linux"
Linux 5.4.60, NixOS, 20.03.2839.0c59c1296b2 (Markhor)
yes
yes
nix-env (Nix) 2.3.6
"nixos-unstable-20.09pre239318.c59ea8b8a0e, nixos-20.03.2839.0c59c1296b2"
/nix/var/nix/profiles/per-user/root/channels/nixos