Lets you set upper and lower bounds more accurately and prints out more accurate error figures. Default has error range of 2%, this default has error range of 1% (.5% above or below).
In testing it appears that going even to 99.8 <> 100.2 would also be acceptable and present little to no false positives with an error range of .4%. I've seen random failures that are just barely caught at 98% of original.
newData & oldData maintain up to 3 to 5 decimal places of accuracy sometimes. This allows ratio to more accurately reflect that. 2 places should be sufficient.
Bug where a Chinese original language movie would be set as und or undefined because of the return value from TMBD as 'cn'. The iso-language expects 'zh' for Chinese.
Also the array is unnecessary given TMDB should only every report a single language and is not reliant on imdb multiple languages.
* Fixed the NaN issue with BitRates. Some files had bitrate missing in the
MediaInfo data so pulling from the "extra" section for those. Also
resolved an issue with the way the findMediaInfoItem function wasn't
working with subtitle tracks (well it wasn't working for all files due
to the general section because of a previous attempted subtitle fix but
this should be much much much better and work in most all cases).
* Updating to comply with eslint. Unabe to get stream matching function to
work so changed eqeqeq to warning.
* Re-add string
* parseInt
* Merge remote-tracking branch 'refs/remotes/origin/master'
* Modified variable names to use the lowerCamelCase naming convetion
* Fixed eslint issue
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* Add/update encodeURIComponent to allow for successful path uri encoding
* Breakup line to meet 120 char limit enforced by the tests
* concat string
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* ignore cert mismatch for *.plex.direct
add parameter to ignore cert mismatches for custom domains since plex tries to push everything through their generated subdomains and it may see a cert issue.
* removed incorrect instruction no longer required
* Fixed the NaN issue with BitRates. Some files had bitrate missing in the
MediaInfo data so pulling from the "extra" section for those. Also
resolved an issue with the way the findMediaInfoItem function wasn't
working with subtitle tracks (well it wasn't working for all files due
to the general section because of a previous attempted subtitle fix but
this should be much much much better and work in most all cases).
* Updating to comply with eslint. Unabe to get stream matching function to
work so changed eqeqeq to warning.
* Re-add string
* parseInt
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* Create Tdarr_Plugin_goof1_URL_Plex_Refresh
* forgot .js
* Fix lint errors
* requested mods, waiting fir UI menu specs
* moving requires into function as shown in example and a stupid mistake
* escape \ in new lines for info bubbles
* rewording for clarity
* handle path sub edge cases
* added filler return and fixed path builder bug
* Add check for inputUI type
* Fix inputUI types
* Create Tdarr_Plugin_goof1_URL_Plex_Refresh
* forgot .js
* requested mods, waiting fir UI menu specs
* Fix lint errors
* moving requires into function as shown in example and a stupid mistake
* lint, add checkPlugins fixes and add promises to requests
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* Create parameter for new audio stream either before or after
parameter is empty; new stream will be created after the orginal.
parameter is 'before'; new stream is created before the existing stream
* Create parameter for new audio stream either before or after
parameter is empty; new stream will be created after the orginal.
parameter is 'before'; new stream is created before the existing stream
* Bug fix
* Add dropdown
* Set after
* lint
* Lint fix
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* added downmix and DNC plugin
* removed unused functions and code. corrected link address
* renamed the file to match the correct shorthand. updated links and id too
* made adjustments to requirements for processing to only process files with 1 audio stream
* Lint fix
* Run checkPlugins and add recommended changes
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* Tdarr_Plugin_Greg_MP3_FFMPEG_CPU.js
Trying to contribute a frequently mentioned feature, built and tested on a clustered Tdarr 2.00.10 in Debian/Ubuntu.
* trying to use ellint
* lint
* eslint with this projects configuration
* linting complete
* code review feedback incorporation
Made many changes based on the review from https://github.com/supersnellehenk !
* removed invalid Tag:
* trying to pass failed checks
added module exports dependencies, and moved global import. linting is happy after the change too.
* ESLint ignore
* Make some simplifications, added default values
* Update details, fix bug
Co-authored-by: Rick Meijer <rick@marojeri.nl>
Co-authored-by: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com>
* Update Tdarr_Plugin_henk_Add_Specific_Audio_Codec.js
Solves an issue where the plugin errors out on datatreams that do not have a copyright tag. It now only scans audio streams.
In addition, improved the routine, by checking if the desired output codex is already processed (not any audio stream)
* Fix lint issues
Co-authored-by: Rick Meijer <rick@marojeri.nl>
* Create Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
Same as my GPU based one basically, just for CPU
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
changed to using a switch and a single preset line, cleaned up linting
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
eslint was a mistake
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
i will never forget whoever invented eslint
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
being environmentally concious and not running the rest of the plugin unecessarily
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
* Update Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable.js
If the audio is AC3 the log says "ll surround audio streams are in aac! " which is wrong, and confuses me when looking at log.
Updated to show correct info.
Since FFMPEG does not support converting 7.1 to AC3 the plugin was previously downmixing 7.1 audio to 5.1. Since I'm also running Tdarr_Plugin_MC93_Migz5ConvertAudio to downmix tracks anyway, this caused me to end up with duplicate 5.1 tracks in all of my videos. This update does not fix the fundamental issue of ffmpeg not converting 7.1 to AC3, instead it just makes the plugin ignore 7.1 streams entirely. Combined with Tdarr_Plugin_MC93_Migz5ConvertAudio, this should allow users to have stereo and 5.1 audio streams encoded in AC3 while keeping the original 7.1 stream if it exist.
Files not in H265 will be transcoded into H265 using hw with ffmpeg, assuming mkv container. Plugin uses QS if the node runs on a PC, or Videotoolbox if run on a Mac. Much thanks to Migz for bulk of the important code. Quality is controlled via bitrate adjustments - H264 to H265 assumes 0.5x bitrate. Resolution change from 1080p to 720p assumes 0.7x bitrate. Audio conversion is either 2 channel ac3 or 6 channel ac3, for maximal compatibility and small file size. All subtitles removed. The idea is to homogenize your collection to 1080p or higher movies with 5.1 audio, or 720p TV shows with 2.0 audio.`,
1) Update CPU plugin description as it mentions using a GPU which is incorrect.
2) Update CPU & GPU plugins to remove `\n` and `\\n` from the description fields as the description field doesn't seem to use these as new lines and were instead displaying as text.
1. Made changes to all plugins following lint testing. There are still various warnings/errors but my very limited knowledge of javascript means I just don't understand what the errors mean. Or in some cases I don't understand how to split the variable across several lines to confirm to the line limits.
I did manage to get it from
952 problems (943 errors, 9 warnings)
down to
37 problems (28 errors, 9 warnings)
2. Fix Flawed logic in FFMPEG plugins which would cause remux conditions to never trigger. Was checking if file was HEVC & VP9 which is impossible as they're both codecs.
3. Fixed a bug with CleanTitle where plugin would fail if a stream in the file didn't have a title.
4. Modify CleanSubtitle plugin to not remove sdh subtitles.
5. Include new plugin to just perform remuxes. Mainly aimed at remuxing to mkv or mp4.
1) Bug fix for CleanTitle where if the title of an audio/substeam didn't exist it would exit that loop but not increment the Id of the track. Was causing the plugin to loop in some cases.
2) Modify both FFMPEG plugins to treat VP9 codec in a similiar way to HEVC. I.e if a file is already in VP9 codec don't transcode it to HEVC as VP9 is already heavily compressed in a similiar way to HEVC. Plugin itself still outputs files as HEVC
1) Update to CleanTitle plugin to allow user input custom matching title, allows to remove more then just the default of something with 3 full stops.
2) Update to both FFMPEG plugins to fix a bug where if the force_conform option was enabled and a stream had no codec_name it would cause the plugin to error out.
1) Add input to enable bframes. - ffmpegGPU plugin
2) Add timed_id3 has codec type to remove for mkv/mp4 if force_conform is enabled. - Both ffmpeg plugins
3) max_muxing_queue_size change to 9999 as this number is still too low in some cases.
changed example values to sane numbers that would give the typical compression results people might expect from such a plugin, should someone decide to just, use what it says instead of testing and finding the right value for their use
Plugin uses a two pass approach to loud norm volume normalization. Achieved by writing the output of ffmpeg to a temp file in the source directory alongside the video file. This is read during the second pass to get the required values. Temp file is removed after second pass. MKV is required to allow the file to have custom metadata so the plugin knows what stage it is up to.
Tiered NVENC plugin based on choosing CQ:V value per resolution. (cq:v is nvenc equivalent of crf)
Based originally on iiDrakeii's "Tiered FFMPEG NVENC settings depending on resolution" plugin.
Fixed an issue with processing ts files as well as modified the check
for already processed to check video encoding, video resolution height,
and audio codec.
Improved handling of bitrates (especially when video bitrate could not be determined). Instead of failing when bitrate is NaN, use a sensible default. Bug fixes.
- Added another 25% to resulting HEVC bitrate (Personal Preference)
- Better selection of best audio stream (Language/Channels/Bitrate) (Bug)
- Removed usage of Tdarr ffmpeg object in favor of internal object :-( (There was some mixing causing issues)
- Improved handling of converting video bit rate from 10 to 8 and 8 to 10 (Enhancement)
- Better handling of knowing when script has already been run on a file (Enhancement)
- Removed ffmpeg command output from script (Unnecessary)
- TODO: Need to move video decision out of stream loop similar to audio decisions
if inputs isn't defined, then inputs.container causes a plugin error that is not caught by the if(inputs.container == "")
this change checks the inputs first
1) Update both plugins transcode plugins with new "force_conform" option.
2) Add "png" to codec image types to be removed.
3) Update GPU plugin to check for 10Bit files instead of just HDR.
- Added @10% to target video bitrate
- Audio track selection now works better
- Added more to the documentation (A round the additional programs needed)
- Modified some of the user feedback to be clearer
- Cleaned up the usage of " vs. '
- Tested to work with the 10bit flag set to false
Change both ffmpeg plugins reQueueAfter to false. These plugins should not need to be requeued and worked on again.
Move mkv data stream check to after extraArguments var creation so that it works as intended.
Both plugins checked for the existance of file.ffProbeData.streams[i].tags.language. But when .tags is completely missing then it would fail.
Modified plugins to check for .tags before then checking for .language
1) Set bufsize at a variable level dependant on bitrate. (Thanks winsome)
2) Add variable to enable transcoding files to 10bit if preferred.
3) Added two options to GPU transcode plugin after extensive testing/research with different options.
*-cq:v 19
*-rc-lookahead:v 32
4) Modify bitrate cutoff check to completely skip file if below cutoff, rather then check if it should be remuxed.
5) Tidy up some wording.
1) Ran all plugins through javascript formatter to make them look nicer/ have correct javascript formatting.
2) Added comments to all plugins.
3) Modified all plugins that have checks for inputs to check for existance of inputs itself.
4) Modify 5ConvertAudio so that you can just put "true" in a single input, rather then having to put false in the opposing one. If only 1 action is wanted.
5) Fix for 3CleanAudio & 4CleanSubs where if language meta was completely missing then plugins would not set it to the specified tag language.
6) Correct 4CleanSubs input title of "tag_title" to "tag_language"
Uses iiDrakeii's filter, and crops video files when letterboxing is detected.\nThis uses the FFMPEG NVENC transcoding(hw).\nIf a file is 4K it will be scaled down to 1080p.\nNow with user definable bitrates!(since 1.104 beta)\nCreated by @control#0405
Reinclude iiDrakeii_Not_A_Video_Mjpeg_Fix, warning needs to be given in a future update before removing plugin due to the fact people may still be using this plugin.
Remove iiDrakeii_Not_A_Video_Mjpeg_Fix plugin as this was resolved in Tdarr.
Create new plugin to strip out image format tracks, currently mjpeg & png.
1) New plugin that uses CPU to convert to H265.
2) Change to FFMPEG NVidia plugin to specifiy bitrate cutoff.
3) Fix random infolog "2" in CleanTitle
4) Update descriptive audio check in CleanAudio and CleanSubs to look for "sdh"
5) Correct OrderStreams mentioning that "Audio not first" when audio should be second.
Corrected Logic to remove mjpeg streams due to error when they are processed.
Corrected Logic to add mux queue size on specific audio formats due to ffmpeg bug.
Changed how the Map is created in corrolation with Mjpeg fix.
Specifically tuned for use with Animation, primarily Anime with English subtitles. Preserves Subtitles; Metadata; Attachments; Fonts and Styling. CRF 18 to keep as much quality as reasonable, while keeping file sizes low. Audio converted to AAC 512K for compatibility. Have used `x265-params`, as it seems the source script I used failed to do so, and the variables were not being read properly. Medium preset, need a reasonably fast CPU/Server. 10-Bit video output to help curb banding.