muller_md 4 Posted April 18, 2022 Posted April 18, 2022 (edited) I know it's a topic does not appeal to the masses, and is likely lacks proper implementation on the Emby server side. But I still want to share it, and potentially help someone to achieve the same. This was all done on the Arch linux host system. So long strory short, I was able to get the full BluRay backup folders and ISOs to play with Emby including transcoding and remuxing playback. It only plays the main playlist, but techically it's possible to extend the playback (if plugin intrastructure would allow) to play also other playlists. First of all I've created a folder to store the entire dynamic FFmpeg version, with libs and bins from the host system. FFmpeg is built with most codecs and hw features anyway, and in addition with libbluray. mkdir -p /opt/ffmpeg/{bin,lib} ldd /usr/bin/ffprobe | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /opt/ffmpeg/lib/ ldd /usr/bin/ffmpeg | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /opt/ffmpeg/lib/ cp /usr/bin/ffprobe /opt/ffmpeg/bin/ffprobe.real cp /usr/bin/ffmpeg /opt/ffmpeg/bin/ffmpeg.real Create a shell script that would redirect the ffmpeg/ffprobe calls into the real binary after replacing the s/file:/bluray:/g protocols , based on the filename and store it as /opt/ffmpeg/bin/ffmpeg and /opt/ffmpeg/bin/ffprobe: #!/bin/sh BASE=$(basename $0) DIR=$(dirname $0) DIR=$(realpath "$DIR"/..) LD_LIBRARY_PATH=${DIR}/lib:/lib _ARGS="" while [[ $# -gt 0 ]]; do case $1 in -i|--input) _ARGS="${_ARGS} $1" INPUT="$2" if echo "${INPUT}" | grep -Eq "\.BluRay[-.]?"; then INPUT=${INPUT#file:} INPUT="bluray:${INPUT}" fi _ARGS="${_ARGS} ${INPUT}" shift shift ;; *) _ARGS="${_ARGS} $1" shift ;; esac done set -- ${_ARGS} exec ${DIR}/lib/ld-linux-x86-64.so.2 ${DIR}/bin/${BASE}.real "$@" Now to fool the Emby docker image into using the prepared ffmpeg version I had to replace the "run" script from the docker image by bind mounting a local folder with the same scripts, if using the docker compose method for managing Emby, it would look something like: version: "2.3" services: emby: image: emby/embyserver:beta container_name: embyserver ... volumes: - /etc/docker/compose/emby/services.d:/etc/services.d # service override - /opt/ffmpeg:/ffmpeg And the "/etc/docker/compose/emby/services.d" script, to feed our local custom version of ffmpeg: cat /etc/docker/compose/emby/services.d/emby-server/run #!/usr/bin/with-contenv sh if [ "$(ls -nd /config | tr -s '[:space:]' | cut -d' ' -f3)" -ne "$UID" ] || [ "$(ls -nd /config | tr -s '[:space:]' | cut -d' ' -f4)" -ne "$GID" ]; then chown "$UID":"$GID" -R /config fi if uname -a | grep -q synology; then s6-applyuidgid -U /system/EmbyServer \ -programdata /config \ -ffdetect /bin/ffdetect \ -ffmpeg /ffmpeg/bin/ffmpeg \ -ffprobe /ffmpeg/bin/ffprobe \ -ignore_vaapi_enabled_flag \ -restartexitcode 3 else s6-applyuidgid -U /system/EmbyServer \ -programdata /config \ -ffdetect /bin/ffdetect \ -ffmpeg /ffmpeg/bin/ffmpeg \ -ffprobe /ffmpeg/bin/ffprobe \ -restartexitcode 3 fi As a last step it was necessary to uninstall the BluRay plugin, so that Emby would stop failing on UHD BDMV folders. And voila: Edited April 18, 2022 by muller_md
Luke 42078 Posted April 18, 2022 Posted April 18, 2022 Hi, neat trick although I wouldn't suggest replacing the server's ffmpeg build as that will cause other problems.
muller_md 4 Posted April 18, 2022 Author Posted April 18, 2022 (edited) 2 hours ago, Luke said: Hi, neat trick although I wouldn't suggest replacing the server's ffmpeg build as that will cause other problems. Unfortunately had to use this trick to replace ffmpeg in the image, as the version bundled isn't built with libbluray. Building it into the image would make the Emby Bluray plugin obsolete. Edited April 18, 2022 by muller_md
Waffull 2 Posted April 26, 2022 Posted April 26, 2022 Is playing of blurays every going to be fully supported? Many of us have a lot of blurays and not being able to play them through emby is a real hassle .. It means I have to keep and maintain a version of plex also. Not fun as plex has become such a commercial product, it's awful. But it has some basic features, like bluray playback, that are a must for any media server. Thanks.
Luke 42078 Posted April 26, 2022 Posted April 26, 2022 38 minutes ago, Waffull said: Is playing of blurays every going to be fully supported? Many of us have a lot of blurays and not being able to play them through emby is a real hassle .. It means I have to keep and maintain a version of plex also. Not fun as plex has become such a commercial product, it's awful. But it has some basic features, like bluray playback, that are a must for any media server. Thanks. Plex does not support playing bluray iso or bluray folders. Perhaps you mean a bluray that's been ripped to mkv, which we support playing.
Waffull 2 Posted April 26, 2022 Posted April 26, 2022 19 minutes ago, Luke said: Plex does not support playing bluray iso or bluray folders. Perhaps you mean a bluray that's been ripped to mkv, which we support playing. Nope... Plex has no problems taking a BDMV folder and playing the different streams. They aren't labelled well and finding the primary stream isn't always easy... But I've been playing BD's this way for... gee, how time flies... at least 10 year now.
Luke 42078 Posted April 26, 2022 Posted April 26, 2022 14 minutes ago, Waffull said: Nope... Plex has no problems taking a BDMV folder and playing the different streams. They aren't labelled well and finding the primary stream isn't always easy... But I've been playing BD's this way for... gee, how time flies... at least 10 year now. Maybe if it only has a single m2ts, which we have no problem with either, but it says right in their help articles that bdmv folders aren't supported.
ebr 16184 Posted April 26, 2022 Posted April 26, 2022 9 hours ago, Waffull said: Is playing of blurays every going to be fully supported? As a completely honest answer - probably not. It simply doesn't make sense for us to expend the resources on building and maintaining this.
Raptor6L 29 Posted February 26, 2025 Posted February 26, 2025 (edited) Sorry to bump an old thread, but does this mean if I have a BluRay drive attached to my Server, I cannot play a blu ray disc directly through Emby? It has to be ripped to a folder? I've never needed to before but I just yesterday uncovered my largish bluray disc collection and found a few that I hadn't seen in a while. Edited February 26, 2025 by Raptor6L
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now