This commit is contained in:
TylerCG 2025-12-27 20:08:19 -05:00
parent 14ef29845d
commit 0fd6843866
7 changed files with 2917 additions and 71 deletions

View File

@ -13,6 +13,12 @@
<!-- Allowed input extensions --> <!-- Allowed input extensions -->
<extensions>.mkv,.mp4</extensions> <extensions>.mkv,.mp4</extensions>
<!-- File name tags to skip/ignore -->
<ignore_tags>ehx</ignore_tags> <!-- ,megusta -->
<!-- Reduction ratio threshold: output must be <= this % of original or encoding fails -->
<reduction_ratio_threshold>0.7</reduction_ratio_threshold>
</general> </general>
<!-- ============================= <!-- =============================
@ -55,9 +61,9 @@
<maxrate_1080>1750k</maxrate_1080> <maxrate_1080>1750k</maxrate_1080>
<bufsize_1080>2750k</bufsize_1080> <bufsize_1080>2750k</bufsize_1080>
<bitrate_720>900k</bitrate_720> <bitrate_720>1200k</bitrate_720>
<maxrate_720>1250k</maxrate_720> <maxrate_720>1450k</maxrate_720>
<bufsize_720>1800k</bufsize_720> <bufsize_720>2200k</bufsize_720>
</fallback> </fallback>
<!-- Scale filter defaults --> <!-- Scale filter defaults -->
@ -72,17 +78,13 @@
============================= --> ============================= -->
<audio> <audio>
<stereo> <stereo>
<low>64000</low> <low>128000</low>
<medium>96000</medium> <medium>160000</medium>
<high>128000</high> <high>192000</high>
</stereo> </stereo>
<multi_channel> <multi_channel>
<low>192000</low> <medium>448000</medium>
<high>192000</high>
</multi_channel> </multi_channel>
<codec_rules>
<use_opus_below_kbps>128</use_opus_below_kbps>
</codec_rules>
</audio> </audio>
</config> </config>

View File

@ -24,3 +24,153 @@ anime,You are Ms. Servant (2024),You are Ms. Servant - S01E10 - You and the Forb
anime,You are Ms. Servant (2024),You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv,1454.6,310.35,21.3,CQ anime,You are Ms. Servant (2024),You are Ms. Servant - S01E11 - Your Prayers Are Gods' Prayers x264 AAC WEBDL-1080p VARYG -EHX.mkv,1454.6,310.35,21.3,CQ
anime,You are Ms. Servant (2024),You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv,1444.42,329.28,22.8,CQ anime,You are Ms. Servant (2024),You are Ms. Servant - S01E12 - The Joyous Tidings You All Bring x264 AAC WEBDL-1080p VARYG -EHX.mkv,1444.42,329.28,22.8,CQ
tv,Vikings (2013),Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv,1812.11,609.28,33.6,CQ tv,Vikings (2013),Vikings - S03E08 - To the Gates! x265 AAC Bluray-1080p Silence -EHX.mkv,1812.11,609.28,33.6,CQ
tv,Platonic (2023),Platonic (2023) - S01E10 - When Will Met Sylvia h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2449.05,913.68,37.3,CQ
tv,Platonic (2023),Platonic (2023) - S01E04 - Divorce Party h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2629.36,889.78,33.8,CQ
tv,Platonic (2023),Platonic (2023) - S01E09 - Slumber Party h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2647.45,851.84,32.2,CQ
tv,Platonic (2023),Platonic (2023) - S01E03 - Partners Retreat h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2612.89,933.07,35.7,CQ
tv,Platonic (2023),Platonic (2023) - S01E02 - Gandalf the Lizard h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2230.54,908.05,40.7,CQ
tv,Platonic (2023),Platonic (2023) - S01E06 - The Big Two Six h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2248.51,766.53,34.1,CQ
tv,Platonic (2023),Platonic (2023) - S01E05 - My Wifes Boyfriend h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2641.22,1076.82,40.8,CQ
tv,Platonic (2023),Platonic (2023) - S01E07 - Let the River Run h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2495.78,766.88,30.7,CQ
tv,Platonic (2023),Platonic (2023) - S01E01 - Pilot h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2523.21,774.51,30.7,CQ
tv,Platonic (2023),Platonic (2023) - S01E08 - San Diego h264 EAC3 Atmos WEBDL-1080p NTb -EHX.mkv,2356.7,947.11,40.2,CQ
tv,Resident Alien,Resident Alien (2021) - S01E01 - Pilot (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1354.14,698.34,51.6,CQ
tv,Resident Alien,Resident Alien (2021) - S01E02 - Homesick (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1283.35,664.56,51.8,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E03 - Secrets (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1289.79,669.48,51.9,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E04 - Birds of a Feather (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1302.82,670.23,51.4,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E05 - Love Language (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1337.54,695.82,52.0,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E06 - Sexy Beast (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1339.22,691.87,51.7,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E07 - The Green Glow (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1343.16,698.56,52.0,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E08 - End of the World As We Know It (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1314.51,681.05,51.8,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E09 - Welcome Aliens (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1334.42,696.31,52.2,Bitrate
tv,Resident Alien,Resident Alien (2021) - S01E10 - Heroes of Patience (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1325.94,689.15,52.0,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E01 - Old Friends (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1606.27,693.54,43.2,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E02 - The Wire (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1531.15,661.26,43.2,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E03 - Girls' Night (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1536.63,668.52,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E04 - Radio Harry (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1535.92,664.56,43.3,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E05 - Family Day (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1532.64,661.16,43.1,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E06 - An Alien in New York (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1537.03,668.16,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E07 - Escape from New York (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1523.81,662.61,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E08 - Alien Dinner Party (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1536.43,668.82,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E09 - Autopsy (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1532.42,665.9,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E10 - The Ghost of Bobby Smallwood (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1530.38,664.43,43.4,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E11 - The Weight (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1526.21,662.06,43.4,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E12 - The Alien Within (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1533.2,663.78,43.3,Bitrate
tv,Resident Alien,"Resident Alien (2021) - S02E13 - Harry, a Parent (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv",1534.45,664.7,43.3,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E14 - Cat and Mouse (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1534.71,666.94,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E15 - Best of Enemies (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1535.56,667.63,43.5,Bitrate
tv,Resident Alien,Resident Alien (2021) - S02E16 - I Believe in Aliens (1080p AMZN WEB-DL x265 t3nzin) -EHX.mkv,1535.13,663.17,43.2,Bitrate
movie,N/A,Pirates of the Caribbean - The Curse of the Black Pearl (2003) x265 AAC 5.1 Bluray-1080p Tigole -EHX.mkv,8626.32,4135.01,47.9,CQ
movie,N/A,Mr. & Mrs. Smith (2005) x265 AAC 5.1 Bluray-1080p Tigole -EHX.mkv,7011.2,2725.53,38.9,CQ
movie,N/A,Pirates of the Caribbean - At World's End (2007) x265 EAC3 5.1 Bluray-1080p EDGE2020 -EHX.mkv,7563.73,4117.62,54.4,CQ
movie,N/A,Pirates of the Caribbean - Dead Man's Chest (2006) x265 EAC3 5.1 Bluray-1080p EDGE2020 -EHX.mkv,6451.81,3785.47,58.7,CQ
movie,N/A,Pirates of the Caribbean - Dead Men Tell No Tales (2017) x265 EAC3 7.1 Bluray-1080p EDGE2020 -EHX.mkv,5859.92,3171.93,54.1,CQ
tv,Rupaul's Drag Race,RuPaul's Drag Race - S16E03 - The Mother of All Balls h265 AC3 WEBDL-2160p NTb -EHX.mkv,6322.47,1144.2,18.1,CQ
tv,Rupaul's Drag Race,RuPaul's Drag Race - S16E14 - Booked and Blessed h265 AC3 WEBDL-2160p NTb -EHX.mkv,5901.1,927.85,15.7,CQ
tv,Rupaul's Drag Race,RuPauls Drag Race S16E15 720p CRAV WEB-DL DD5 1 H 264-NTb[TGx] -EHX.mkv,1601.72,528.09,33.0,CQ
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E01.1080p.WEB.h264-EDITH[EZTVx.to] -EHX.mkv,2903.19,527.44,18.2,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E02.1080p.WEB.h264-EDITH[EZTVx.to] -EHX.mkv,2844.23,525.08,18.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E04.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3100.74,525.09,16.9,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E05.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3148.67,526.17,16.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s16e06.1080p.web.h264-hotdogwater[EZTVx.to] -EHX.mkv,2843.79,526.47,18.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E07.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3108.9,527.94,17.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E08.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3206.51,526.13,16.4,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E09.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3064.79,524.95,17.1,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E10.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,2911.36,525.03,18.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E11.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,2976.04,525.23,17.6,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E12.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3010.96,526.66,17.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E13.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3038.41,527.13,17.3,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S16E16.1080p.WEB.H264-BUSSY[EZTVx.to] -EHX.mkv,3238.49,517.3,16.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E00.Meet.The.Queens.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,851.07,379.53,44.6,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e01.720p.web.h264-secretos -EHX.mkv,1337.44,536.54,40.1,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E02.Condragulations.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1248.46,545.65,43.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e03.720p.web.h264-secretos -EHX.mkv,1262.79,521.13,41.3,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E04.RuPaulmark.Channel.REPACK.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1202.71,547.68,45.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E05.The.Bag.Ball.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1292.04,542.09,42.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E06.Disco-Mentary.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1296.75,542.46,41.8,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E07.Bossy.Rossy.Ruboot.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1211.33,542.93,44.8,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E08.Social.Media.The.Unverified.Rusical.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1229.9,542.28,44.1,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E09.Snatch.Game.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1287.32,543.59,42.2,CQ
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E10.Freaky.Friday.Queens.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1212.27,543.43,44.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e11.repack.720p.web.h264-secretos -EHX.mkv,1278.62,531.51,41.6,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S13E12.Nice.Girls.Roast.720p.AMZN.WEB-DL.DDP2.0.H.264-SLAG -EHX.mkv,1177.92,543.94,46.2,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e13.720p.web.h264-secretos -EHX.mkv,1234.73,530.43,43.0,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e14.720p.web.h264-secretos -EHX.mkv,1243.26,537.96,43.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e15.720p.web.h264-secretos -EHX.mkv,1718.56,690.29,40.2,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s13e16.720p.web.h264-secretos -EHX.mkv,1372.28,539.73,39.3,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E01.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1352.3,529.35,39.1,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E02.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1348.53,531.66,39.4,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E03.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1328.2,522.57,39.3,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E04.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1334.36,520.36,39.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E12.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1368.73,672.27,49.1,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E10.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1389.64,678.87,48.9,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E08.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1346.01,679.89,50.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E13.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1301.07,683.05,52.5,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E06.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1366.78,672.66,49.2,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E14.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1340.32,686.03,51.2,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E07.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1358.23,678.47,50.0,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E05.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1345.05,670.99,49.9,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E11.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1356.79,677.34,49.9,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S12E09.720p.WEB.x264-SECRETOS[eztv] -EHX.mkv,1352.33,674.36,49.9,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E03 - Monopulence! h264 EAC3 WEBDL-1080p SPAMnEGGS -EHX.mkv,4083.05,657.29,16.1,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E05 - RDR Live! h264 EAC3 WEBDL-1080p spamneggs -EHX.mkv,4184.02,666.73,15.9,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E06 - Let's Get Sea Sickening Ball h264 EAC3 WEBDL-1080p FLUX -EHX.mkv,4438.22,676.65,15.2,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E07 - Snatch Game h264 EAC3 WEBDL-720p RAWR -EHX.mkv,2702.69,663.75,24.6,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E01 - Squirrel Games x265 AAC HDTV-1080p MeGusta -EHX.mkv,1478.08,708.03,47.9,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E02 - Drag Queens Got Talent x265 EAC3 HDTV-1080p MeGusta -EHX.mkv,1289.08,644.18,50.0,Bitrate
tv,Rupaul's Drag Race,"RuPaul's Drag Race - S17E04 - Bitch, I'm a Drag Queen! x265 EAC3 HDTV-1080p MeGusta -EHX.mkv",1484.51,649.51,43.8,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E08 - The Wicked Wiz of Oz - The Rusical! h264 EAC3 WEBDL-1080p RAWR -EHX.mkv,4319.97,643.56,14.9,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E09 - Heavens to Betsey! h264 EAC3 WEBDL-1080p spamneggs -EHX.mkv,4242.08,647.63,15.3,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E10 - The Villains Roast h264 EAC3 WEBDL-1080p spamneggs -EHX.mkv,4449.87,647.18,14.5,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E11 - Ross Mathews vs The Ducks h264 EAC3 WEBDL-1080p SPAMnEGGS -EHX.mkv,3728.17,644.84,17.3,Bitrate
tv,Rupaul's Drag Race,"RuPaul's Drag Race - S17E12 - Charisma, Uniquiness, Nerve and Talent Monologues h264 EAC3 WEBDL-1080p RAWR -EHX.mkv",4281.08,647.53,15.1,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E13 - Drag Baby Mamas h264 EAC3 WEBDL-1080p RAWR -EHX.mkv,4164.02,649.46,15.6,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E14 - How's Your Headliner h264 EAC3 WEBDL-1080p spamneggs -EHX.mkv,3988.77,644.43,16.2,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E15 - LalapaRuza Smackdown Reunited h264 EAC3 WEBDL-1080p spamneggs -EHX.mkv,4234.63,646.0,15.3,Bitrate
tv,Rupaul's Drag Race,RuPaul's Drag Race - S17E16 - Grand Finale h264 AAC WEBDL-1080p EDITH -EHX.mkv,2948.27,633.86,21.5,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e01.720p.web.h264-secretos -EHX.mkv,1308.99,651.03,49.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e02.720p.web.h264-secretos -EHX.mkv,1293.71,650.03,50.2,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e03.720p.web.h264-secretos -EHX.mkv,1293.33,646.69,50.0,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e04.720p.web.h264-secretos -EHX.mkv,1288.48,650.09,50.5,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e05.720p.web.h264-secretos[eztv.re] -EHX.mkv,1228.27,648.93,52.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e06.720p.web.h264-secretos -EHX.mkv,1234.26,647.31,52.4,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e07.720p.web.h264-secretos -EHX.mkv,1212.49,645.16,53.2,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e08.720p.web.h264-secretos -EHX.mkv,1227.08,646.99,52.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e09.720p.web.h264-secretos -EHX.mkv,1249.42,646.81,51.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e10.720p.web.h264-secretos -EHX.mkv,1282.44,651.84,50.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e11.720p.web.h264-secretos -EHX.mkv,1237.95,651.01,52.6,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e12.720p.web.h264-secretos -EHX.mkv,1245.94,649.49,52.1,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e13.720p.web.h264-secretos -EHX.mkv,1228.06,647.11,52.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e14.720p.web.h264-secretos[eztv.re] -EHX.mkv,1198.42,650.76,54.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e15.repack.720p.web.h264-secretos -EHX.mkv,1348.76,648.98,48.1,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s14e16.720p.web.h264-secretos -EHX.mkv,1339.12,640.99,47.9,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S15E01.720p.WEB.h264-BAE[eztv.re] -EHX.mkv,1277.15,636.45,49.8,Bitrate
tv,Rupaul's Drag Race,RuPauls.Drag.Race.S15E02.720p.WEB.h264-BAE[eztv.re] -EHX.mkv,1343.72,653.83,48.7,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e03.720p.web.h264-spamneggs -EHX.mkv,1058.49,430.22,40.6,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e04.720p.web.h264-spamneggs -EHX.mkv,1084.14,437.29,40.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e05.720p.web.h264-spamneggs -EHX.mkv,1051.17,428.48,40.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e06.720p.web.h264-spamneggs -EHX.mkv,1040.01,429.12,41.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e07.720p.web.h264-spamneggs -EHX.mkv,1059.12,432.86,40.9,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e08.720p.web.h264-spamneggs -EHX.mkv,1125.51,460.2,40.9,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e09.720p.web.h264-spamneggs -EHX.mkv,1054.13,430.07,40.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e10.720p.web.h264-spamneggs -EHX.mkv,1056.83,432.25,40.9,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e11.720p.web.h264-spamneggs -EHX.mkv,1561.8,642.93,41.2,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e12.720p.web.h264-spamneggs -EHX.mkv,1558.99,643.5,41.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e13.1080p.web.h264-spamneggs -EHX.mkv,3249.86,643.88,19.8,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e14.1080p.web.h264-spamneggs -EHX.mkv,3019.26,641.73,21.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e15.1080p.web.h264-spamneggs -EHX.mkv,4225.9,857.1,20.3,Bitrate
tv,Rupaul's Drag Race,rupauls.drag.race.s15e16.1080p.web.h264-spamneggs -EHX.mkv,3297.57,636.17,19.3,Bitrate
tv,Married at First Sight (2014),Married at First Sight - S19E12 - Decision Day Is Near x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3201.45,550.02,17.2,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E10 - Retreat and Defeat x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3406.69,599.06,17.6,CQ
tv,Married at First Sight (2014),"Married at First Sight - S19E01 - I Do, Deep in the Heart of Austin x264 EAC3 WEBDL-1080p EDITH -EHX.mkv",3605.94,623.46,17.3,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E07 - This Is Not a Game x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3550.73,694.2,19.6,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E06 - Home Sweet Home x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3619.65,628.61,17.4,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E02 - Don't Mess with My Texas Wedding x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3603.61,686.78,19.1,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E14 - Reunion Special x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,2303.86,492.61,21.4,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E03 - Catching Flights and Feelings x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3079.99,517.5,16.8,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E04 - Falling for You x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3598.39,731.15,20.3,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E11 - I'm Done x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3385.24,640.41,18.9,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E05 - Trouble in Paradise x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3281.39,645.37,19.7,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E09 - Two Truths and a Lie x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3464.32,679.07,19.6,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E08 - Anniversary Adventures x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3636.51,631.28,17.4,CQ
tv,Married at First Sight (2014),Married at First Sight - S19E13 - Happily Ever After x264 EAC3 WEBDL-1080p EDITH -EHX.mkv,3154.44,584.92,18.5,CQ

Can't render this file because it has a wrong number of fields in line 14.

View File

@ -8,6 +8,8 @@ DEFAULT_XML = """<?xml version="1.0" encoding="UTF-8"?>
<processing_folder>processing</processing_folder> <processing_folder>processing</processing_folder>
<suffix> -EHX</suffix> <suffix> -EHX</suffix>
<extensions>.mkv,.mp4</extensions> <extensions>.mkv,.mp4</extensions>
<ignore_tags>ehx,megusta</ignore_tags>
<reduction_ratio_threshold>0.5</reduction_ratio_threshold>
</general> </general>
<path_mappings> <path_mappings>
<map from="P:\\tv" to="/mnt/plex/tv" /> <map from="P:\\tv" to="/mnt/plex/tv" />
@ -23,10 +25,10 @@ DEFAULT_XML = """<?xml version="1.0" encoding="UTF-8"?>
<fallback> <fallback>
<bitrate_1080>1500k</bitrate_1080> <bitrate_1080>1500k</bitrate_1080>
<maxrate_1080>1750k</maxrate_1080> <maxrate_1080>1750k</maxrate_1080>
<bufsize_1080>2250k</bufsize_1080> <bufsize_1080>2750k</bufsize_1080>
<bitrate_720>900k</bitrate_720> <bitrate_720>900k</bitrate_720>
<maxrate_720>1250k</maxrate_720> <maxrate_720>1250k</maxrate_720>
<bufsize_720>1600k</bufsize_720> <bufsize_720>1800k</bufsize_720>
</fallback> </fallback>
<filters> <filters>
<default>lanczos</default> <default>lanczos</default>
@ -36,12 +38,13 @@ DEFAULT_XML = """<?xml version="1.0" encoding="UTF-8"?>
<audio> <audio>
<stereo> <stereo>
<low>64000</low> <low>64000</low>
<medium>96000</medium> <medium>128000</medium>
<high>128000</high> <high>160000</high>
</stereo> </stereo>
<multi_channel> <multi_channel>
<low>160000</low> <low>384000</low>
<high>192000</high> <medium>512000</medium>
<high>640000</high>
</multi_channel> </multi_channel>
</audio> </audio>
</config> </config>
@ -66,6 +69,12 @@ def load_config_xml(path: Path) -> dict:
extensions_elem = general.find("extensions") if general is not None else None extensions_elem = general.find("extensions") if general is not None else None
extensions = extensions_elem.text.split(",") if extensions_elem is not None else [".mkv", ".mp4"] extensions = extensions_elem.text.split(",") if extensions_elem is not None else [".mkv", ".mp4"]
ignore_tags_elem = general.find("ignore_tags") if general is not None else None
ignore_tags = ignore_tags_elem.text.split(",") if ignore_tags_elem is not None else ["ehx", "megusta"]
reduction_ratio_elem = general.find("reduction_ratio_threshold") if general is not None else None
reduction_ratio_threshold = float(reduction_ratio_elem.text) if reduction_ratio_elem is not None else 0.5
# --- Path Mappings --- # --- Path Mappings ---
path_mappings = {} path_mappings = {}
for m in root.findall("path_mappings/map"): for m in root.findall("path_mappings/map"):
@ -116,6 +125,8 @@ def load_config_xml(path: Path) -> dict:
"processing_folder": processing_folder, "processing_folder": processing_folder,
"suffix": suffix, "suffix": suffix,
"extensions": [ext.lower() for ext in extensions], "extensions": [ext.lower() for ext in extensions],
"ignore_tags": [tag.strip() for tag in ignore_tags],
"reduction_ratio_threshold": reduction_ratio_threshold,
"path_mappings": path_mappings, "path_mappings": path_mappings,
"encode": {"cq": cq, "fallback": fallback, "filters": filters}, "encode": {"cq": cq, "fallback": fallback, "filters": filters},
"audio": audio "audio": audio

File diff suppressed because it is too large Load Diff

107
main.py
View File

@ -5,6 +5,7 @@ import json
import os import os
import shutil import shutil
import subprocess import subprocess
import sys
from pathlib import Path from pathlib import Path
from core.config_helper import load_config_xml from core.config_helper import load_config_xml
@ -30,19 +31,22 @@ if not TRACKER_FILE.exists():
# ============================= # =============================
# AUDIO BUCKET LOGIC # AUDIO BUCKET LOGIC
# ============================= # =============================
def choose_audio_bitrate(channels: int, bitrate_kbps: int, audio_config: dict) -> int: def choose_audio_bitrate(channels: int, bitrate_kbps: int, audio_config: dict, is_1080_class: bool) -> int:
if channels == 2: """Choose audio bitrate based on channel count and detected bitrate"""
if bitrate_kbps < 80: # Normalize to 2ch or 6ch output
return audio_config["stereo"]["low"] output_channels = 6 if channels >= 6 else 2
elif bitrate_kbps < 112:
return audio_config["stereo"]["medium"] if output_channels == 2:
else: if is_1080_class:
# Stereo-channel 1080p+: always use high
return audio_config["stereo"]["high"] return audio_config["stereo"]["high"]
else: else:
if bitrate_kbps < 176: # Stereo-channel 720p: always use medium
return audio_config["multi_channel"]["low"] return audio_config["stereo"]["medium"]
else: else:
return audio_config["multi_channel"]["high"] # Multi-channel (6ch+): always use medium
return audio_config["multi_channel"]["medium"]
# ============================= # =============================
# PATH NORMALIZATION # PATH NORMALIZATION
@ -70,9 +74,18 @@ def get_audio_streams(input_file: Path):
channels = s.get("channels", 2) channels = s.get("channels", 2)
src_lang = s.get("tags", {}).get("language", "und") src_lang = s.get("tags", {}).get("language", "und")
bit_rate_meta = int(s.get("bit_rate", 0)) if s.get("bit_rate") else 0 bit_rate_meta = int(s.get("bit_rate", 0)) if s.get("bit_rate") else 0
# For multi-channel (6ch+), don't look at bitrate - always use medium
if channels >= 6:
avg_bitrate_kbps = 0 # Placeholder, won't be used
else:
# For stereo: try metadata first, then estimate, then default
if bit_rate_meta:
avg_bitrate_kbps = int(bit_rate_meta / 1000)
else:
try: try:
duration = float(s.get("duration", 0)) duration = float(s.get("duration", 0))
if duration and bit_rate_meta == 0: if duration:
fmt_cmd = [ fmt_cmd = [
"ffprobe","-v","error","-show_entries","format=size,duration", "ffprobe","-v","error","-show_entries","format=size,duration",
"-of","json", str(input_file) "-of","json", str(input_file)
@ -83,12 +96,13 @@ def get_audio_streams(input_file: Path):
total_duration = float(fmt_data.get("format", {}).get("duration", duration)) total_duration = float(fmt_data.get("format", {}).get("duration", duration))
n_streams = len(data.get("streams", [])) n_streams = len(data.get("streams", []))
avg_bitrate_kbps = int((size_bytes*8/n_streams)/total_duration/1000) avg_bitrate_kbps = int((size_bytes*8/n_streams)/total_duration/1000)
elif duration and bit_rate_meta:
avg_bitrate_kbps = int(bit_rate_meta / 1000)
else: else:
avg_bitrate_kbps = 128 # Default for stereo
avg_bitrate_kbps = 160
except Exception: except Exception:
avg_bitrate_kbps = 128 # Default: stereo only
avg_bitrate_kbps = 160
streams.append((index, channels, avg_bitrate_kbps, src_lang, int(bit_rate_meta / 1000))) streams.append((index, channels, avg_bitrate_kbps, src_lang, int(bit_rate_meta / 1000)))
return streams return streams
@ -96,16 +110,18 @@ def get_audio_streams(input_file: Path):
# FFmpeg ENCODE # FFmpeg ENCODE
# ============================= # =============================
def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, scale_height: int, def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, scale_height: int,
filter_flags: str, audio_config: dict, method: str): filter_flags: str, audio_config: dict, method: str, bitrate_config: dict):
streams = get_audio_streams(input_file) streams = get_audio_streams(input_file)
header = f"\n🧩 ENCODE SETTINGS\n • Resolution: {scale_width}x{scale_height}\n • Scale Filter: {filter_flags}\n • CQ: {cq if method=='CQ' else 'N/A'}\n • Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)\n • Audio Streams:" header = f"\n🧩 ENCODE SETTINGS\n • Resolution: {scale_width}x{scale_height}\n • Scale Filter: {filter_flags}\n • CQ: {cq if method=='CQ' else 'N/A'}\n • Video Encoder: av1_nvenc (preset p1, pix_fmt p010le)\n • Audio Streams:"
logger.info(header) logger.info(header)
print(" ") print(" ")
# print(header)
for (index, channels, avg_bitrate, src_lang, meta_bitrate) in streams: for (index, channels, avg_bitrate, src_lang, meta_bitrate) in streams:
br = choose_audio_bitrate(channels, avg_bitrate, audio_config) # Normalize to 2ch or 6ch output
line = f" - Stream #{index}: {channels}ch, src={src_lang}, avg_bitrate={avg_bitrate}kbps, metadata={meta_bitrate}kbps, bucket_target={br/1000:.1f}kbps" is_1080_class = scale_height >= 1080 or scale_width >= 1920
output_channels = 6 if is_1080_class and channels >= 6 else 2
br = choose_audio_bitrate(output_channels, avg_bitrate, audio_config, is_1080_class)
line = f" - Stream #{index}: {channels}ch→{output_channels}ch, src={src_lang}, detected_bitrate={avg_bitrate}kbps, bucket_target={br/1000:.0f}kbps"
print(line) print(line)
logger.info(line) logger.info(line)
@ -117,15 +133,19 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
if method=="CQ": if method=="CQ":
cmd += ["-cq", str(cq)] cmd += ["-cq", str(cq)]
else: else:
if scale_height>=1080: # Use bitrate config (fallback mode)
vb, maxrate, bufsize = "1500k","1750k","2250k" res_key = "1080" if scale_height >= 1080 or scale_width >= 1920 else "720"
else: vb = bitrate_config.get(f"bitrate_{res_key}", "900k")
vb, maxrate, bufsize = "900k","1250k","1600k" maxrate = bitrate_config.get(f"maxrate_{res_key}", "1250k")
cmd += ["-b:v",vb,"-maxrate",maxrate,"-bufsize",bufsize] bufsize = bitrate_config.get(f"bufsize_{res_key}", "1800k")
cmd += ["-b:v", vb, "-maxrate", maxrate, "-bufsize", bufsize]
for i, (index, channels, avg_bitrate, src_lang, meta_bitrate) in enumerate(streams): for i, (index, channels, avg_bitrate, src_lang, meta_bitrate) in enumerate(streams):
br = choose_audio_bitrate(channels, avg_bitrate, audio_config) # Normalize to 2ch or 6ch output
cmd += [f"-c:a:{i}","aac",f"-b:a:{i}",str(br),f"-ac:{i}",str(channels)] is_1080_class = scale_height >= 1080 or scale_width >= 1920
output_channels = 6 if is_1080_class and channels >= 6 else 2
br = choose_audio_bitrate(output_channels, avg_bitrate, audio_config, is_1080_class)
cmd += [f"-c:a:{i}","aac",f"-b:a:{i}",str(br),f"-ac:{i}",str(output_channels,),f"-channel_layout:a:{i}", "5.1" if output_channels == 6 else "stereo"]
cmd += ["-c:s","copy",str(output_file)] cmd += ["-c:s","copy",str(output_file)]
@ -146,16 +166,20 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
# ============================= # =============================
# PROCESS FOLDER # PROCESS FOLDER
# ============================= # =============================
def process_folder(folder: Path, cq: int, resolution: str, config: dict): def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str, config: dict):
if not folder.exists(): if not folder.exists():
print(f"❌ Folder not found: {folder}") print(f"❌ Folder not found: {folder}")
logger.error(f"Folder not found: {folder}") logger.error(f"Folder not found: {folder}")
return return
audio_config = config["audio"] audio_config = config["audio"]
bitrate_config = config["encode"]["fallback"]
filters_config = config["encode"]["filters"] filters_config = config["encode"]["filters"]
suffix = config["suffix"] suffix = config["suffix"]
extensions = config["extensions"] extensions = config["extensions"]
ignore_tags = config["ignore_tags"]
reduction_ratio_threshold = config["reduction_ratio_threshold"]
res_height = 1080 if resolution=="1080" else 720 res_height = 1080 if resolution=="1080" else 720
res_width = 1920 if resolution=="1080" else 1280 res_width = 1920 if resolution=="1080" else 1280
filter_flags = filters_config.get("default","lanczos") filter_flags = filters_config.get("default","lanczos")
@ -172,12 +196,12 @@ def process_folder(folder: Path, cq: int, resolution: str, config: dict):
processing_folder.mkdir(parents=True, exist_ok=True) processing_folder.mkdir(parents=True, exist_ok=True)
# Track if we switch to bitrate mode # Track if we switch to bitrate mode
use_bitrate = False use_bitrate = True if transcode_mode == "bitrate" else False
for file in folder.rglob("*"): for file in folder.rglob("*"):
if file.suffix.lower() not in extensions: if file.suffix.lower() not in extensions:
continue continue
if any(tag.lower() in file.name.lower() for tag in ["ehx","megusta"]): if any(tag.lower() in file.name.lower() for tag in ignore_tags):
print(f"⏭️ Skipping: {file.name}") print(f"⏭️ Skipping: {file.name}")
logger.info(f"Skipping: {file.name}") logger.info(f"Skipping: {file.name}")
continue continue
@ -193,24 +217,24 @@ def process_folder(folder: Path, cq: int, resolution: str, config: dict):
method = "Bitrate" if use_bitrate else "CQ" method = "Bitrate" if use_bitrate else "CQ"
try: try:
orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, method) orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, method, bitrate_config)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print(f"❌ FFmpeg failed: {e}") print(f"❌ FFmpeg failed: {e}")
logger.error(f"FFmpeg failed: {e}") logger.error(f"FFmpeg failed: {e}")
temp_input.unlink(missing_ok=True) temp_input.unlink(missing_ok=True)
break break
if method=="CQ" and reduction_ratio>=0.5: if method=="CQ" and reduction_ratio>=reduction_ratio_threshold:
print(f"⚠️ CQ encode did not achieve target size. Switching all remaining files to Bitrate.") print(f"⚠️ CQ encode did not achieve target size ({reduction_ratio:.1%} >= {reduction_ratio_threshold:.1%}). Switching all remaining files to Bitrate.")
logger.warning("CQ encode failed target. Switching to Bitrate for remaining files.") logger.warning(f"CQ encode failed target ({reduction_ratio:.1%}). Switching to Bitrate for remaining files.")
use_bitrate = True use_bitrate = True
try: try:
# Retry current file using bitrate # Retry current file using bitrate
temp_output.unlink(missing_ok=True) temp_output.unlink(missing_ok=True)
orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, "Bitrate") orig_size, out_size, reduction_ratio = run_ffmpeg(temp_input, temp_output, cq, res_width, res_height, filter_flags, audio_config, "Bitrate", bitrate_config)
if reduction_ratio>=0.5: if reduction_ratio>=reduction_ratio_threshold:
print("❌ Bitrate encode also failed target. Stopping process.") print(f"❌ Bitrate encode also failed target ({reduction_ratio:.1%}). Stopping process.")
logger.error("Bitrate encode failed target. Stopping process.") logger.error(f"Bitrate encode failed target ({reduction_ratio:.1%}). Stopping process.")
temp_input.unlink(missing_ok=True) temp_input.unlink(missing_ok=True)
break break
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
@ -218,9 +242,9 @@ def process_folder(folder: Path, cq: int, resolution: str, config: dict):
logger.error(f"Bitrate retry failed: {e}") logger.error(f"Bitrate retry failed: {e}")
temp_input.unlink(missing_ok=True) temp_input.unlink(missing_ok=True)
break break
elif method=="Bitrate" and reduction_ratio>=0.5: elif method=="Bitrate" and reduction_ratio>=reduction_ratio_threshold:
print("❌ Bitrate encode failed target. Stopping process.") print(f"❌ Bitrate encode failed target ({reduction_ratio:.1%}). Stopping process.")
logger.error("Bitrate encode failed target. Stopping process.") logger.error(f"Bitrate encode failed target ({reduction_ratio:.1%}). Stopping process.")
temp_input.unlink(missing_ok=True) temp_input.unlink(missing_ok=True)
break break
@ -268,13 +292,14 @@ def main():
parser = argparse.ArgumentParser(description="Batch encode videos with logging and tracker") parser = argparse.ArgumentParser(description="Batch encode videos with logging and tracker")
parser.add_argument("folder", help="Path to folder containing videos") parser.add_argument("folder", help="Path to folder containing videos")
parser.add_argument("--cq", type=int, help="Override default CQ") parser.add_argument("--cq", type=int, help="Override default CQ")
parser.add_argument("--m", "--mode", dest="transcode_mode", default="cq", choices=["cq","bitrate"], help="Target resolution")
parser.add_argument("--r", "--resolution", dest="resolution", default="1080", choices=["720","1080"], help="Target resolution") parser.add_argument("--r", "--resolution", dest="resolution", default="1080", choices=["720","1080"], help="Target resolution")
args = parser.parse_args() args = parser.parse_args()
config_path = Path(__file__).parent / "config.xml" config_path = Path(__file__).parent / "config.xml"
config = load_config_xml(config_path) config = load_config_xml(config_path)
process_folder(Path(args.folder), args.cq, args.resolution, config) process_folder(Path(args.folder), args.cq, args.transcode_mode, args.resolution, config)
if __name__ == "__main__": if __name__ == "__main__":

3
paths.txt Normal file
View File

@ -0,0 +1,3 @@
"P:\movies\xXx - Return of Xander Cage (2017)\xXx Return of Xander Cage 2017 (2160p x265 10bit S84 Joy)"
"P:\movies\The Losers (2010)"
"P:\movies\Belle (2021)"

18
transcode.bat Normal file
View File

@ -0,0 +1,18 @@
@echo off
setlocal enabledelayedexpansion
for /f "usebackq delims=" %%i in ("paths.txt") do (
echo ==============================
echo Processing: %%i
echo ==============================
py main.py --r 1080 %%i
if errorlevel 1 (
echo ERROR processing %%i
echo Continuing to next item...
)
)
echo.
echo All jobs finished.
pause