diff --git a/Community/Tdarr_Plugin_z0ab_TheRealShadoh_HandBrake_H264_Fast1080p30_EngSubs.js b/Community/Tdarr_Plugin_z0ab_TheRealShadoh_FFMPEG_H264_Medium.js similarity index 66% rename from Community/Tdarr_Plugin_z0ab_TheRealShadoh_HandBrake_H264_Fast1080p30_EngSubs.js rename to Community/Tdarr_Plugin_z0ab_TheRealShadoh_FFMPEG_H264_Medium.js index 4bed893..7c862b4 100644 --- a/Community/Tdarr_Plugin_z0ab_TheRealShadoh_HandBrake_H264_Fast1080p30_EngSubs.js +++ b/Community/Tdarr_Plugin_z0ab_TheRealShadoh_FFMPEG_H264_Medium.js @@ -4,13 +4,13 @@ function details() { return { - id: "Tdarr_Plugin_z0ab_TheRealShadoh_HandBrake_H264_Fast1080p30_EngSubs.js", - Name: "TheRealShadoh HandBrake Fast1080p30, English subs, no title meta, 192Kb AAC stereo,MP4 ", + id: "Tdarr_Plugin_z0ab_TheRealShadoh_FFMPEG_H264_Medium.js", + Name: "TheRealShadoh FFMPEG Medium, video MP4, audio AAC, keep subs. ", Type: "Video", - Description: `[Contains built-in filter] This plugin transcodes into H264 using HandBrake's 'Fast 1080p30' preset if the file is not in H264 already. It maintains English subtitles. It removes metadata (if a title exists) and adds a stereo 192kbit AAC track if an AAC track (any) doesn't exist. The output container is MP4. \n\n + Description: `[Contains built-in filter] This plugin transcodes into H264 using FFMPEG's Medium' preset if the file is not in H264 already. It maintains all subtitles. It removes metadata (if a title exists), and maintains all audio tracks. The output container is MP4. Filter logic from "Tdarr_Plugin_a9hc_HaveAGitGat_HandBrake_H264_Fast1080p30". \n\n `, Version: "1.00", - Link: "https://github.com/TheRealShadoh/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_z0ab_TheRealShadoh_HandBrake_H264_Fast1080p30_EngSubs.js" + Link: "https://github.com/TheRealShadoh/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_z0ab_TheRealShadoh_FFMPEG_H264_Medium.js" } } @@ -33,7 +33,7 @@ function plugin(file) { } - + @@ -48,7 +48,7 @@ function plugin(file) { return response - } else { + } else { var jsonString = JSON.stringify(file) @@ -57,13 +57,13 @@ function plugin(file) { for (var i = 0; i < file.ffProbeData.streams.length; i++) { - + try { if(file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle"){ - + hasSubs = true - + } } catch (err) { } } @@ -72,10 +72,10 @@ function plugin(file) { if(file.ffProbeData.streams[0].codec_name != 'h264'){ response.infoLog += "☒File is not in h264! \n" - response.preset = '-Z "Fast 1080p30" --audio-lang-list eng,jpn --all-audio --subtitle-lang-list eng,und --all-subtitles' + response.preset = ', -map_metadata -1 -map 0:v -map 0:s? -map 0:a -c:v libx264 -preset medium -c:a aac -c:s mov_text' response.reQueueAfter = true; response.processFile = true; - response.handBrakeMode = true + response.FFmpegMode = true return response }else{ @@ -88,7 +88,7 @@ function plugin(file) { if((file.meta.Title != "undefined") && !jsonString.includes("aac") && hasSubs){ response.infoLog += "☒File has title metadata and no aac and subs \n" - response.preset = ',-map_metadata -1 -map 0 -vcodec copy -acodec copy -scodec mov_text' + response.preset = ', -map_metadata -1 -map 0:v -map 0:s? -map 0:a -c:v copy -c:a aac -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true @@ -98,7 +98,7 @@ function plugin(file) { if(!jsonString.includes("aac") && hasSubs){ response.infoLog += "☒File has no aac track and has subs \n" - response.preset = ',-map 0:s:language:eng,language:en -map 0:v -map 0:a:language:eng,language:en,language:jpn,language:ja -map 0:a -map 0:s? -map 0:d? -vcodec copy -scodec mov_text -c:a:0 aac -b:a:0 192k -ac 2' + response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a aac -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true @@ -109,7 +109,7 @@ function plugin(file) { if(file.meta.Title != "undefined" && hasSubs){ response.infoLog += "☒File has title and has subs \n" - response.preset = ',-map 0:s:language:eng,language:en -map_metadata -1 -map 0 -vcodec copy -acodec copy -scodec mov_text' + response.preset = ', -map_metadata -1 -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true @@ -122,7 +122,7 @@ function plugin(file) { if(file.meta.Title != undefined ){ response.infoLog += "☒File has title metadata \n" - response.preset = ',-map_metadata -1 -map 0 -vcodec copy -acodec copy -scodec mov_text' + response.preset = ', -map_metadata -1 -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true @@ -134,7 +134,7 @@ function plugin(file) { if(!jsonString.includes("aac")){ response.infoLog += "☒File has no aac track \n" - response.preset = ',-map 0:v -map 0:a:0 -map 0:a:language:eng,language:en,language:jpn,language:ja -map 0:s? -map 0:d? -vcodec copy -scodec mov_text -c:a:0 aac -b:a:0 192k -ac 2' + response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a aac -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true @@ -147,7 +147,7 @@ function plugin(file) { if(hasSubs){ response.infoLog += "☒File has subs \n" - response.preset = ',-map 0:s:language:eng,language:en -vcodec copy -acodec copy -scodec mov_text' + response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true