From 9cff157b47d7cb9da6c45e9c0bfbafc188d4a2a0 Mon Sep 17 00:00:00 2001 From: Lawrence curtis Date: Mon, 9 Sep 2024 19:55:47 +0100 Subject: [PATCH 1/5] New dockermod for ffmpeg7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ve called this experimental because it’s had its first official jellyfin release so it’s time --- DockerMods/FFmpeg7-experimental.sh | 89 ++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 DockerMods/FFmpeg7-experimental.sh diff --git a/DockerMods/FFmpeg7-experimental.sh b/DockerMods/FFmpeg7-experimental.sh new file mode 100644 index 0000000..2f1d851 --- /dev/null +++ b/DockerMods/FFmpeg7-experimental.sh @@ -0,0 +1,89 @@ +# ---------------------------------------------------------------------------------------------------- +# Name: FFmpeg7-experimental +# Description: FFmpeg7 is an experimental build, currently you can only install either FFmpeg6 or FFmpeg7 +# Author: John Andrews / Lawrence +# Revision: 1 +# Icon: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwMDAgMjAwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6bm9uZTtzdHJva2U6IzM3OEU0MztzdHJva2Utd2lkdGg6MzAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo4O30NCjwvc3R5bGU+DQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1LDUpIj4NCgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTY2LjcsMTY2LjdoNTUyLjJMMTY2LjcsNzE4Ljl2NTUyLjJMMTI3MS4xLDE2Ni43aDU1Mi4yTDE2Ni43LDE4MjMuM2g1NTIuMkwxODIzLjMsNzE4Ljl2NTUyLjJsLTU1Mi4yLDU1Mi4yDQoJCWg1NTIuMiIvPg0KPC9nPg0KPC9zdmc+DQo= +# ---------------------------------------------------------------------------------------------------- + +#!/bin/bash + +# Function to handle errors +function handle_error { + echo "An error occurred. Exiting..." + exit 1 +} + +# Check if the --uninstall option is provided +if [ "$1" == "--uninstall" ]; then + echo "Uninstalling FFmpeg and removing Jellyfin repository..." + # Remove symbolic links + rm -f /usr/local/bin/ffmpeg + rm -f /usr/local/bin/ffprobe + + # Uninstall Jellyfin FFmpeg + if apt-get remove --purge -y jellyfin-ffmpeg7; then + echo "Jellyfin FFmpeg successfully uninstalled." + else + handle_error + fi + + # Remove Jellyfin repository + rm -f /etc/apt/sources.list.d/jellyfin.list + + # Remove Jellyfin GPG key + gpg --keyring /etc/apt/trusted.gpg.d/debian-jellyfin.gpg --batch --yes --delete-key "$(gpg --list-keys --keyring /etc/apt/trusted.gpg.d/debian-jellyfin.gpg --batch | grep -B 1 'Jellyfin Team' | head -n 1 | awk '{print $1}')" + rm -f "/etc/apt/trusted.gpg.d/debian-jellyfin.gpg" + rm -f "/etc/apt/trusted.gpg.d/debian-jellyfin.gpg~" + + # Update package lists + if ! apt-get update; then + handle_error + fi + + echo "Uninstallation complete." + exit 0 +fi + +# Check if FFmpeg is installed +if command -v ffmpeg &>/dev/null; then + echo "FFmpeg is already installed." + exit 0 +fi + +architecture=$(uname -m) +echo "Architecture: $architecture" + +if [ "$architecture" != "x86_64" ] && [ "$architecture" != "armv7l" ] && [ "$architecture" != "aarch64" ] && [[ ! "$architecture" =~ [Aa][Rr][Mm] ]]; then + echo "The architecture is not recognized as AMD or ARM: $architecture." + exit 1 +fi + +echo "The architecture is recognized." + +# Add Jellyfin GPG key with a timeout of 15 seconds +if ! curl -m 15 -fsSL https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/debian-jellyfin.gpg; then + handle_error +fi + +# Add Jellyfin repository +os_id=$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) +os_codename=$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release) +echo "deb [arch=$(dpkg --print-architecture)] https://repo.jellyfin.org/$os_id $os_codename main" | tee /etc/apt/sources.list.d/jellyfin.list + +# Update package lists again +if ! apt-get update; then + handle_error +fi + +# Install Jellyfin FFmpeg +if ! apt-get install --no-install-recommends --no-install-suggests -y jellyfin-ffmpeg7; then + handle_error +fi + +# Create symbolic links +ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg +ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/local/bin/ffprobe + +echo "FFmpeg installation and setup complete." +exit 0 From 984f71489532dccf0db8ee7bebdf3536ae74b5bf Mon Sep 17 00:00:00 2001 From: Automated Date: Tue, 10 Sep 2024 05:10:04 +0000 Subject: [PATCH 2/5] Auto repo.json --- docker-mods.json | 9 +++++++++ repo.json | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/docker-mods.json b/docker-mods.json index cb13dc2..1c3b6cf 100644 --- a/docker-mods.json +++ b/docker-mods.json @@ -159,5 +159,14 @@ "Icon": "data:image/svg\u002Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgND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MjM2Yy0yLjUyMywwLTUsMS44NjItNSw0LjM3N3Y4LjU4NmMwLDIuNDM5LDEuNzU5LDQuMjYzLDQuMjE4LDQuNjcyQzE5LjcxOSw0Mi42NDEsMjEuNTM2LDQzLjAwNiwyMy4wNzgsNDN6IE0yOC4wNjMsMzljLTAuODIxLDAtMS41LTAuNjc3LTEuNS0xLjUwMmMwLTAuODMzLDAuNjc5LTEuNDk4LDEuNS0xLjQ5OGMwLjgzNywwLDEuNSwwLjY2NCwxLjUsMS40OThDMjkuNTYzLDM4LjMyLDI4Ljg5OSwzOSwyOC4wNjMsMzl6Ii8\u002BPC9zdmc\u002B", "FileName": "Python3.sh", "Default": false + }, + { + "Name": "FFmpeg7-experimental", + "Description": "FFmpeg7 is an experimental build, currently you can only install either FFmpeg6 or FFmpeg7", + "Author": "John Andrews / Lawrence", + "Revision": 1, + "Icon": "data:image/svg\u002Bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwMDAgMjAwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6bm9uZTtzdHJva2U6IzM3OEU0MztzdHJva2Utd2lkdGg6MzAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo4O30NCjwvc3R5bGU\u002BDQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1LDUpIj4NCgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTY2LjcsMTY2LjdoNTUyLjJMMTY2LjcsNzE4Ljl2NTUyLjJMMTI3MS4xLDE2Ni43aDU1Mi4yTDE2Ni43LDE4MjMuM2g1NTIuMkwxODIzLjMsNzE4Ljl2NTUyLjJsLTU1Mi4yLDU1Mi4yDQoJCWg1NTIuMiIvPg0KPC9nPg0KPC9zdmc\u002BDQo=", + "FileName": "FFmpeg7-experimental.sh", + "Default": false } ] \ No newline at end of file diff --git a/repo.json b/repo.json index 907f211..253d110 100644 --- a/repo.json +++ b/repo.json @@ -874,6 +874,14 @@ "Revision": 3, "Author": "John Andrews", "Icon": "data:image/svg\u002Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNDggNDgiIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiPjxwYXRoIGZpbGw9IiMwMjc3QkQiIGQ9Ik0yNC4wNDcsNWMtMS41NTUsMC4wMDUtMi42MzMsMC4xNDItMy45MzYsMC4zNjdjLTMuODQ4LDAuNjctNC41NDksMi4wNzctNC41NDksNC42N1YxNGg5djJIMTUuMjJoLTQuMzVjLTIuNjM2LDAtNC45NDMsMS4yNDItNS42NzQsNC4yMTljLTAuODI2LDMuNDE3LTAuODYzLDUuNTU3LDAsOS4xMjVDNS44NTEsMzIuMDA1LDcuMjk0LDM0LDkuOTMxLDM0aDMuNjMydi01LjEwNGMwLTIuOTY2LDIuNjg2LTUuODk2LDUuNzY0LTUuODk2aDcuMjM2YzIuNTIzLDAsNS0xLjg2Miw1LTQuMzc3di04LjU4NmMwLTIuNDM5LTEuNzU5LTQuMjYzLTQuMjE4LTQuNjcyQzI3LjQwNiw1LjM1OSwyNS41ODksNC45OTQsMjQuMDQ3LDV6IE0xOS4wNjMsOWMwLjgyMSwwLDEuNSwwLjY3NywxLjUsMS41MDJjMCwwLjgzMy0wLjY3OSwxLjQ5OC0xLjUsMS40OThjLTAuODM3LDAtMS41LTAuNjY0LTEuNS0xLjQ5OEMxNy41NjMsOS42OCwxOC4yMjYsOSwxOS4wNjMsOXoiLz48cGF0aCBmaWxsPSIjRkZDMTA3IiBkPSJNMjMuMDc4LDQzYzEuNTU1LTAuMDA1LDIuNjMzLTAuMTQyLDMuOTM2LTAuMzY3YzMuODQ4LTAuNjcsNC41NDktMi4wNzcsNC41NDktNC42N1YzNGgtOXYtMmg5LjM0M2g0LjM1YzIuNjM2LDAsNC45NDMtMS4yNDIsNS42NzQtNC4yMTljMC44MjYtMy40MTcsMC44NjMtNS41NTcsMC05LjEyNUM0MS4yNzQsMTUuOTk1LDM5LjgzMSwxNCwzNy4xOTQsMTRoLTMuNjMydjUuMTA0YzAsMi45NjYtMi42ODYsNS44OTYtNS43NjQsNS44OTZoLTcuMjM2Yy0yLjUyMywwLTUsMS44NjItNSw0LjM3N3Y4LjU4NmMwLDIuNDM5LDEuNzU5LDQuMjYzLDQuMjE4LDQuNjcyQzE5LjcxOSw0Mi42NDEsMjEuNTM2LDQzLjAwNiwyMy4wNzgsNDN6IE0yOC4wNjMsMzljLTAuODIxLDAtMS41LTAuNjc3LTEuNS0xLjUwMmMwLTAuODMzLDAuNjc5LTEuNDk4LDEuNS0xLjQ5OGMwLjgzNywwLDEuNSwwLjY2NCwxLjUsMS40OThDMjkuNTYzLDM4LjMyLDI4Ljg5OSwzOSwyOC4wNjMsMzl6Ii8\u002BPC9zdmc\u002B" + }, + { + "Path": "DockerMods/FFmpeg7-experimental.sh", + "Name": "FFmpeg7-experimental", + "Description": "FFmpeg7 is an experimental build, currently you can only install either FFmpeg6 or FFmpeg7", + "Revision": 1, + "Author": "John Andrews / Lawrence", + "Icon": "data:image/svg\u002Bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNi4wLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMDAwIDIwMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwMDAgMjAwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6bm9uZTtzdHJva2U6IzM3OEU0MztzdHJva2Utd2lkdGg6MzAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDo4O30NCjwvc3R5bGU\u002BDQo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1LDUpIj4NCgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTY2LjcsMTY2LjdoNTUyLjJMMTY2LjcsNzE4Ljl2NTUyLjJMMTI3MS4xLDE2Ni43aDU1Mi4yTDE2Ni43LDE4MjMuM2g1NTIuMkwxODIzLjMsNzE4Ljl2NTUyLjJsLTU1Mi4yLDU1Mi4yDQoJCWg1NTIuMiIvPg0KPC9nPg0KPC9zdmc\u002BDQo=" } ] } \ No newline at end of file From 41e9ff85937fdbbbf94ee9edb1d8d26fd4c940e3 Mon Sep 17 00:00:00 2001 From: zedstate <158065963+zedstate@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:01:22 -0400 Subject: [PATCH 3/5] Update Video - Devedse - RunAbAv1.js Existing logic for detecting final VMAF value was incorrect - it was picking up the first VMAF calculated, not the final value. Most likely due to changes in the logging output of ab-av1. This change picks up the final calculated VMAF using a more precise match pattern. --- Scripts/Flow/Video/Video - Devedse - RunAbAv1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js b/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js index bf03912..4bcb7d4 100644 --- a/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js +++ b/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js @@ -93,7 +93,7 @@ function Script(Preset,SvtArguments,Encoder,PixFormat,MinVmaf,MaxEncodedPercent, // Parse the output to find the CRF value let output = executeAbAv1.output; - let crfValueMatch = output.match(/crf (\d+\.?\d*) VMAF.*predicted video stream size/); + let crfValueMatch = output.match(/ab_av1::command::crf_search\] crf (\d+\d) successful/); Logger.ILog('crf: ' + crfValueMatch); if (crfValueMatch && crfValueMatch.length > 1) { let crfValue = crfValueMatch[1]; From e32ad653f212c8c0d2313fec8e3b958a95f18034 Mon Sep 17 00:00:00 2001 From: John Andrews Date: Thu, 12 Sep 2024 12:03:10 +1200 Subject: [PATCH 4/5] Update Video - Devedse - RunAbAv1.js --- Scripts/Flow/Video/Video - Devedse - RunAbAv1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js b/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js index 4bcb7d4..37a4691 100644 --- a/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js +++ b/Scripts/Flow/Video/Video - Devedse - RunAbAv1.js @@ -5,7 +5,7 @@ * Video - Devedse - InstallAbAv1.js * Executes the ab-av1 command. * @author Devedse - * @revision 6 + * @revision 7 * @uid 4b2d95ff-0b20-4be2-b945-e6efd8099feb * @param {string} Preset The preset to use * @param {string} SvtArguments The --svt arguments to pass to AbAv1. Only use if using SVT-AV1 encoder From 4b6b6cb9cf627431ba45f03d95d380f0ab0dff69 Mon Sep 17 00:00:00 2001 From: Automated Date: Thu, 12 Sep 2024 00:03:44 +0000 Subject: [PATCH 5/5] Auto repo.json --- repo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.json b/repo.json index 253d110..8d52393 100644 --- a/repo.json +++ b/repo.json @@ -213,7 +213,7 @@ "Path": "Scripts/Flow/Video/Video - Devedse - RunAbAv1.js", "Name": "Video - Devedse - RunAbAv1", "Description": "Important: This script was made to be ran with the docker version of FileFlows. Results on other platforms may vary.\nPrerequisites:\nVideo - Devedse - InstallFfmpegBtbN.js\nVideo - Devedse - InstallAbAv1.js\nExecutes the ab-av1 command.\n/", - "Revision": 6, + "Revision": 7, "Uid": "4b2d95ff-0b20-4be2-b945-e6efd8099feb" }, {