Giter Club home page Giter Club logo

tdarr_plugins's Introduction

Tdarr_Plugins

Visit the docs for more info: https://docs.tdarr.io/docs/plugins/basics

Development

Make sure NodeJS v16 is installed

Install dependencies:

npm install

Run ESLint:

npm run lint:fix

Check plugins using some extra custom rules:

npm run checkPlugins

Run tests:

npm run test

Steps to write a Tdarr Flow plugin:

  1. Clone this repo
  2. Set env variable pluginsDir to the location of the plugins repo and run Tdarr Server and Node. E.g. export pluginsDir=C:/Tdarr_Plugins
  3. Browse the typescript plugins here https://github.com/HaveAGitGat/Tdarr_Plugins/tree/master/FlowPluginsTs/CommunityFlowPlugins and make edits locally or create a new one locally:
  4. Make sure typescript is intalled with npm i -g typescript then run tsc to compile the changes.
  5. Refresh the browser and Tdarr will pick up the changes

tdarr_plugins's People

Contributors

aunefyren avatar boosh1 avatar controlol avatar dependabot[bot] avatar drpeppershaker avatar enigma0 avatar fish2 avatar haveagitgat avatar jackdallas avatar jarbinks avatar jeff47 avatar jshessen avatar marnalas avatar mdoom23 avatar michpas avatar migz93 avatar mikertoad avatar mntle-dmgd avatar robejo9 avatar schadis avatar stickiebe avatar supersnellehenk avatar tailslide avatar tmchow avatar townsste avatar tws101 avatar vodkapmp avatar wsegatto avatar yodadacoda avatar zachg99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tdarr_plugins's Issues

nvenc plugins incompatible with new encoders

it seems nvenc plugins are incompatible with new encoders

I have tried multiple nvenc plugins e.g Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV they all give the following errors about two pass encoding however I am able to use a simple ffmpeg nvenc plugin which I have created just fine so maybe these plugins need to be updated.

[hevc_nvenc @ 0x557536f6b1c0] InitializeEncoder failed: invalid param (8): Preset P1 to P7 not supported with older 2 Pass RC Modes(CBR_HQ, VBR_HQ) and cbr lowdelayEnable NV_ENC_RC_PARAMS::multiPass flag for two pass encoding and set

Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Bug: Tdarr_Plugin_NIfPZuCLU_2_Pass_Loudnorm_Audio_Normalisation does not function

I see the following error when trying to find the plugin on the Plugins tab using tdarr v2.

Error: Cannot find module 'import-fresh' Require stack: - /app/Tdarr_Server/assets/app/plugins/Community/Tdarr_Plugin_NIfPZuCLU_2_Pass_Loudnorm_Audio_Normalisation.js - /snapshot/tdarr_express_be/src/pluginFuncs.js - /snapshot/tdarr_express_be/src/main.js 1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.

Invalid codec channel detection for Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3

With the file with the following ffprobe output, the plugin Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3 erronously outputs the message ☒ File has surround audio which is not in ac3!

But the file in question doesn't have surround audio not in ac3. It causes an unwanted conversion to ac3 for the audio codec with index 2.

{
  "ffProbeData": {
    "streams": [
      {
        "index": 0,
        "codec_name": "h264",
        "codec_type": "video",
        ...
      },
      {
        "index": 1,
        "codec_name": "ac3",
        "codec_type": "audio",
        "channels": 6,
        "channel_layout": "5.1(side)",
        ...
      },
      {
        "index": 2,
        "codec_name": "aac",
        "codec_type": "audio",
        "channels": 2,
        "channel_layout": "stereo",
        ...
      }
    ]
  },
  "fileMedium": "video"
}

That is because the condition in the plugin's code always check the channels count of the (hardcoded) codec with index 1.

if ( file.ffProbeData.streams[1].channels >= 6 && file.ffProbeData.streams[i].codec_name !== 'ac3' && file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio" ) {
ffmpegCommandInsert += ` -c:a:${audioIdx} ac3 `
hasnonAC3SurroundTrack = true

Plugin request

https://forums.unraid.net/topic/84070-support-haveagitgat-tdarr-audiovideo-library-analytics-transcode-automation/?do=findComment&comment=789469

Can anyone offer advice on creating plugins?

What I want to create seems simple enough.

I want to convert any video file that has surround sound that isn't ac3, aac, or mp3, and transcode to ac3, and copy the rest (video, subtitles, etc).

It's late here and I'll have another crack at it on the weekend, just thought if someone could steer me in the right direction.

tl;dr, I have 10 year old surround sound that doesn't support DD+, DTS-HD, and most other modern surround sound files. As a result, I want to convert my videos with surround sound audio to something that will play on my speakers.

Thanks

Queue not progressing when using Tdarr_Plugin_c0r1_SetDefaultAudioStream

I setup the library with the Tdarr_Plugin_c0r1_SetDefaultAudioStream plugin to select the stereo track in each file. It starts processing and then after 10 or so files the queue count jumps back up to where it started and re-queues the same files over and over again. Like if I have a queue of 1000 items to process, it'll only work on the first 10 files over and over again. It only happens with this plugin.

I turned on verbose logging and captured a section, all files in the log are re-queued after processing. The only plugin selected for the library is the Tdarr_Plugin_c0r1_SetDefaultAudioStream with a value of 2:

log_snippet.txt

Each file contains a stereo track to select as default.

Tdarr_Plugin_MC93_Migz1FFMPEG_CPU

When running the plugin on certain mkv files, I get the error:

x265 [error]: Picture width must be an integer multiple of the specified chroma subsampling

It would be useful it the plugin automatically dealt with this with something along the lines of -vf scale=1280:trunc(outputWidth/aspectRatio/2)*2 so it always scaled it correctly.

Bug: Tdarr_Plugin_henk_Add_Specific_Audio_Codec - doesn't work with files which have 2 or more streams to be converted

This plugin works great, where the input codec only occurs ones in the source file.

It doesn't work well if the input codec occurs more than 1 time. Than correct transcoding doesn't take place.

Example: one file with both DTS-XLL and DTS
Source parameters for plugin: dts
output parameters for plugin: aec3

preset that is being used:
, -c copy -map 0:v -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 eac3 -b:a:1 640k -metadata:s:a:1 title="" -metadata:s:a:1 copyright="henk_asac" -map 0:a:1? -c:a:1 copy -map 0:a:1? -c:a:2 eac3 -b:a:2 640k -metadata:s:a:2 title="" -metadata:s:a:2 copyright="henk_asac"

Outcome file :
First audio: DTS-XLL (no henk copyright flag text)
Second Audio: DTS-XLL ? (with henk copyright flag text) (This codec one was DTS)
Third Audio: EAC3 (with henk copyright flag text)

Expected End result:
4 audiotracks: One file with the same untouched 2 original DTS channels and 2 new ACS channels.

In addition, the end result is also without any embedded subtitles. Could it be that these need to be added to be copied over?

Investigation:
In this situation the present should be a1 to a3 and a2 to a4. and incorrectly it tried to apply a1 to existing a2, giving unexpected outcome.

Hope you can find the time to look at this. It would make this plugin the perfect plugin for folks serving media files to multiple playback devices without worrying if the DTS or AC is included and keeping the original audiotracks intact

Tdarr_Plugin_077b_HandBrake_NVENC_264_Configurable, not transcoding if resolution is not met

Not so much a bug as an annoyance. I want to avoid using custom plugins if at all possible. This one works just fine except the fact that if input video is already in h264 it does not see the need to transcode it, Regardless of the quality preference that was set. when It should have 2 filters one for is h264 & is resolution set. Would love to see this updated. as most of my library is already h264 but I want to standardize the resolution on it as well and this plugin is skipping 80% of my library due to already being h264.

[Tdarr_Plugin_MC93_MigzPlex_Autoscan.js] Connection refused

Its likely an issue on my part but for whatever reason I cannot seem to get the plex_autoscan function to work.
The following is a picture of my transcoding steps, plex_autoscan being the last step. All of my media center is running in docker using docker-compose, I have specified a static IP for the plex container so it will ALWAYS come up with that ip-address. I got my token from showing XML of a video on my server and that token works else where,

This is the output from the debug log on tdarr server

request next
[Function (anonymous)]
statusCode: 401
<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>

image

Dockerfile: Tdarr_Plugin_JB69_JBHEVCQSV_MinimalFile.js

I have created dockerfile instructions to create a tdarr container that is ready for use with the @JarBinks plugins. It would probably good for a docker expert to have a second look ;-)

Could we add a link to the dockerfile or the instructions as part of the commented section in the plugin?

# base image
FROM haveagitgat/tdarr

# run as root
USER root

# args
ARG DEBIAN_FRONTEND=noninteractive
ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

# set tz of environment (to your TZ) - optional and probably not necessary
ENV TZ=Europe/Berlin


# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
RUN sed -i "s/^exit 101$/exit 0/" /usr/sbin/policy-rc.d

# install packages;
RUN apt-get --allow-releaseinfo-change update \
  && apt-get install -yqq apt-utils \
  && apt-get install -yqq wget \
  && wget -q -O - https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt | apt-key add - \
  && sh -c 'echo "deb https://mkvtoolnix.download/ubuntu/ bionic main" >> /etc/apt/sources.list.d/bunkus.org.list' \
  && sh -c 'echo "deb-src https://mkvtoolnix.download/ubuntu/ bionic main" >> /etc/apt/sources.list.d/bunkus.org.list' \
  && wget -q https://mediaarea.net/repo/deb/repo-mediaarea_1.0-13_all.deb \
  && dpkg -i repo-mediaarea_1.0-13_all.deb \
  # --allow-releaseinfo-change to fix error "E: Repository 'http://ppa.launchpad.net/jonathonf/ffmpeg-4/ubuntu bionic InRelease' changed its 'Label' value from 'FFMPEG 4' to 'FFmpeg 4'"
  && apt-get --allow-releaseinfo-change update \
  && apt-get install -yqq \
  mediainfo \
  mkvtoolnix \
  # ! OPTIONAL: apt-get dist-upgrade is optional and has the risk of causing issues (but I like to be up-to-date anyway)
  && apt-get dist-upgrade -yqq \
  # clean up / purge unnecessary packages
  && apt-get purge -yqq \
  wget apt-utils \
  && apt-get autoclean \
  && apt-get clean \
  && rm repo-mediaarea_1.0-13_all.deb \
  && rm -rf /var/lib/apt/lists/*

Crop and Interlace detect

I would like to add to the "nosirus" plugin the auto crop and the interlacing detection so that it adds the yadif=1 mode by itself.

Is it possible?

just aac and x265?

Hi,

I would like to reencode my library and I think a plugin would be the best.

If it's not in AAC reencode audio and if it's not in x265 same

while keeping all the tracks regardless of the language (a lot of Japanese korean) and all the subtitles.

but I'm not very competent, help would be welcome:(

H264 not being recognised as H264

Hi, I am having an issue where it is saying all my H264 files are not H264 and wants to trans-code them again. Is this a common issue?

trying to build an .srt subtitle extractor

Hi. Trying to create a plugin that extracts all srt sub's.
and tried the below script. Tdarr pick up the file, but gets stuck at 'General(Transcode) ETA Calculating.

The preset in this case is:
, -map 0:s:0 sub0.srt

I don't know why it get stuck at ETA Calculating.
Any help is very much appreciated.

function plugin(file) {
var response = {
processFile: false,
preset: "",
container: "." + file.container,
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: false,
infoLog: "",

};

// Check if file is a video. If it isn't then exit plugin.

if (file.fileMedium !== "video") {
console.log("File is not video");
response.infoLog += "☒File is not video \n";
response.processFile = false;
return response;
}

// Set up required variables.
var ffmpegCommandInsert = "";
var subtitleIdx = 0;

var convert = false;

// Go through each stream in the file.
for (var i = 0; i < file.ffProbeData.streams.length; i++) {
// Catch error here incase the title metadata is completely missing.
try {
// Check stream is subtitle .
if ( file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle")
{
ffmpegCommandInsert += -map 0:s:${subtitleIdx} sub${subtitleIdx}.srt ;
response.infoLog += ☒Subtitle stream detected and extracting to srt 0:s:${subtitleIdx} - ${file.ffProbeData.streams[i].tags.title} - ${file.ffProbeData.streams[i].codec_name}. \n;
convert = true;
}
} catch (err) {}

 // Check if stream type is subtitle and increment subtitleIdx if true.
if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle") {
  subtitleIdx++;
}

}

// Convert file if convert variable is set to true.

if (convert === true) {
response.processFile = true;
response.preset = , ${ffmpegCommandInsert} ;
response.container = "." + file.container;
response.reQueueAfter = true;
} else {
response.processFile = false;
response.infoLog +=
"☑File doesn't contain subtitle or audio codecs which were unwanted or that require tagging.\n";

}
return response;
}

module.exports.details = details;
module.exports.plugin = plugin;

How to generate "Example file object"

I am trying to make something but i am having trouble trying to locate a tag. How do you generate the example file object that you have on the readme? Is there a way to generate that exact output via linux terminal? Can you put that information on the wiki?

Winsome H265 10 bit burning subtitles into video stream

2019-12-16: Please note I'm on a 2 week break. Sorry for the inconvenience.

Not sure if it's a configuration issue or not, but the Winsome H265 10 bit plugin is burning the English SDH subtitle stream into transcoded video. The preset string in the plugin is listed as response.preset = '-Z "H.265 MKV 2160p60" -e x265_10bit --all-audio --all-subtitles', which does not appear to have any of the burn-in options enabled (e.g. --subtitle-burned, --srt-burn), however, the first subtitle track for certain video files I am attempting to transcode (in this case, the English SDH track) is being burned into the video stream rather than simply being copied over. I would like to preserve the subtitle tracks where ever possible so I have the option to turn them on.

Plugin Request

Can someone create a plugin that only transcodes non-hevc files into hevc files keeping everything in the output the same. For example, same output container as the input, same audio tracks, same subtitles, everything. Just transcoding to hevc for space savings.

H265 Files fail check

I have recently switched from unmanic to tdarr. I have already converted everything I have to H265 and verified it is converted with the mediainfo command. When using this plugin, my files that have been converted fail to be recognized and then try to convert them to H265 again. I think this has something to do with the Video IDs within the file. Any way to fix this? The files in the queue show that the codec is HEVC, but they are still queued for some reason.

Help with a plugin 10 Bits depth re-encode to 8 Bits.

I have various h264 files, high [email protected] format; with bit depth 10 bits.
The LG Oled plex app can't handle this format and I would like to understand if I
a script can be created that only identifies these 10 bits depth files and re-encodes to the file to h264 on normal (8) bit.
Note, I don't want the script to re-encode all files, only the ones where it finds 10 bit depth.

Would such a thing be possible?

"stream size" keep old size after transcoding

I try to start again from scratch my plugins by taking inspiration from the great work done by others (I start in coding) but I have a problem with ffmpeg, some mkv keeps the statistics after transcoding, like the stream size. (it seems that handbrake doesn't have this problem.)

it seemed to me that "-map 0 -map_metadata:g -1" solved this problem but not and -map_metadata -1 makes me lose languages...

I refuse no help ! see same suggestion :)

function details() { return { id: "Tdarr_Plugin_b38x_Nosirus_h265_aac_no_meta", Stage: "Pre-processing", Name: "Nosirus h265, aac, no meta, subs kept", Type: "Video", Description: [Contains built-in filter] If the file is not in h265 it will be trancoded into h265 with FFmpeg using the following command '-e x265 -q 22 --encoder-preset slow --all-audio --all-subtitles copy:aac -E fdk_aac -Q 4 -x aq-mode=3'. If no aac, aac track will be added. Subtitles are kept. Metadata is removed.\n\n
`,
Version: "1.01",
Link:
"https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_b38x_Nosirus_h265_aac_no_meta.js",
Tags: "pre-processing,ffmpeg,h265,",
};
}

function plugin(file) {
var response = {
processFile: false,
preset: "",
container: ".mkv",
handBrakeMode: false,
FFmpegMode: true,
reQueueAfter: true,
infoLog: "",
};

if (file.fileMedium !== "video") {
	response.processFile = false;
	response.infoLog += "☒ File is not a video! \n";
return response;
} else {
	response.infoLog += "☑ File is a video! \n";
	
	var videoIdx = 0;
	var extraArguments = "";
	var img = false;

	for (var i = 0; i < file.ffProbeData.streams.length; i++) {
		if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "video") {
			if (file.ffProbeData.streams[i].codec_name == "mjpeg" || file.ffProbeData.streams[i].codec_name == "png" || file.ffProbeData.streams[i].codec_name == "bmp") {
				img = true;
				extraArguments += ` -map -v:${videoIdx} `;
			}
		videoIdx++;
		}
	}

	if (img === true) {
		response.processFile = true;
		response.preset += `, -map 0 -c copy ${extraArguments} `;
		response.infoLog += "☒ The file has an image, removing! \n";
	return response;
	} else {
		response.infoLog += "☑ File doesn't contain any unwanted image! \n";
	
		if (file.ffProbeData.streams[0].codec_type != "video") {
			response.processFile = true;
			response.preset = `, -map 0:v? -map 0:a? -map 0:s? -map 0:d? -map 0:t? -c copy`
			response.infoLog += "☒ Video is not in the first stream! \n"
		return response
		} else {
			response.infoLog += "☑ File has video in first stream! \n"
			if (file.ffProbeData.streams[0].codec_name == "hevc") {
				response.processFile = false;
				response.infoLog += "☑ File is already in hevc! \n";
			} else {
				if (file.video_resolution === "480p" || file.video_resolution === "576p") {
					var crf = 22
				} else if (file.video_resolution === "720p") {
					var crf = 24
				} else if (file.video_resolution === "1080p") {
					var crf = 26
				}
				response.processFile = true;
				response.preset = `, -map 0 -c copy -c:v:0 libx265 -preset:v ultrafast -pix_fmt yuv420p10le -crf ${crf} -x265-params "aq-mode=3:no-sao=1:me=3:subme=5:rd=4:bframes=8:rc-lookahead=80:deblock=-2\-2:no-info=1" -max_muxing_queue_size 1024 `;
				response.infoLog += `☒ File is ${file.video_resolution} but is not hevc, will be transcoded in crf ${crf}! \n`;
			}
		}
	}

var audioIdx = -1;
var ffmpegCommandInsert = "";
var hasnonAACTrack = false;

for (var i = 0; i < file.ffProbeData.streams.length; i++) {
	try {
		if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio") {
			audioIdx++;
		}
	} catch (err) {}
	try {
		if (file.ffProbeData.streams[i].codec_name !== "aac" && file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio") {
			ffmpegCommandInsert += `-c:a:${audioIdx} libfdk_aac -profile:a aac_he -vbr 3 -signaling implicit `;
			hasnonAACTrack = true;
		}
	} catch (err) {}
}
var ffmpegCommand = `-fflags +genpts, -map 0 -c copy ${ffmpegCommandInsert} `;

if (hasnonAACTrack == true) {
	response.processFile = true;
	response.preset = ffmpegCommand;
	response.infoLog += "☒ File has audio which is not in aac! \n";
return response;
} else {
	response.infoLog += "☑ All audio streams are in aac! \n";
}

if (file.ffProbeData.streams[0].codec_name == "hevc" && hasnonAACTrack == false && file.container != "mkv") {
	response.processFile = true;
	response.preset = `, -map 0 -c copy`;
	response.infoLog += "☒ File is not in mkv container! \n";
return response;
} else {
	response.infoLog += "☑ File is in mkv container! \n";
}

if (file.meta.Title != undefined) {
	response.processFile = true;
	response.preset = `, -metadata title="" -metadata comment="" -map 0 -c copy `;
	response.infoLog += "☒ File has title metadata \n";
return response;
} else {
	response.infoLog += "☑ File has no title metadata \n";
}
	response.infoLog += "☑ File meets conditions! \n";
return response;
}

}

module.exports.details = details;
module.exports.plugin = plugin;`

[BUG] Using fs-extra throws error

When running a plugin using the fs-extra module an error is thrown trying to invoke it:

ShellJSInternalError: ENOENT: no such file or directory, open '/tmp/shelljs_029d62444a9ccb8665a2'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at execSync (/home/Tdarr/Tdarr/bundle/programs/server/npm/node_modules/shelljs/src/exec.js:89:17)
    at Object._exec (/home/Tdarr/Tdarr/bundle/programs/server/npm/node_modules/shelljs/src/exec.js:205:12)
    at Object.exec (/home/Tdarr/Tdarr/bundle/programs/server/npm/node_modules/shelljs/src/common.js:335:23)
    at process.on (/home/Tdarr/Tdarr/bundle/programs/server/assets/app/worker1.js:148:19)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emit (internal/child_process.js:762:12)
    at _combinedTickCallback (internal/process/next_tick.js:142:11)
{ Error: Cannot find module 'fs-extra'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.plugin (/home/Tdarr/Tdarr/bundle/programs/server/assets/app/plugins/Community/Tdarr_Plugin_z18s_rename_files_based_on_codec.js:25:19)
    at getNewTask (server/main.js:3010:51)
    at server/main.js:2389:11
    at runWithEnvironment (packages/meteor.js:1286:24) code: 'MODULE_NOT_FOUND' }
Server: Worker _7r0ts39 requesting item. Nothing to process for this worker.

https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_z18s_rename_files_based_on_codec.js#L25

cc: @Migz93

Support for Two Pass FFMPeg Options

Hello,

For best quality transcoding VP9 suggests a two pass approach. With the current plugin configuration I do not see a way to do this.

It would be nice to be able to do something like this in the future, let me know if you need any more information.

Thanks

javascript troubleshooting

If there is an error in the javascript the transcoder will return a "plugin not found" error, is it possible to make that show some information on what exactly is wrong?

Audio/Subtitle Default track

Hello,

How to make a plugin to set default track ?

Audio : Eng by default
Subtitle : fre (French / Not Forced) by default ?

Thanks

Unrecognized option 'rc:v' with Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV with Docker AIO image

Hey,

I get this error with the mostly default settings with this plugin:

Command:

/home/Tdarr/Tdarr/bundle/programs/server/npm/node_modules/@ffmpeg-installer/linux-x64/ffmpeg -c:v h264_cuvid -i '/home/Tdarr/media/TV/The Handmaid'"'"'s Tale/Season 3/The Handmaid'"'"'s Tale - S03E03 - Useful WEBDL-1080p.mkv' -map 0 -c:v hevc_nvenc -pix_fmt p010le -rc:v vbr_hq -qmin 0 -cq:v 31 -b:v 2500k -maxrate:v 5000k -preset slow -rc-lookahead 32 -spatial_aq:v 1 -aq-strength:v 8 -a53cc 0 -c:a copy -c:s copy -dn '/home/Tdarr/cache/The Handmaid'"'"'s Tale - S03E03 - Useful WEBDL-1080p-TdarrCacheFile-F9XOtqFBJ.mkv'

ffmpeg version N-47683-g0e8eb07980-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516

configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg

libavutil 56. 24.101 / 56. 24.101

libavcodec 58. 42.100 / 58. 42.100

libavformat 58. 24.100 / 58. 24.100

libavdevice 58. 6.101 / 58. 6.101

libavfilter 7. 46.101 / 7. 46.101

libswscale 5. 4.100 / 5. 4.100

libswresample 3. 4.100 / 3. 4.100

libpostproc 55. 4.100 / 55. 4.100

Unrecognized option 'rc:v'.

Error splitting the argument list: Option not found

Any ideas?

Tdarr_Plugin_a9hd_FFMPEG_Transcode_Specific_Audio_Stream_Codecs transcoding fail when multiple audio streams are present

The plugin is set to transform a bunch of audio formats into ac3, including DTS. but it seems to fail when multiple audio streams are present or it mixes up track numbers (not exactly sure).

Command:

/home/Tdarr/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg -i '/home/Tdarr/media/movie.mkv' -c copy -map 0:v -map 0:2 -c:2 ac3 -map 0:s? -map 0:d? '/home/Tdarr/cache/movie-TdarrCacheFile-1IbvQMDs-.mkv' 

Error message:

Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 2, only the last option '-c:2 ac3' will be used.
Invalid encoder type 'ac3'

For reference, this is the files mediainfo:

General
Unique ID                                : blabla
Complete name                            : movie.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 11.3 GiB
Duration                                 : 2 h 15 min
Overall bit rate                         : 12.0 Mb/s
Encoded date                             : UTC 2018-09-13 23:45:38
Writing application                      : mkvmerge v8.3.0 ('Over the Horizon') 64bit
Writing library                          : libebml v1.3.1 + libmatroska v1.4.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 14 min
Bit rate                                 : 10.1 Mb/s
Width                                    : 1 920 pixels
Height                                   : 808 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.272
Stream size                              : 9.51 GiB (84%)
Writing library                          : x264 core 157 r2932 303c484
Encoding settings                        : cabac=1 / ref=5 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=10102 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 2 h 15 min
Bit rate mode                            : Constant
Bit rate                                 : 384 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 833 ms
Stream size                              : 371 MiB (3%)
Language                                 : German
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : Yes

Audio #2
ID                                       : 3
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Codec ID                                 : A_DTS
Duration                                 : 2 h 14 min
Bit rate mode                            : Constant
Bit rate                                 : 1 509 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 1.42 GiB (13%)
Language                                 : English
Default                                  : No
Forced                                   : No

Text #1
ID                                       : 4
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 20 min
Bit rate                                 : 1 b/s
Count of elements                        : 20
Stream size                              : 910 Bytes (0%)
Title                                    : ger forced
Language                                 : German
Default                                  : Yes
Forced                                   : Yes

Text #2
ID                                       : 5
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 2 h 6 min
Bit rate                                 : 53 b/s
Count of elements                        : 1720
Stream size                              : 49.6 KiB (0%)
Title                                    : ger regular
Language                                 : German
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 6
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 17 min
Bit rate                                 : 0 b/s
Count of elements                        : 16
Stream size                              : 362 Bytes (0%)
Title                                    : eng forced
Language                                 : English
Default                                  : No
Forced                                   : No

Docker update and now wont start

Hello

Been using for months but now docker updated and it deleted all the code. Trying to setup again but doesn't seem to work.

Pretty sure its an issue with the Volumes.

What should host path and container be set to? keeps getting stuck on /home/Tdarr/Documents and not launching

Help With File Rename

@HaveAGitGat I would like a bit of help with file renaming please.
I have been playing around with the rename plugin and understnd what the following code snippet is doing (if codec is h264 and filename contains 265, change 265 to 264):

    if (
      file.ffProbeData.streams[0].codec_name == "h264" &&
      file._id.includes("265")
    ) {
      file._id = file._id.replace("265", "264");
      file.file = file.file.replace("265", "264");
    }

Instead of 'replace', is there a command for append? Ive tried changing 'replace' to 'append' but didnt get anywhere.
The reason for this is Radarr/Sonarr doesnt see the file has changed after encoding being as the output transcoded file is the same file name so Sonarr/Radarr dont do a file scan and update the DB to show the new file size. If the filename is changed a scan will take place and update Sonarr/Radarr DB accordingly.

Ive tried searching on the net for FFProbe and appending the file name but everything has failed me so far. I have tried building a new 'replace' section for codec in the file name but ultimate to cover all scenarios I need one for different resolutions of 480, 720, 1080, different codecs MPEG2, h264, h265 etc - it seems a bit sloppy to have multiple sections all calling a replace when there is probably an append so I can add something such as '_tdarr' to the end of the filename which will then make Radarr/Sonarr do a file scan/update

Plugin [Tdarr_Plugin_drdd_standardise_all_in_one] throws typeError in v2

Plugin throws error at the end of the transcode task.

Plugin ID: Tdarr_Plugin_drdd_standardise_all_in_one
Plugin Name: DrDD H265 MKV AC3 audio subtitles [QSV & NVENC]

Error message: "File is not video Tdarr_Plugin_drdd_standardise_all_in_one - Pre-processing ☒Plugin error! TypeError: Cannot read property 'streams' of undefined"

See link below for more details from response received from u/HaveAGitGat:
https://www.reddit.com/r/Tdarr/comments/l99nwt/v20003_release_31st_january_2021/glr9md2?utm_source=share&utm_medium=web2x&context=3

Community Plugin: Tdarr_Plugin_henk_Add_Specific_Audio_Codec errors out

I'm using the recently updated 'Tdarr_Plugin_henk_Add_Specific_Audio_Codec' a lot to ensure all videostreams with dts audio have also at least an EAC3 channel, as not all my players correctly support dts.

I'm now receiving errors some on the plugin on multiple files. The error states:
Tdarr_Plugin_henk_Add_Specific_Audio_Codec - Pre-processing ☒Plugin error! TypeError: Cannot read property 'COPYRIGHT' of undefined

Just a mkv file with 1 video stream and 1 audio stream with aac. In the parameters of plugin I entered 'dts' as source. To be honest I don't know why the plugin script would even pick this up as it's not dts
The file information can be found here: https://pastebin.com/JYBvJFUS

Thanks for your time.

Request: Move other specified files to output folder.

My setup has Tdarr process my downloads folder and then copy them to a converted folder set as output to be grabbed by Sonarr/Radarr. It would be really nice if there was an option to specify other files to be copied as well, i.e. .nfo or .srt files. They wouldn't need to be processed, just copied.

Thanks!

bitrateprobe is undefined in Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV

Hi,

I am playing with Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV plugin and during my tests all the files I tested it with returned bitrateprobe = undefined.

Because of this the plugin defaults to the preset target bitrates which I'd like to avoid.

I am not a developer but looks like

bitrateprobe = file.ffProbeData.streams[0].bit_rate
comes back with an undefined value every time. How could I fix this?

[Tdarr_Plugin_MC93_Migz5ConvertAudio] Does not convert PCM 2.0 to AAC

Heya,

recently i got some files with PCM 2.0 Audio which are very huge. I tried to convert them with Tdarr an the plugin Tdarr_Plugin_MC93_Migz5ConvertAudio but it does not convert them.

    Codec PCM
    Kanäle 2
    Bitrate 2302 kbps
    Sprache Deutsch
    Bit Depth 24
    Profil pcm_s24le
    Sampling Rate 48000 Hz
    Display Title Deutsch (PCM Stereo)
    Extended Display Title Deutsch (PCM Stereo)

Tdarr just shows this in I

Tdarr_Plugin_lmg1_Reorder_Streams - Pre-processing
File is not video
Tdarr_Plugin_MC93_Migz3CleanAudio - Pre-processing
☒File is not video
Tdarr_Plugin_076a_re_order_audio_streams - Pre-processing
☒ No audio tracks in desired language!
Tdarr_Plugin_MC93_Migz4CleanSubs - Pre-processing
☒File is not video
Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3 - Pre-processing
☒File is not video
Tdarr_Plugin_MC93_Migz5ConvertAudio - Pre-processing
☒File is not video.
Tdarr_Plugin_MC93_Migz1FFMPEG - Pre-processing
☒File is not a video. 

And this in H:

hevc | video | - | jpn | -
-- | -- | -- | -- | --
pcm_s24le | audio | 2.197 Mbs | ger | -
pcm_s24le | audio | 2.197 Mbs | jpn | -
hdmv_pgs_subtitle | subtitle | - | ger | -
hdmv_pgs_subtitle | subtitle | - | ger | -

WEBM plugin

How would you make a webm file transcoder ?
Input any file type and transcode to webm (VP8-Vorbis / VP9-Opus)

Would very nice for in browser file streaming and broad compatibility

Create additional file without touching original

I want to be able to encode to another file without touching the original but it seems like tdarr always wants to append an output to the end of the command. Is there a way to disable that feature on a plugin by plugin basis?

I am trying to downmix an audio tracks without touching the original file and instead create a mka file next to it so seeding in never stopped on the original file. I have a WIP plugin here that is running into the issue explained above and it is also truncating the actual output of what i want. https://github.com/luigi311/Tdarr_Plugin_lmg2_External_Downmix_DRC

Command:

ffmpeg -y -i '/mount/test/Attack on Titan/Season 1/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission, Part 1 Bluray-1080p.mkv' -map 0:1 -c:a:0 aac -ac 2 -filter:a:0 "acompressor=ratio=4" -b:a:0 192k -metadata:s:a:0 title="Stereo DRC" -metadata:s:a:0 language="eng" "/mount/test/Attack on Titan/Season 1/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission '/mount/Tdarr-Cache/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission, Part 1 Bluray-1080p-TdarrCacheFile--sSdzcylc.mkv' 

Instead of

Command:

ffmpeg -y -i '/mount/test/Attack on Titan/Season 1/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission, Part 1 Bluray-1080p.mkv' -map 0:1 -c:a:0 aac -ac 2 -filter:a:0 "acompressor=ratio=4" -b:a:0 192k -metadata:s:a:0 title="Stereo DRC" -metadata:s:a:0 language="eng" "/mount/test/Attack on Titan/Season 1/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission, Part 5 Bluray-1080p.eng.Stereo-DRC.mka" '/mount/Tdarr-Cache/Attack on Titan S01E17 Female Titan- The 57th Exterior Scouting Mission, Part 1 Bluray-1080p-TdarrCacheFile--sSdzcylc.mkv' 

It seems like it sees the , and truncates everything after that

[Tdarr_Plugin_MC93_Migz1FFMPEG_CPU] Not escaping certain special characters in file name

@Migz93 I just want to say that you've done some excellent work here, providing community plugins for all sorts of use cases, so thank you.

When processing files with certain special characters in the path, there is a missing closing quote in the source path which is causing processing to fail.
I'm not sure exactly what's going on but I assume the path is being truncated at the unescaped special characters (namely commas and apostrophes).

Please let me know if you need any more information to help diagnose this issue.

Examples below:

ffmpeg -y -i '/mnt/nas/Videos/TV/Modern Family (2009)/Season 02/Modern Family - 2x12 - Our Children, Ourselves - Bluray-1080p - x264 DTS.mkv' -map 0:2 "/mnt/nas/Videos/TV/Modern Family (2009)/Season 02/Modern Family - 2x12 - Our Children '/temp/Modern Family - 2x12 - Our Children, Ourselves - Bluray-1080p - x264 DTS-TdarrCacheFile-IlCOgkhdZ.mkv' Last 200 lines of CLI log: shellThread /bin/sh: 1: Syntax error: Unterminated quoted string

/Kids/Lion King '/temp/Lion King, The (1994) - Bluray-1080p - x265 HDR-TdarrCacheFile-R9HuUw6oT.mkv' Last 200 lines of CLI log: shellThread /bin/sh: 1: Syntax error: Unterminated quoted string

Bug: Tdarr_Plugin_076a_re_order_audio_streams.js sets correct 1st language, but doesnt apply the default correct

This plugin does work to make a specific language to appear first as first audiostream, but the 'default' tag still stays on the original audiostream and is not set to the first. It seems the 'disposition' element of the instruction is not working as it should.

Edit-
To reproduce:
Take a video file, with multuple audiostreams in various languages and a default tag on a non-preferred language.
For example
Audiostream 1 English 2.0. Tagged as 'Default'
Audiostream 2 Dutch 2.0
Audiostream 3 English 5.1

After running the script:
Audiostream 1 Dutch 2.0
Audiostream 2 English 2.0 Tagged as 'default;
Audiostream 3 English 5.1

Expected output: To have the first audiostream tagged as 'default' and the other audiostreams the default tag removed.

Thanks for your review

Improvement: Tdarr_Plugin_henk_Add_Specific_Audio_Codec - to Set the new audiostream with default flag to No.

This plugin is really what I was looking for, to create an AC3 from the dts,trueHD audio track; as many build-in TV players do not support dts, trueHD and transcoding on my side is too heavy.
This plug can check for example for an dts of trueHD audiostream and add a new audio stream called with the AC3 codec.

However I noticed when it creates a new audio stream it copies over the 'default'flag from the main stream.
So in an audio file with one dts (and set with default flag: yes), the end result is 2 audiostreams dts and EAC3 both with default flag set as 'yes'

The correct behavior would be for the new audiostream to always have default flag set to 'no'

Additional information on default track: '' The "default track" flag tells the player that this track should be played unless the user overrides that decision somehow. You usually mark the original audio track with "default track" and leave it off for the rest of them, e.g. for the director's commentary or some translations you don't want ''

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.