strip audio
This commit is contained in:
parent
9b47d95605
commit
92c385525a
@ -16,7 +16,7 @@
|
||||
"P:\\movies\\The Trial of the Chicago 7 (2020)": 904710368,
|
||||
"P:\\movies\\Breaking (2022)": 995048915,
|
||||
"P:\\movies\\Zack Snyder's Justice League (2021)": 6428185686,
|
||||
"P:\\movies\\Premium Rush (2012)": 4184150405,
|
||||
"P:\\movies\\Premium Rush (2012)": 2174933523,
|
||||
"P:\\movies\\Daddy's Home (2015)": 734920111,
|
||||
"P:\\movies\\Concussion (2015)": 954083779,
|
||||
"P:\\movies\\Lisa Frankenstein (2024)": 975415847,
|
||||
@ -140,7 +140,7 @@
|
||||
"P:\\movies\\Harold and Kumar - Go To White Castle (2004)": 578054843,
|
||||
"P:\\movies\\Pok\u00e9mon - Destiny Deoxys (2004)": 4139612884,
|
||||
"P:\\movies\\We Live in Time (2024)": 1148398986,
|
||||
"P:\\movies\\The Suicide Squad (2021)": 5220542826,
|
||||
"P:\\movies\\The Suicide Squad (2021)": 3193385912,
|
||||
"P:\\movies\\What We Do in the Shadows (2014)": 1324961025,
|
||||
"P:\\movies\\Pok\u00e9mon the Movie - Secrets of the Jungle (2020)": 2970730073,
|
||||
"P:\\movies\\Predators (2010)": 575097100,
|
||||
@ -316,7 +316,7 @@
|
||||
"P:\\movies\\Cats & Dogs - The Revenge of Kitty Galore (2010)": 794156004,
|
||||
"P:\\movies\\Instant Family (2018)": 1039796631,
|
||||
"P:\\movies\\Predator - Killer of Killers (2025)": 816946827,
|
||||
"P:\\movies\\Little Fockers (2010)": 4277077072,
|
||||
"P:\\movies\\Little Fockers (2010)": 934347829,
|
||||
"P:\\movies\\22 Jump Street (2014)": 856601465,
|
||||
"P:\\movies\\Bambi (1942)": 577460194,
|
||||
"P:\\movies\\Sleeping Beauty (1959)": 1258101653,
|
||||
@ -628,7 +628,7 @@
|
||||
"P:\\movies\\Turning Red (2022)": 962622557,
|
||||
"P:\\movies\\Dungeons & Dragons - Honor Among Thieves (2023)": 2656730936,
|
||||
"P:\\movies\\Paycheck (2003)": 993810724,
|
||||
"P:\\movies\\Wolf Children (2012)": 4453912541,
|
||||
"P:\\movies\\Wolf Children (2012)": 1929928928,
|
||||
"P:\\movies\\Uproar (2023)": 1061433898,
|
||||
"P:\\movies\\Coup! (2024)": 900305483,
|
||||
"P:\\movies\\Old (2021)": 1043284170,
|
||||
@ -658,7 +658,7 @@
|
||||
"P:\\movies\\Transporter 3 (2008)": 629053239,
|
||||
"P:\\movies\\Red Rocket (2021)": 1250775533,
|
||||
"P:\\movies\\Chaos (2005)": 848357261,
|
||||
"P:\\movies\\Superman (2025)": 6208410119,
|
||||
"P:\\movies\\Superman (2025)": 7519012512,
|
||||
"P:\\movies\\Layer Cake (2004)": 682551661,
|
||||
"P:\\movies\\Once Upon a Christmas Miracle (2018)": 819838950,
|
||||
"P:\\movies\\You Hurt My Feelings (2023)": 895680655,
|
||||
@ -958,7 +958,7 @@
|
||||
"P:\\movies\\Jackass 3.5 (2011)": 785709162,
|
||||
"P:\\movies\\Ocean's Eight (2018)": 983734563,
|
||||
"P:\\movies\\Maze Runner - The Death Cure (2018)": 1305954358,
|
||||
"P:\\movies\\Venom - The Last Dance (2024)": 5722931819,
|
||||
"P:\\movies\\Venom - The Last Dance (2024)": 1798147779,
|
||||
"P:\\movies\\Tron (1982)": 727876107,
|
||||
"P:\\movies\\Sonic the Hedgehog 2 (2022)": 2043660783,
|
||||
"P:\\movies\\Sherlock Holmes - A Game of Shadows (2011)": 841467769,
|
||||
@ -1058,7 +1058,7 @@
|
||||
"P:\\movies\\Santa's Slay (2005)": 1677244892,
|
||||
"P:\\movies\\Nate Bargatze - Full Time Magic (2015)": 604267174,
|
||||
"P:\\movies\\MK Ultra (2022)": 937505528,
|
||||
"P:\\movies\\Captain America - Brave New World (2025)": 5999464570,
|
||||
"P:\\movies\\Captain America - Brave New World (2025)": 2240251682,
|
||||
"P:\\movies\\Mad Max 2 (1981)": 1504425460,
|
||||
"P:\\movies\\Apocalypse Now (1979)": 1771332102,
|
||||
"P:\\movies\\Rambo - Last Blood (2019)": 1025949915,
|
||||
@ -1302,7 +1302,7 @@
|
||||
"P:\\movies\\Confess, Fletch (2022)": 948327659,
|
||||
"P:\\movies\\Nine Days (2021)": 1192058593,
|
||||
"P:\\movies\\Me and Earl and the Dying Girl (2015)": 2588837590,
|
||||
"P:\\movies\\The Intern (2015)": 5020752182,
|
||||
"P:\\movies\\The Intern (2015)": 2681947283,
|
||||
"P:\\movies\\The Bounty Hunter (2010)": 840237747,
|
||||
"P:\\movies\\One Hour Photo (2002)": 926656817,
|
||||
"P:\\movies\\Life After People (2008)": 856319577,
|
||||
@ -1586,7 +1586,7 @@
|
||||
"P:\\movies\\The Phoenician Scheme (2025)": 2661907395,
|
||||
"P:\\movies\\Cinderella (2021)": 1087262833,
|
||||
"P:\\movies\\The Lego Movie 2 The Second Part (2019)": 950172844,
|
||||
"P:\\movies\\Meet the Fockers (2004)": 5949252474,
|
||||
"P:\\movies\\Meet the Fockers (2004)": 1639660403,
|
||||
"P:\\movies\\The Bad Batch (2017)": 926871424,
|
||||
"P:\\movies\\Forever Young (1992)": 977859032,
|
||||
"P:\\movies\\Halloweentown (1998)": 810513129,
|
||||
@ -2393,7 +2393,7 @@
|
||||
"P:\\movies\\Halloweentown II - Kalabar's Revenge (2001)": 1052744699,
|
||||
"P:\\movies\\The Survivors (1983)": 883588130,
|
||||
"P:\\movies\\A Bad Moms Christmas (2017)": 800570325,
|
||||
"P:\\movies\\Meet the Parents (2000)": 6321750057,
|
||||
"P:\\movies\\Meet the Parents (2000)": 1167666740,
|
||||
"P:\\movies\\Slayers (2022)": 849805353,
|
||||
"P:\\movies\\The Good Nurse (2022)": 840206859,
|
||||
"P:\\movies\\The Death and Life of Bobby Z (2007)": 788294208,
|
||||
|
||||
@ -239,7 +239,7 @@
|
||||
"P:\\tv\\Impractical Jokers": 13357380400,
|
||||
"P:\\tv\\One More Time (2024)": 6434473461,
|
||||
"P:\\tv\\Crowd Control": 9644641207,
|
||||
"P:\\tv\\Dimension 20's Adventuring Party": 12002285238,
|
||||
"P:\\tv\\Dimension 20's Adventuring Party": 12563974792,
|
||||
"P:\\tv\\Special Ops Lioness": 9765393961,
|
||||
"P:\\tv\\Ted (2024)": 3024624414,
|
||||
"P:\\tv\\Mighty Nein (2025)": 6138965943,
|
||||
|
||||
12
config.xml
12
config.xml
@ -55,19 +55,19 @@
|
||||
<cq>
|
||||
<av1>
|
||||
<tv_1080>32</tv_1080>
|
||||
<tv_720>34</tv_720>
|
||||
<tv_720>30</tv_720>
|
||||
<anime_1080>32</anime_1080>
|
||||
<anime_720>34</anime_720>
|
||||
<anime_720>30</anime_720>
|
||||
<movie_1080>32</movie_1080>
|
||||
<movie_720>34</movie_720>
|
||||
<movie_720>30</movie_720>
|
||||
</av1>
|
||||
<hevc>
|
||||
<tv_1080>28</tv_1080>
|
||||
<tv_720>30</tv_720>
|
||||
<tv_720>26</tv_720>
|
||||
<anime_1080>28</anime_1080>
|
||||
<anime_720>30</anime_720>
|
||||
<anime_720>26</anime_720>
|
||||
<movie_1080>28</movie_1080>
|
||||
<movie_720>30</movie_720>
|
||||
<movie_720>26</movie_720>
|
||||
</hevc>
|
||||
</cq>
|
||||
|
||||
|
||||
@ -605,3 +605,46 @@ movie,N/A,Adventures in the Making of “Superman”.mkv,1885.82,1191.9,63.2,192
|
||||
movie,N/A,Lex Luthor꞉ The Mind of a Master Villain.mkv,172.32,122.45,71.1,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Kryptunes꞉ The Music of “Superman”.mkv,209.9,155.56,74.1,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Breaking News꞉ The Daily Planet Returns.mkv,174.45,139.55,80.0,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Icons Forever꞉ Superman’s Enduring Legacy.mkv,196.44,146.85,74.8,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,The Justice Gang.mkv,338.06,219.86,65.0,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Pawns to Pixels꞉ Krypto Is Born.mkv,185.04,137.35,74.2,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Krypto Short꞉ School Bus Scuffle.mkv,169.9,113.54,66.8,1920x1080,1920x1080,1,28,CQ
|
||||
movie,N/A,Ponyo (2008) [1080p x265 HEVC 10bit BluRay Dual Audio AAC 5.1] [Prof] - [EHX].mkv,5677.51,2589.26,45.6,1920x1080,1920x1080,2,28,CQ
|
||||
movie,N/A,Castle in the Sky (1986) x265 AAC 5.1 Bluray-1080p Prof - [EHX].mkv,5698.25,2878.22,50.5,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E01.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,902.7,271.03,30.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E02.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1062.31,225.84,21.3,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E03.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1071.07,253.31,23.7,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E04.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,916.31,261.55,28.5,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E05.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1109.18,270.18,24.4,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E06.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,930.07,266.65,28.7,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E07.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1020.44,245.17,24.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E08.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,964.19,241.3,25.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E09.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1370.19,231.42,16.9,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E10.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1961.91,323.2,16.5,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E11.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1812.19,282.68,15.6,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E12.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1750.2,325.31,18.6,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E13.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1903.86,399.95,21.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E14.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1636.72,332.96,20.3,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E15.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1374.76,256.48,18.7,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E16.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1775.36,406.08,22.9,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E17.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1666.95,419.35,25.2,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E18.REPACK.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1909.93,304.69,16.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E19.REPACK.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1276.32,406.7,31.9,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E20.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1241.33,307.68,24.8,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E21.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1413.57,287.12,20.3,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E22.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1278.65,358.63,28.0,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E23.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1112.42,275.71,24.8,1920x1080,1920x1080,2,28,CQ
|
||||
anime,2.5 Dimensional Seduction (2024),2.5.Dimensional.Seduction.2024.S01E24.REPACK.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold - [EHX].mkv,1138.06,223.54,19.6,1920x1080,1920x1080,2,28,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E01 - An Unfamiliar Forest x264 Opus Bluray-1080p Netaro - [EHX].mkv,1551.71,253.39,16.3,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E02 - Curry is Justice! x264 Opus Bluray-1080p Netaro - [EHX].mkv,1601.88,256.06,16.0,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E03 - A Small House in a Big Forest x264 Opus Bluray-1080p Netaro - [EHX].mkv,1564.89,265.71,17.0,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E04 - Adventurers (Kenichi and His Eight Allies) x264 Opus Bluray-1080p Netaro - [EHX].mkv,1730.43,267.56,15.5,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E05 - The Moon Over an Old Castle x264 Opus Bluray-1080p Netaro - [EHX].mkv,1593.87,264.18,16.6,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E06 - The Book Loving x264 Opus Bluray-1080p Netaro - [EHX].mkv,1596.12,297.05,18.6,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E07 - Creep Forth! x264 Opus Bluray-1080p Netaro - [EHX].mkv,1629.39,261.02,16.0,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E08 - The Timid Mage x264 Opus Bluray-1080p Netaro - [EHX].mkv,1438.94,242.13,16.8,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),"The Daily Life of a Middle-Aged Online Shopper in Another World - S01E09 - So It's a Spider, So What x264 Opus Bluray-1080p Netaro - [EHX].mkv",1557.73,265.76,17.1,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E10 - The Story of Canals x264 Opus Bluray-1080p Netaro - [EHX].mkv,1562.25,261.33,16.7,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E11 - Shock! x264 Opus Bluray-1080p Netaro - [EHX].mkv,1624.52,279.0,17.2,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),"The Daily Life of a Middle-Aged Online Shopper in Another World - S01E12 - The Unreasonable, Mischievous Princess x264 Opus Bluray-1080p Netaro - [EHX].mkv",1491.54,264.92,17.8,1920x1080,1920x1080,1,32,CQ
|
||||
anime,The Daily Life of a Middle-Aged Online Shopper in Another World (2025),The Daily Life of a Middle-Aged Online Shopper in Another World - S01E13 - To Sa-Kura x264 Opus Bluray-1080p Netaro - [EHX].mkv,1607.51,269.68,16.8,1920x1080,1920x1080,1,32,CQ
|
||||
|
||||
|
Can't render this file because it has a wrong number of fields in line 14.
|
@ -12,11 +12,14 @@ logger = setup_logger(Path(__file__).parent.parent / "logs")
|
||||
|
||||
def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, scale_height: int,
|
||||
src_width: int, src_height: int, filter_flags: str, audio_config: dict,
|
||||
method: str, bitrate_config: dict, encoder: str = "nvenc", subtitle_file: Path = None, audio_language: str = None,
|
||||
audio_filter_config: dict = None, test_mode: bool = False):
|
||||
method: str, bitrate_config: dict, encoder: str = "nvenc", subtitle_files: list = None, audio_language: str = None,
|
||||
audio_filter_config: dict = None, test_mode: bool = False, strip_all_titles: bool = False):
|
||||
"""
|
||||
Run FFmpeg encode with comprehensive logging.
|
||||
|
||||
Args:
|
||||
strip_all_titles: If True, strip all title metadata from all audio tracks
|
||||
|
||||
Returns tuple: (orig_size, out_size, reduction_ratio)
|
||||
"""
|
||||
streams = get_audio_streams(input_file)
|
||||
@ -114,9 +117,10 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
|
||||
|
||||
cmd = ["ffmpeg","-y","-i",str(input_file)]
|
||||
|
||||
# Add subtitle input if present
|
||||
if subtitle_file:
|
||||
cmd.extend(["-i", str(subtitle_file)])
|
||||
# Add subtitle inputs if present
|
||||
if subtitle_files:
|
||||
for sub_file in subtitle_files:
|
||||
cmd.extend(["-i", str(sub_file)])
|
||||
|
||||
# In test mode, only encode first 15 minutes
|
||||
if test_mode:
|
||||
@ -131,8 +135,9 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
|
||||
cmd.extend(["-map", f"0:{index}"])
|
||||
|
||||
# Add subtitle mapping if present
|
||||
if subtitle_file:
|
||||
cmd.extend(["-map", "1:s"])
|
||||
if subtitle_files:
|
||||
for i, _ in enumerate(subtitle_files):
|
||||
cmd.extend(["-map", f"{i+1}:s"])
|
||||
else:
|
||||
cmd.extend(["-map", "0:s?"])
|
||||
|
||||
@ -161,8 +166,9 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
|
||||
# Only add language metadata if explicitly provided
|
||||
if audio_language:
|
||||
cmd += [f"-metadata:s:a:{i}", f"language={audio_language}"]
|
||||
# Strip title metadata if requested
|
||||
if strip_title:
|
||||
# Strip title metadata if requested (but preserve commentary tracks)
|
||||
should_strip = strip_title or (strip_all_titles and not (title and "commentary" in title.lower()))
|
||||
if should_strip:
|
||||
cmd += [f"-metadata:s:a:{i}", "title="]
|
||||
else:
|
||||
# Re-encode with target bitrate
|
||||
@ -186,12 +192,15 @@ def run_ffmpeg(input_file: Path, output_file: Path, cq: int, scale_width: int, s
|
||||
# Only add language metadata if explicitly provided
|
||||
if audio_language:
|
||||
cmd += [f"-metadata:s:a:{i}", f"language={audio_language}"]
|
||||
# Strip title metadata if requested
|
||||
if strip_title:
|
||||
# Strip title metadata if requested (but preserve commentary tracks)
|
||||
should_strip = strip_title or (strip_all_titles and not (title and "commentary" in title.lower()))
|
||||
if should_strip:
|
||||
cmd += [f"-metadata:s:a:{i}", "title="]
|
||||
# Add subtitle codec and metadata if subtitles are present
|
||||
if subtitle_file:
|
||||
cmd += ["-c:s", "srt", "-metadata:s:s:0", "language=eng"]
|
||||
if subtitle_files:
|
||||
cmd += ["-c:s", "srt"]
|
||||
for i in range(len(subtitle_files)):
|
||||
cmd += ["-metadata:s:s:" + str(i), "language=eng"]
|
||||
else:
|
||||
cmd += ["-c:s", "copy"]
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ def _cleanup_temp_files(temp_input: Path, temp_output: Path):
|
||||
logger.warning(f"Could not delete temp output {temp_output.name}: {e}")
|
||||
|
||||
|
||||
def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str, config: dict, tracker_file: Path, test_mode: bool = False, audio_language: str = None, filter_audio: bool = None, audio_select: str = None, encoder: str = "hevc"):
|
||||
def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str, config: dict, tracker_file: Path, test_mode: bool = False, audio_language: str = None, filter_audio: bool = None, audio_select: str = None, encoder: str = "hevc", strip_all_titles: bool = False):
|
||||
"""
|
||||
Process all video files in folder with appropriate encoding settings.
|
||||
|
||||
@ -50,6 +50,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
filter_audio: If True, show interactive audio selection prompt. If None, use config setting.
|
||||
audio_select: Pre-selected audio streams (comma-separated, e.g., "1,2"). Skips interactive prompt.
|
||||
encoder: Video encoder to use - "hevc" for HEVC NVENC 10-bit (default) or "av1" for AV1 NVENC 8-bit.
|
||||
strip_all_titles: If True, strip all title metadata from all audio tracks.
|
||||
"""
|
||||
if not folder.exists():
|
||||
print(f"❌ Folder not found: {folder}")
|
||||
@ -143,33 +144,33 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
if temp_input.exists() and os.access(temp_input, os.R_OK):
|
||||
break
|
||||
|
||||
# Check for matching subtitle file
|
||||
subtitle_file = None
|
||||
# Check for matching subtitle files (supports multiple)
|
||||
subtitle_files = []
|
||||
if config.get("general", {}).get("subtitles", {}).get("enabled", True):
|
||||
subtitle_exts = config.get("general", {}).get("subtitles", {}).get("extensions", ".vtt,.srt,.ass,.ssa,.sub").split(",")
|
||||
# Look for subtitle with same base name (e.g., movie.vtt or movie.en.vtt)
|
||||
parent_dir = file.parent
|
||||
base_name = file.stem
|
||||
found_subs = set() # Track found subtitles to avoid duplicates
|
||||
|
||||
# Look for subtitle files with same base name (e.g., movie.vtt or movie.en.vtt)
|
||||
for ext in subtitle_exts:
|
||||
ext = ext.strip()
|
||||
# Try exact match first (movie.vtt)
|
||||
potential_sub = file.with_suffix(ext)
|
||||
if potential_sub.exists():
|
||||
subtitle_file = potential_sub
|
||||
print(f"📝 Found subtitle: {subtitle_file.name}")
|
||||
logger.info(f"Found subtitle file: {subtitle_file.name}")
|
||||
break
|
||||
if potential_sub.exists() and str(potential_sub) not in found_subs:
|
||||
subtitle_files.append(potential_sub)
|
||||
found_subs.add(str(potential_sub))
|
||||
print(f"📝 Found subtitle: {potential_sub.name}")
|
||||
logger.info(f"Found subtitle file: {potential_sub.name}")
|
||||
|
||||
# Try language prefix variants (movie.en.vtt, movie.eng.vtt, etc.)
|
||||
# Look for files matching the pattern basename.*language*.ext
|
||||
parent_dir = file.parent
|
||||
base_name = file.stem
|
||||
for item in parent_dir.glob(f"{base_name}.*{ext}"):
|
||||
subtitle_file = item
|
||||
print(f"📝 Found subtitle: {subtitle_file.name}")
|
||||
logger.info(f"Found subtitle file: {subtitle_file.name}")
|
||||
break
|
||||
|
||||
if subtitle_file:
|
||||
break
|
||||
# Try language prefix variants (movie.en.vtt, movie.eng.vtt, movie.en.forced.srt, etc.)
|
||||
# Look for all files matching the pattern basename.*ext
|
||||
for item in sorted(parent_dir.glob(f"{base_name}.*{ext}")):
|
||||
if str(item) not in found_subs:
|
||||
subtitle_files.append(item)
|
||||
found_subs.add(str(item))
|
||||
print(f"📝 Found subtitle: {item.name}")
|
||||
logger.info(f"Found subtitle file: {item.name}")
|
||||
|
||||
try:
|
||||
# Detect source resolution and determine target resolution
|
||||
@ -253,8 +254,8 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
|
||||
orig_size, out_size, reduction_ratio = run_ffmpeg(
|
||||
temp_input, temp_output, file_cq, res_width, res_height, src_width, src_height,
|
||||
filter_flags, audio_config, method, bitrate_config, selected_encoder, subtitle_file, audio_language,
|
||||
audio_filter_config, test_mode
|
||||
filter_flags, audio_config, method, bitrate_config, selected_encoder, subtitle_files, audio_language,
|
||||
audio_filter_config, test_mode, strip_all_titles
|
||||
)
|
||||
|
||||
# Check if encode met size target
|
||||
@ -281,7 +282,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
'target_resolution': target_resolution,
|
||||
'file_cq': file_cq,
|
||||
'is_tv': is_tv,
|
||||
'subtitle_file': subtitle_file
|
||||
'subtitle_files': subtitle_files
|
||||
})
|
||||
consecutive_failures += 1
|
||||
if consecutive_failures >= max_consecutive:
|
||||
@ -325,7 +326,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
'target_resolution': target_resolution,
|
||||
'file_cq': file_cq,
|
||||
'is_tv': is_tv,
|
||||
'subtitle_file': subtitle_file
|
||||
'subtitle_files': subtitle_files
|
||||
})
|
||||
consecutive_failures += 1
|
||||
if consecutive_failures >= max_consecutive:
|
||||
@ -350,7 +351,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
_save_successful_encoding(
|
||||
file, temp_input, temp_output, orig_size, out_size,
|
||||
reduction_ratio, method, src_width, src_height, res_width, res_height,
|
||||
file_cq, tracker_file, folder, is_tv, suffix, config, test_mode, subtitle_file
|
||||
file_cq, tracker_file, folder, is_tv, suffix, config, test_mode, subtitle_files
|
||||
)
|
||||
|
||||
# In test mode, stop after first successful file
|
||||
@ -403,7 +404,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
file_data['res_width'], file_data['res_height'],
|
||||
file_data['src_width'], file_data['src_height'],
|
||||
filter_flags, audio_config, "Bitrate", bitrate_config, selected_encoder,
|
||||
file_data.get('subtitle_file'), audio_language, None, test_mode
|
||||
file_data.get('subtitle_files'), audio_language, None, test_mode, strip_all_titles
|
||||
)
|
||||
|
||||
# Check if bitrate also failed
|
||||
@ -426,7 +427,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
file_data['res_width'], file_data['res_height'],
|
||||
file_data['file_cq'], tracker_file,
|
||||
folder, file_data['is_tv'], suffix, config, False,
|
||||
file_data.get('subtitle_file')
|
||||
file_data.get('subtitle_files')
|
||||
)
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
@ -457,7 +458,7 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
|
||||
|
||||
def _save_successful_encoding(file, temp_input, temp_output, orig_size, out_size,
|
||||
reduction_ratio, method, src_width, src_height, res_width, res_height,
|
||||
file_cq, tracker_file, folder, is_tv, suffix, config=None, test_mode=False, subtitle_file=None):
|
||||
file_cq, tracker_file, folder, is_tv, suffix, config=None, test_mode=False, subtitle_files=None):
|
||||
"""Helper function to save successfully encoded files with [EHX] tag and clean up subtitle files."""
|
||||
|
||||
# In test mode, show ratio and skip file move/cleanup
|
||||
@ -548,14 +549,16 @@ def _save_successful_encoding(file, temp_input, temp_output, orig_size, out_size
|
||||
else:
|
||||
logger.info(f"Featurettes file preserved at origin: {file.name}")
|
||||
|
||||
# Clean up subtitle file if it was embedded
|
||||
if subtitle_file and subtitle_file.exists():
|
||||
try:
|
||||
subtitle_file.unlink()
|
||||
print(f"🗑️ Removed embedded subtitle: {subtitle_file.name}")
|
||||
logger.info(f"Removed embedded subtitle: {subtitle_file.name}")
|
||||
except Exception as e:
|
||||
logger.warning(f"Could not delete subtitle file {subtitle_file.name}: {e}")
|
||||
# Clean up subtitle files if they exist
|
||||
if subtitle_files:
|
||||
for sub_file in subtitle_files:
|
||||
if sub_file.exists():
|
||||
try:
|
||||
sub_file.unlink()
|
||||
print(f"🗑️ Removed subtitle: {sub_file.name}")
|
||||
logger.info(f"Removed subtitle: {sub_file.name}")
|
||||
except Exception as e:
|
||||
logger.warning(f"Could not delete subtitle file {sub_file.name}: {e}")
|
||||
except Exception as e:
|
||||
print(f"⚠️ Could not delete files: {e}")
|
||||
logger.warning(f"Could not delete files: {e}")
|
||||
|
||||
1531
logs/conversion.log
1531
logs/conversion.log
File diff suppressed because it is too large
Load Diff
@ -58,3 +58,6 @@
|
||||
2026-01-08 14:26:55 | Easter Eggs.mkv | CQ failed: Size threshold not met (227.9%)
|
||||
2026-01-08 16:15:19 | Trailer [kr].mkv | CQ failed: Size threshold not met (106.3%)
|
||||
2026-01-08 18:49:04 | The Ultimate Villain.mkv | CQ failed: Size threshold not met (85.9%)
|
||||
2026-01-10 09:27:28 | 2.5.Dimensional.Seduction.2024.S01E01.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold.mkv | Unexpected error: name 'subtitle_file' is not defined
|
||||
2026-01-10 09:39:03 | 2.5.Dimensional.Seduction.2024.S01E01.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold.mkv | Unexpected error: name 'subtitle_file' is not defined
|
||||
2026-01-10 09:44:37 | 2.5.Dimensional.Seduction.2024.S01E01.REPACK2.BDRip-1080p.x265.FLAC.EAC3.Dual.Audio-Freehold.mkv | Unexpected error: name 'subtitle_file' is not defined
|
||||
|
||||
6
main.py
6
main.py
@ -129,6 +129,10 @@ Examples:
|
||||
"--audio-select", dest="audio_select", default=None,
|
||||
help="Pre-select audio streams to keep (comma-separated, e.g., 1,2). Skips interactive prompt. Requires --filter-audio"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--strip-all-titles", dest="strip_all_titles", default=False, action="store_true",
|
||||
help="Strip title metadata from all audio tracks (default: False)"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Load configuration
|
||||
@ -145,7 +149,7 @@ Examples:
|
||||
return
|
||||
|
||||
# Process folder
|
||||
process_folder(folder, args.cq, args.transcode_mode, args.resolution, config, TRACKER_FILE, args.test_mode, args.audio_language, args.filter_audio, args.audio_select, args.encoder)
|
||||
process_folder(folder, args.cq, args.transcode_mode, args.resolution, config, TRACKER_FILE, args.test_mode, args.audio_language, args.filter_audio, args.audio_select, args.encoder, args.strip_all_titles)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
18
paths.txt
18
paths.txt
@ -1,9 +1,9 @@
|
||||
"P:\movies\Wolf Children (2012)"
|
||||
"P:\movies\The Intern (2015)"
|
||||
"P:\movies\The Suicide Squad (2021)"
|
||||
"P:\movies\Venom - The Last Dance (2024)"
|
||||
--r 720 "P:\movies\Meet the Fockers (2004)"
|
||||
--r 720 "P:\movies\Meet the Parents (2000)"
|
||||
--r 720 "P:\movies\Little Fockers (2010)"
|
||||
--r 1080 "P:\movies\Premium Rush (2012)"
|
||||
"P:\movies\Captain America - Brave New World (2025)"
|
||||
"P:\movies\Ponyo (2008)"
|
||||
"P:\movies\Castle in the Sky (1986)"
|
||||
"P:\movies\The Secret Life of Walter Mitty (2013)"
|
||||
"P:\movies\Let's Be Cops (2014)"
|
||||
"P:\movies\Deadpool & Wolverine (2024)"
|
||||
"P:\movies\The Secret World of Arrietty (2010)"
|
||||
"P:\movies\The Irregular at Magic High School - The Girl Who Summons the Stars (2017)"
|
||||
"P:\movies\The French Dispatch (2021)"
|
||||
"P:\movies\John Carter (2012)"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user