mdhiggins / sickbeard_mp4_automator

Automatically convert video files to a standardized format with metadata tagging to create a beautiful and uniform media library
MIT License
1.51k stars 201 forks source link

More customizable audio sorting (and an issue with a crash) #1558

Closed VXsz closed 2 years ago

VXsz commented 2 years ago

Is your feature request related to a problem? Please describe. I have a few remuxes which have AC3 5.1 audio tracks within them (along the original lossless track), problem is that I'd like to use my libfdk_aac track to be the first (& default) instead of the AC3 one, the problem in this case happens when the AC3 track is 5.1, it prefers it over the new AAC track

Describe the solution you'd like A way to choose my new encoded audio to be the first & default instead of any other audio

Also, it would be great if there's a way to make the sorting like this:

AAC AC3 AC3 (Commentary 1) AC3 (Commentary 2) DTS-HD DTS-HD (Commentary 1) DTS-HD (Commentary 2)

Instead of this:

AAC AC3 DTS-HD AC3 (Commentary 1) DTS-HD (Commentary 1) AC3 (Commentary 2) DTS-HD (Commentary 2)

Through this feature isn't that necessary

Describe alternatives you've considered I have tried to make it stop encoding if the same audio exist by using the stream-codec-combinations setting in the config, but I maybe not understanding it correctly as it seems to be crashing (log & config for this below), it seems to still want to encode (even through the ac3 audio codec is in the approved list and is from the same lossless track), I'm guessing this setting is just so it reconginzes similair tracks, and any unapproved tracks would still be encoded, but I still don't get why it keeps crashing

also ignoring it if it's not 5.1/7.1 (since I'm targeting 5.1/7.1 audio) would be a huge feature

Current crash log:

2022-03-12 19:54:19 - SABPostProcess - INFO - SAB post processing started.
2022-03-12 19:54:19 - resources.readsettings - INFO - /usr/bin/python3
2022-03-12 19:54:19 - resources.readsettings - DEBUG - Loading default config file.
2022-03-12 19:54:19 - resources.readsettings - INFO - Loading config file /home/vxsz/tools/sickbeard_mp4_automator/config/autoProcess.ini.
2022-03-12 19:54:19 - SABPostProcess - DEBUG - Path: /home/vxsz/Downloads/complete/Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR.
2022-03-12 19:54:19 - SABPostProcess - DEBUG - Category: radarr.
2022-03-12 19:54:19 - SABPostProcess - DEBUG - Categories: ['sickbeard', 'sonarr', 'radarr', 'sickrage', 'bypass'].
2022-03-12 19:54:19 - SABPostProcess - DEBUG - NZB: Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR.nzb.
2022-03-12 19:54:19 - SABPostProcess - INFO - Performing conversion
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Initiating custom validation method.
2022-03-12 19:54:20 - SABPostProcess - INFO - Processing file /home/vxsz/Downloads/complete/Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR/Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR.mkv.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Process started.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - FFMPEG codecs w/ encoders and decoders:
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - {'012v': {'decoders': ['012v'], 'encoders': []}, '4xm': {'decoders': ['4xm'], 'encoders': []}, '8bps': {'decoders': ['8bps'], 'encoders': []}, 'a64_multi': {'decoders': [], 'encoders': ['a64_multi']}, 'a64_multi5': {'decoders': [], 'encoders': ['a64_multi5']}, 'aasc': {'decoders': ['aasc'], 'encoders': []}, 'agm': {'decoders': ['agm'], 'encoders': []}, 'aic': {'decoders': ['aic'], 'encoders': []}, 'alias_pix': {'decoders': ['alias_pix'], 'encoders': ['alias_pix']}, 'amv': {'decoders': ['amv'], 'encoders': ['amv']}, 'anm': {'decoders': ['anm'], 'encoders': []}, 'ansi': {'decoders': ['ansi'], 'encoders': []}, 'apng': {'decoders': ['apng'], 'encoders': ['apng']}, 'arbc': {'decoders': ['arbc'], 'encoders': []}, 'argo': {'decoders': ['argo'], 'encoders': []}, 'asv1': {'decoders': ['asv1'], 'encoders': ['asv1']}, 'asv2': {'decoders': ['asv2'], 'encoders': ['asv2']}, 'aura': {'decoders': ['aura'], 'encoders': []}, 'aura2': {'decoders': ['aura2'], 'encoders': []}, 'av1': {'decoders': ['av1'], 'encoders': ['libaom-av1', 'libsvtav1']}, 'avrn': {'decoders': ['avrn'], 'encoders': []}, 'avrp': {'decoders': ['avrp'], 'encoders': ['avrp']}, 'avs': {'decoders': ['avs'], 'encoders': []}, 'avs2': {'decoders': [], 'encoders': []}, 'avs3': {'decoders': [], 'encoders': []}, 'avui': {'decoders': ['avui'], 'encoders': ['avui']}, 'ayuv': {'decoders': ['ayuv'], 'encoders': ['ayuv']}, 'bethsoftvid': {'decoders': ['bethsoftvid'], 'encoders': []}, 'bfi': {'decoders': ['bfi'], 'encoders': []}, 'binkvideo': {'decoders': ['binkvideo'], 'encoders': []}, 'bintext': {'decoders': ['bintext'], 'encoders': []}, 'bitpacked': {'decoders': ['bitpacked'], 'encoders': ['bitpacked']}, 'bmp': {'decoders': ['bmp'], 'encoders': ['bmp']}, 'bmv_video': {'decoders': ['bmv_video'], 'encoders': []}, 'brender_pix': {'decoders': ['brender_pix'], 'encoders': []}, 'c93': {'decoders': ['c93'], 'encoders': []}, 'cavs': {'decoders': ['cavs'], 'encoders': []}, 'cdgraphics': {'decoders': ['cdgraphics'], 'encoders': []}, 'cdtoons': {'decoders': ['cdtoons'], 'encoders': []}, 'cdxl': {'decoders': ['cdxl'], 'encoders': []}, 'cfhd': {'decoders': ['cfhd'], 'encoders': ['cfhd']}, 'cinepak': {'decoders': ['cinepak'], 'encoders': ['cinepak']}, 'clearvideo': {'decoders': ['clearvideo'], 'encoders': []}, 'cljr': {'decoders': ['cljr'], 'encoders': ['cljr']}, 'cllc': {'decoders': ['cllc'], 'encoders': []}, 'cmv': {'decoders': ['cmv'], 'encoders': []}, 'cpia': {'decoders': ['cpia'], 'encoders': []}, 'cri': {'decoders': ['cri'], 'encoders': []}, 'cscd': {'decoders': ['cscd'], 'encoders': []}, 'cyuv': {'decoders': ['cyuv'], 'encoders': []}, 'daala': {'decoders': [], 'encoders': []}, 'dds': {'decoders': ['dds'], 'encoders': []}, 'dfa': {'decoders': ['dfa'], 'encoders': []}, 'dirac': {'decoders': ['dirac'], 'encoders': ['dirac']}, 'dnxhd': {'decoders': ['dnxhd'], 'encoders': ['dnxhd']}, 'dpx': {'decoders': ['dpx'], 'encoders': ['dpx']}, 'dsicinvideo': {'decoders': ['dsicinvideo'], 'encoders': []}, 'dvvideo': {'decoders': ['dvvideo'], 'encoders': ['dvvideo']}, 'dxa': {'decoders': ['dxa'], 'encoders': []}, 'dxtory': {'decoders': ['dxtory'], 'encoders': []}, 'dxv': {'decoders': ['dxv'], 'encoders': []}, 'escape124': {'decoders': ['escape124'], 'encoders': []}, 'escape130': {'decoders': ['escape130'], 'encoders': []}, 'exr': {'decoders': ['exr'], 'encoders': ['exr']}, 'ffv1': {'decoders': ['ffv1'], 'encoders': ['ffv1']}, 'ffvhuff': {'decoders': ['ffvhuff'], 'encoders': ['ffvhuff']}, 'fic': {'decoders': ['fic'], 'encoders': []}, 'fits': {'decoders': ['fits'], 'encoders': ['fits']}, 'flashsv': {'decoders': ['flashsv'], 'encoders': ['flashsv']}, 'flashsv2': {'decoders': ['flashsv2'], 'encoders': ['flashsv2']}, 'flic': {'decoders': ['flic'], 'encoders': []}, 'flv1': {'decoders': ['flv1'], 'encoders': ['flv']}, 'fmvc': {'decoders': ['fmvc'], 'encoders': []}, 'fraps': {'decoders': ['fraps'], 'encoders': []}, 'frwu': {'decoders': ['frwu'], 'encoders': []}, 'g2m': {'decoders': ['g2m'], 'encoders': []}, 'gdv': {'decoders': ['gdv'], 'encoders': []}, 'gem': {'decoders': ['gem'], 'encoders': []}, 'gif': {'decoders': ['gif'], 'encoders': ['gif']}, 'h261': {'decoders': ['h261'], 'encoders': ['h261']}, 'h263': {'decoders': ['h263'], 'encoders': ['h263', 'h263_v4l2m2m']}, 'h263i': {'decoders': ['h263i'], 'encoders': []}, 'h263p': {'decoders': ['h263p'], 'encoders': ['h263p']}, 'h264': {'decoders': ['h264'], 'encoders': ['libx264', 'libx264rgb', 'h264_amf', 'h264_v4l2m2m']}, 'hap': {'decoders': ['hap'], 'encoders': []}, 'hevc': {'decoders': ['hevc'], 'encoders': ['libx265', 'hevc_amf', 'hevc_v4l2m2m']}, 'hnm4video': {'decoders': ['hnm4video'], 'encoders': []}, 'hq_hqa': {'decoders': ['hq_hqa'], 'encoders': []}, 'hqx': {'decoders': ['hqx'], 'encoders': []}, 'huffyuv': {'decoders': ['huffyuv'], 'encoders': ['huffyuv']}, 'hymt': {'decoders': ['hymt'], 'encoders': []}, 'idcin': {'decoders': ['idcin'], 'encoders': []}, 'idf': {'decoders': ['idf'], 'encoders': []}, 'iff_ilbm': {'decoders': ['iff_ilbm'], 'encoders': []}, 'imm4': {'decoders': ['imm4'], 'encoders': []}, 'imm5': {'decoders': ['imm5'], 'encoders': []}, 'indeo2': {'decoders': ['indeo2'], 'encoders': []}, 'indeo3': {'decoders': ['indeo3'], 'encoders': []}, 'indeo4': {'decoders': ['indeo4'], 'encoders': []}, 'indeo5': {'decoders': ['indeo5'], 'encoders': []}, 'interplayvideo': {'decoders': ['interplayvideo'], 'encoders': []}, 'ipu': {'decoders': ['ipu'], 'encoders': []}, 'jpeg2000': {'decoders': ['jpeg2000'], 'encoders': ['jpeg2000']}, 'jpegls': {'decoders': ['jpegls'], 'encoders': ['jpegls']}, 'jv': {'decoders': ['jv'], 'encoders': []}, 'kgv1': {'decoders': ['kgv1'], 'encoders': []}, 'kmvc': {'decoders': ['kmvc'], 'encoders': []}, 'lagarith': {'decoders': ['lagarith'], 'encoders': []}, 'ljpeg': {'decoders': [], 'encoders': ['ljpeg']}, 'loco': {'decoders': ['loco'], 'encoders': []}, 'lscr': {'decoders': ['lscr'], 'encoders': []}, 'm101': {'decoders': ['m101'], 'encoders': []}, 'mad': {'decoders': ['mad'], 'encoders': []}, 'magicyuv': {'decoders': ['magicyuv'], 'encoders': ['magicyuv']}, 'mdec': {'decoders': ['mdec'], 'encoders': []}, 'mimic': {'decoders': ['mimic'], 'encoders': []}, 'mjpeg': {'decoders': ['mjpeg'], 'encoders': ['mjpeg']}, 'mjpegb': {'decoders': ['mjpegb'], 'encoders': []}, 'mmvideo': {'decoders': ['mmvideo'], 'encoders': []}, 'mobiclip': {'decoders': ['mobiclip'], 'encoders': []}, 'motionpixels': {'decoders': ['motionpixels'], 'encoders': []}, 'mpeg1video': {'decoders': ['mpeg1video'], 'encoders': ['mpeg1video']}, 'mpeg2video': {'decoders': ['mpeg2video'], 'encoders': ['mpeg2video']}, 'mpeg4': {'decoders': ['mpeg4'], 'encoders': ['mpeg4', 'libxvid', 'mpeg4_v4l2m2m']}, 'msa1': {'decoders': ['msa1'], 'encoders': []}, 'mscc': {'decoders': ['mscc'], 'encoders': []}, 'msmpeg4v1': {'decoders': ['msmpeg4v1'], 'encoders': []}, 'msmpeg4v2': {'decoders': ['msmpeg4v2'], 'encoders': ['msmpeg4v2']}, 'msmpeg4v3': {'decoders': ['msmpeg4v3'], 'encoders': ['msmpeg4']}, 'msp2': {'decoders': ['msp2'], 'encoders': []}, 'msrle': {'decoders': ['msrle'], 'encoders': []}, 'mss1': {'decoders': ['mss1'], 'encoders': []}, 'mss2': {'decoders': ['mss2'], 'encoders': []}, 'msvideo1': {'decoders': ['msvideo1'], 'encoders': ['msvideo1']}, 'mszh': {'decoders': ['mszh'], 'encoders': []}, 'mts2': {'decoders': ['mts2'], 'encoders': []}, 'mv30': {'decoders': ['mv30'], 'encoders': []}, 'mvc1': {'decoders': ['mvc1'], 'encoders': []}, 'mvc2': {'decoders': ['mvc2'], 'encoders': []}, 'mvdv': {'decoders': ['mvdv'], 'encoders': []}, 'mvha': {'decoders': ['mvha'], 'encoders': []}, 'mwsc': {'decoders': ['mwsc'], 'encoders': []}, 'mxpeg': {'decoders': ['mxpeg'], 'encoders': []}, 'notchlc': {'decoders': ['notchlc'], 'encoders': []}, 'nuv': {'decoders': ['nuv'], 'encoders': []}, 'paf_video': {'decoders': ['paf_video'], 'encoders': []}, 'pam': {'decoders': ['pam'], 'encoders': ['pam']}, 'pbm': {'decoders': ['pbm'], 'encoders': ['pbm']}, 'pcx': {'decoders': ['pcx'], 'encoders': ['pcx']}, 'pfm': {'decoders': ['pfm'], 'encoders': ['pfm']}, 'pgm': {'decoders': ['pgm'], 'encoders': ['pgm']}, 'pgmyuv': {'decoders': ['pgmyuv'], 'encoders': ['pgmyuv']}, 'pgx': {'decoders': ['pgx'], 'encoders': []}, 'photocd': {'decoders': ['photocd'], 'encoders': []}, 'pictor': {'decoders': ['pictor'], 'encoders': []}, 'pixlet': {'decoders': ['pixlet'], 'encoders': []}, 'png': {'decoders': ['png'], 'encoders': ['png']}, 'ppm': {'decoders': ['ppm'], 'encoders': ['ppm']}, 'prores': {'decoders': ['prores'], 'encoders': ['prores']}, 'prosumer': {'decoders': ['prosumer'], 'encoders': []}, 'psd': {'decoders': ['psd'], 'encoders': []}, 'ptx': {'decoders': ['ptx'], 'encoders': []}, 'qdraw': {'decoders': ['qdraw'], 'encoders': []}, 'qpeg': {'decoders': ['qpeg'], 'encoders': []}, 'qtrle': {'decoders': ['qtrle'], 'encoders': ['qtrle']}, 'r10k': {'decoders': ['r10k'], 'encoders': ['r10k']}, 'r210': {'decoders': ['r210'], 'encoders': ['r210']}, 'rasc': {'decoders': ['rasc'], 'encoders': []}, 'rawvideo': {'decoders': ['rawvideo'], 'encoders': ['rawvideo']}, 'rl2': {'decoders': ['rl2'], 'encoders': []}, 'roq': {'decoders': ['roq'], 'encoders': ['roqvideo']}, 'rpza': {'decoders': ['rpza'], 'encoders': ['rpza']}, 'rscc': {'decoders': ['rscc'], 'encoders': []}, 'rv10': {'decoders': ['rv10'], 'encoders': ['rv10']}, 'rv20': {'decoders': ['rv20'], 'encoders': ['rv20']}, 'rv30': {'decoders': ['rv30'], 'encoders': []}, 'rv40': {'decoders': ['rv40'], 'encoders': []}, 'sanm': {'decoders': ['sanm'], 'encoders': []}, 'scpr': {'decoders': ['scpr'], 'encoders': []}, 'screenpresso': {'decoders': ['screenpresso'], 'encoders': []}, 'sga': {'decoders': ['sga'], 'encoders': []}, 'sgi': {'decoders': ['sgi'], 'encoders': ['sgi']}, 'sgirle': {'decoders': ['sgirle'], 'encoders': []}, 'sheervideo': {'decoders': ['sheervideo'], 'encoders': []}, 'simbiosis_imx': {'decoders': ['simbiosis_imx'], 'encoders': []}, 'smackvideo': {'decoders': ['smackvideo'], 'encoders': []}, 'smc': {'decoders': ['smc'], 'encoders': ['smc']}, 'smvjpeg': {'decoders': ['smvjpeg'], 'encoders': []}, 'snow': {'decoders': ['snow'], 'encoders': ['snow']}, 'sp5x': {'decoders': ['sp5x'], 'encoders': []}, 'speedhq': {'decoders': ['speedhq'], 'encoders': ['speedhq']}, 'srgc': {'decoders': ['srgc'], 'encoders': []}, 'sunrast': {'decoders': ['sunrast'], 'encoders': ['sunrast']}, 'svg': {'decoders': [], 'encoders': []}, 'svq1': {'decoders': ['svq1'], 'encoders': ['svq1']}, 'svq3': {'decoders': ['svq3'], 'encoders': []}, 'targa': {'decoders': ['targa'], 'encoders': ['targa']}, 'targa_y216': {'decoders': ['targa_y216'], 'encoders': []}, 'tdsc': {'decoders': ['tdsc'], 'encoders': []}, 'tgq': {'decoders': ['tgq'], 'encoders': []}, 'tgv': {'decoders': ['tgv'], 'encoders': []}, 'theora': {'decoders': ['theora'], 'encoders': ['theora']}, 'thp': {'decoders': ['thp'], 'encoders': []}, 'tiertexseqvideo': {'decoders': ['tiertexseqvideo'], 'encoders': []}, 'tiff': {'decoders': ['tiff'], 'encoders': ['tiff']}, 'tmv': {'decoders': ['tmv'], 'encoders': []}, 'tqi': {'decoders': ['tqi'], 'encoders': []}, 'truemotion1': {'decoders': ['truemotion1'], 'encoders': []}, 'truemotion2': {'decoders': ['truemotion2'], 'encoders': []}, 'truemotion2rt': {'decoders': ['truemotion2rt'], 'encoders': []}, 'tscc': {'decoders': ['tscc'], 'encoders': []}, 'tscc2': {'decoders': ['tscc2'], 'encoders': []}, 'txd': {'decoders': ['txd'], 'encoders': []}, 'ulti': {'decoders': ['ulti'], 'encoders': []}, 'utvideo': {'decoders': ['utvideo'], 'encoders': ['utvideo']}, 'v210': {'decoders': ['v210'], 'encoders': ['v210']}, 'v210x': {'decoders': ['v210x'], 'encoders': []}, 'v308': {'decoders': ['v308'], 'encoders': ['v308']}, 'v408': {'decoders': ['v408'], 'encoders': ['v408']}, 'v410': {'decoders': ['v410'], 'encoders': ['v410']}, 'vb': {'decoders': ['vb'], 'encoders': []}, 'vble': {'decoders': ['vble'], 'encoders': []}, 'vc1': {'decoders': ['vc1'], 'encoders': []}, 'vc1image': {'decoders': ['vc1image'], 'encoders': []}, 'vcr1': {'decoders': ['vcr1'], 'encoders': []}, 'vixl': {'decoders': ['vixl'], 'encoders': []}, 'vmdvideo': {'decoders': ['vmdvideo'], 'encoders': []}, 'vmnc': {'decoders': ['vmnc'], 'encoders': []}, 'vp3': {'decoders': ['vp3'], 'encoders': []}, 'vp4': {'decoders': ['vp4'], 'encoders': []}, 'vp5': {'decoders': ['vp5'], 'encoders': []}, 'vp6': {'decoders': ['vp6'], 'encoders': []}, 'vp6a': {'decoders': ['vp6a'], 'encoders': []}, 'vp6f': {'decoders': ['vp6f'], 'encoders': []}, 'vp7': {'decoders': ['vp7'], 'encoders': []}, 'vp8': {'decoders': ['vp8'], 'encoders': ['libvpx', 'vp8_v4l2m2m']}, 'vp9': {'decoders': ['vp9'], 'encoders': ['libvpx-vp9']}, 'vvc': {'decoders': [], 'encoders': []}, 'wcmv': {'decoders': ['wcmv'], 'encoders': []}, 'webp': {'decoders': ['webp'], 'encoders': ['webp']}, 'wmv1': {'decoders': ['wmv1'], 'encoders': ['wmv1']}, 'wmv2': {'decoders': ['wmv2'], 'encoders': ['wmv2']}, 'wmv3': {'decoders': ['wmv3'], 'encoders': []}, 'wmv3image': {'decoders': ['wmv3image'], 'encoders': []}, 'wnv1': {'decoders': ['wnv1'], 'encoders': []}, 'wrapped_avframe': {'decoders': ['wrapped_avframe'], 'encoders': ['wrapped_avframe']}, 'ws_vqa': {'decoders': ['ws_vqa'], 'encoders': []}, 'xan_wc3': {'decoders': ['xan_wc3'], 'encoders': []}, 'xan_wc4': {'decoders': ['xan_wc4'], 'encoders': []}, 'xbin': {'decoders': ['xbin'], 'encoders': []}, 'xbm': {'decoders': ['xbm'], 'encoders': ['xbm']}, 'xface': {'decoders': ['xface'], 'encoders': ['xface']}, 'xpm': {'decoders': ['xpm'], 'encoders': []}, 'xwd': {'decoders': ['xwd'], 'encoders': ['xwd']}, 'y41p': {'decoders': ['y41p'], 'encoders': ['y41p']}, 'ylc': {'decoders': ['ylc'], 'encoders': []}, 'yop': {'decoders': ['yop'], 'encoders': []}, 'yuv4': {'decoders': ['yuv4'], 'encoders': ['yuv4']}, 'zerocodec': {'decoders': ['zerocodec'], 'encoders': []}, 'zlib': {'decoders': ['zlib'], 'encoders': ['zlib']}, 'zmbv': {'decoders': ['zmbv'], 'encoders': ['zmbv']}, '4gv': {'decoders': [], 'encoders': []}, '8svx_exp': {'decoders': ['8svx_exp'], 'encoders': []}, '8svx_fib': {'decoders': ['8svx_fib'], 'encoders': []}, 'aac': {'decoders': ['aac'], 'encoders': ['aac', 'libfdk_aac']}, 'aac_latm': {'decoders': ['aac_latm'], 'encoders': []}, 'ac3': {'decoders': ['ac3'], 'encoders': ['ac3', 'ac3_fixed']}, 'acelp.kelvin': {'decoders': ['acelp.kelvin'], 'encoders': []}, 'adpcm_4xm': {'decoders': ['adpcm_4xm'], 'encoders': []}, 'adpcm_adx': {'decoders': ['adpcm_adx'], 'encoders': ['adpcm_adx']}, 'adpcm_afc': {'decoders': ['adpcm_afc'], 'encoders': []}, 'adpcm_agm': {'decoders': ['adpcm_agm'], 'encoders': []}, 'adpcm_aica': {'decoders': ['adpcm_aica'], 'encoders': []}, 'adpcm_argo': {'decoders': ['adpcm_argo'], 'encoders': ['adpcm_argo']}, 'adpcm_ct': {'decoders': ['adpcm_ct'], 'encoders': []}, 'adpcm_dtk': {'decoders': ['adpcm_dtk'], 'encoders': []}, 'adpcm_ea': {'decoders': ['adpcm_ea'], 'encoders': []}, 'adpcm_ea_maxis_xa': {'decoders': ['adpcm_ea_maxis_xa'], 'encoders': []}, 'adpcm_ea_r1': {'decoders': ['adpcm_ea_r1'], 'encoders': []}, 'adpcm_ea_r2': {'decoders': ['adpcm_ea_r2'], 'encoders': []}, 'adpcm_ea_r3': {'decoders': ['adpcm_ea_r3'], 'encoders': []}, 'adpcm_ea_xas': {'decoders': ['adpcm_ea_xas'], 'encoders': []}, 'adpcm_g722': {'decoders': ['adpcm_g722'], 'encoders': ['g722']}, 'adpcm_g726': {'decoders': ['adpcm_g726'], 'encoders': ['g726']}, 'adpcm_g726le': {'decoders': ['adpcm_g726le'], 'encoders': ['g726le']}, 'adpcm_ima_acorn': {'decoders': ['adpcm_ima_acorn'], 'encoders': []}, 'adpcm_ima_alp': {'decoders': ['adpcm_ima_alp'], 'encoders': ['adpcm_ima_alp']}, 'adpcm_ima_amv': {'decoders': ['adpcm_ima_amv'], 'encoders': ['adpcm_ima_amv']}, 'adpcm_ima_apc': {'decoders': ['adpcm_ima_apc'], 'encoders': []}, 'adpcm_ima_apm': {'decoders': ['adpcm_ima_apm'], 'encoders': ['adpcm_ima_apm']}, 'adpcm_ima_cunning': {'decoders': ['adpcm_ima_cunning'], 'encoders': []}, 'adpcm_ima_dat4': {'decoders': ['adpcm_ima_dat4'], 'encoders': []}, 'adpcm_ima_dk3': {'decoders': ['adpcm_ima_dk3'], 'encoders': []}, 'adpcm_ima_dk4': {'decoders': ['adpcm_ima_dk4'], 'encoders': []}, 'adpcm_ima_ea_eacs': {'decoders': ['adpcm_ima_ea_eacs'], 'encoders': []}, 'adpcm_ima_ea_sead': {'decoders': ['adpcm_ima_ea_sead'], 'encoders': []}, 'adpcm_ima_iss': {'decoders': ['adpcm_ima_iss'], 'encoders': []}, 'adpcm_ima_moflex': {'decoders': ['adpcm_ima_moflex'], 'encoders': []}, 'adpcm_ima_mtf': {'decoders': ['adpcm_ima_mtf'], 'encoders': []}, 'adpcm_ima_oki': {'decoders': ['adpcm_ima_oki'], 'encoders': []}, 'adpcm_ima_qt': {'decoders': ['adpcm_ima_qt'], 'encoders': ['adpcm_ima_qt']}, 'adpcm_ima_rad': {'decoders': ['adpcm_ima_rad'], 'encoders': []}, 'adpcm_ima_smjpeg': {'decoders': ['adpcm_ima_smjpeg'], 'encoders': []}, 'adpcm_ima_ssi': {'decoders': ['adpcm_ima_ssi'], 'encoders': ['adpcm_ima_ssi']}, 'adpcm_ima_wav': {'decoders': ['adpcm_ima_wav'], 'encoders': ['adpcm_ima_wav']}, 'adpcm_ima_ws': {'decoders': ['adpcm_ima_ws'], 'encoders': ['adpcm_ima_ws']}, 'adpcm_ms': {'decoders': ['adpcm_ms'], 'encoders': ['adpcm_ms']}, 'adpcm_mtaf': {'decoders': ['adpcm_mtaf'], 'encoders': []}, 'adpcm_psx': {'decoders': ['adpcm_psx'], 'encoders': []}, 'adpcm_sbpro_2': {'decoders': ['adpcm_sbpro_2'], 'encoders': []}, 'adpcm_sbpro_3': {'decoders': ['adpcm_sbpro_3'], 'encoders': []}, 'adpcm_sbpro_4': {'decoders': ['adpcm_sbpro_4'], 'encoders': []}, 'adpcm_swf': {'decoders': ['adpcm_swf'], 'encoders': ['adpcm_swf']}, 'adpcm_thp': {'decoders': ['adpcm_thp'], 'encoders': []}, 'adpcm_thp_le': {'decoders': ['adpcm_thp_le'], 'encoders': []}, 'adpcm_vima': {'decoders': ['adpcm_vima'], 'encoders': []}, 'adpcm_xa': {'decoders': ['adpcm_xa'], 'encoders': []}, 'adpcm_yamaha': {'decoders': ['adpcm_yamaha'], 'encoders': ['adpcm_yamaha']}, 'adpcm_zork': {'decoders': ['adpcm_zork'], 'encoders': []}, 'alac': {'decoders': ['alac'], 'encoders': ['alac']}, 'amr_nb': {'decoders': ['amr_nb'], 'encoders': ['libopencore_amrnb']}, 'amr_wb': {'decoders': ['amr_wb'], 'encoders': []}, 'ape': {'decoders': ['ape'], 'encoders': []}, 'aptx': {'decoders': ['aptx'], 'encoders': ['aptx']}, 'aptx_hd': {'decoders': ['aptx_hd'], 'encoders': ['aptx_hd']}, 'atrac1': {'decoders': ['atrac1'], 'encoders': []}, 'atrac3': {'decoders': ['atrac3'], 'encoders': []}, 'atrac3al': {'decoders': ['atrac3al'], 'encoders': []}, 'atrac3p': {'decoders': ['atrac3p'], 'encoders': []}, 'atrac3pal': {'decoders': ['atrac3pal'], 'encoders': []}, 'atrac9': {'decoders': ['atrac9'], 'encoders': []}, 'avc': {'decoders': ['avc'], 'encoders': []}, 'binkaudio_dct': {'decoders': ['binkaudio_dct'], 'encoders': []}, 'binkaudio_rdft': {'decoders': ['binkaudio_rdft'], 'encoders': []}, 'bmv_audio': {'decoders': ['bmv_audio'], 'encoders': []}, 'celt': {'decoders': [], 'encoders': []}, 'codec2': {'decoders': [], 'encoders': []}, 'comfortnoise': {'decoders': ['comfortnoise'], 'encoders': ['comfortnoise']}, 'cook': {'decoders': ['cook'], 'encoders': []}, 'derf_dpcm': {'decoders': ['derf_dpcm'], 'encoders': []}, 'dolby_e': {'decoders': ['dolby_e'], 'encoders': []}, 'dsd_lsbf': {'decoders': ['dsd_lsbf'], 'encoders': []}, 'dsd_lsbf_planar': {'decoders': ['dsd_lsbf_planar'], 'encoders': []}, 'dsd_msbf': {'decoders': ['dsd_msbf'], 'encoders': []}, 'dsd_msbf_planar': {'decoders': ['dsd_msbf_planar'], 'encoders': []}, 'dsicinaudio': {'decoders': ['dsicinaudio'], 'encoders': []}, 'dss_sp': {'decoders': ['dss_sp'], 'encoders': []}, 'dst': {'decoders': ['dst'], 'encoders': []}, 'dts': {'decoders': ['dts'], 'encoders': ['dca']}, 'dvaudio': {'decoders': ['dvaudio'], 'encoders': []}, 'eac3': {'decoders': ['eac3'], 'encoders': ['eac3']}, 'evrc': {'decoders': ['evrc'], 'encoders': []}, 'fastaudio': {'decoders': ['fastaudio'], 'encoders': []}, 'flac': {'decoders': ['flac'], 'encoders': ['flac']}, 'g723_1': {'decoders': ['g723_1'], 'encoders': ['g723_1']}, 'g729': {'decoders': ['g729'], 'encoders': []}, 'gremlin_dpcm': {'decoders': ['gremlin_dpcm'], 'encoders': []}, 'gsm': {'decoders': ['gsm'], 'encoders': []}, 'gsm_ms': {'decoders': ['gsm_ms'], 'encoders': []}, 'hca': {'decoders': ['hca'], 'encoders': []}, 'hcom': {'decoders': ['hcom'], 'encoders': []}, 'iac': {'decoders': ['iac'], 'encoders': []}, 'ilbc': {'decoders': ['ilbc'], 'encoders': []}, 'imc': {'decoders': ['imc'], 'encoders': []}, 'interplay_dpcm': {'decoders': ['interplay_dpcm'], 'encoders': []}, 'interplayacm': {'decoders': ['interplayacm'], 'encoders': []}, 'mace3': {'decoders': ['mace3'], 'encoders': []}, 'mace6': {'decoders': ['mace6'], 'encoders': []}, 'metasound': {'decoders': ['metasound'], 'encoders': []}, 'mlp': {'decoders': ['mlp'], 'encoders': ['mlp']}, 'mp1': {'decoders': ['mp1'], 'encoders': []}, 'mp2': {'decoders': ['mp2'], 'encoders': ['mp2', 'mp2fixed']}, 'mp3': {'decoders': ['mp3'], 'encoders': ['libmp3lame']}, 'mp3adu': {'decoders': ['mp3adu'], 'encoders': []}, 'mp3on4': {'decoders': ['mp3on4'], 'encoders': []}, 'mp4als': {'decoders': ['mp4als'], 'encoders': []}, 'mpegh_3d_audio': {'decoders': [], 'encoders': []}, 'msnsiren': {'decoders': ['msnsiren'], 'encoders': []}, 'musepack7': {'decoders': ['musepack7'], 'encoders': []}, 'musepack8': {'decoders': ['musepack8'], 'encoders': []}, 'nellymoser': {'decoders': ['nellymoser'], 'encoders': ['nellymoser']}, 'opus': {'decoders': ['opus'], 'encoders': ['opus', 'libopus']}, 'paf_audio': {'decoders': ['paf_audio'], 'encoders': []}, 'pcm_alaw': {'decoders': ['pcm_alaw'], 'encoders': ['pcm_alaw']}, 'pcm_bluray': {'decoders': ['pcm_bluray'], 'encoders': []}, 'pcm_dvd': {'decoders': ['pcm_dvd'], 'encoders': ['pcm_dvd']}, 'pcm_f16le': {'decoders': ['pcm_f16le'], 'encoders': []}, 'pcm_f24le': {'decoders': ['pcm_f24le'], 'encoders': []}, 'pcm_f32be': {'decoders': ['pcm_f32be'], 'encoders': ['pcm_f32be']}, 'pcm_f32le': {'decoders': ['pcm_f32le'], 'encoders': ['pcm_f32le']}, 'pcm_f64be': {'decoders': ['pcm_f64be'], 'encoders': ['pcm_f64be']}, 'pcm_f64le': {'decoders': ['pcm_f64le'], 'encoders': ['pcm_f64le']}, 'pcm_lxf': {'decoders': ['pcm_lxf'], 'encoders': []}, 'pcm_mulaw': {'decoders': ['pcm_mulaw'], 'encoders': ['pcm_mulaw']}, 'pcm_s16be': {'decoders': ['pcm_s16be'], 'encoders': ['pcm_s16be']}, 'pcm_s16be_planar': {'decoders': ['pcm_s16be_planar'], 'encoders': ['pcm_s16be_planar']}, 'pcm_s16le': {'decoders': ['pcm_s16le'], 'encoders': ['pcm_s16le']}, 'pcm_s16le_planar': {'decoders': ['pcm_s16le_planar'], 'encoders': ['pcm_s16le_planar']}, 'pcm_s24be': {'decoders': ['pcm_s24be'], 'encoders': ['pcm_s24be']}, 'pcm_s24daud': {'decoders': ['pcm_s24daud'], 'encoders': ['pcm_s24daud']}, 'pcm_s24le': {'decoders': ['pcm_s24le'], 'encoders': ['pcm_s24le']}, 'pcm_s24le_planar': {'decoders': ['pcm_s24le_planar'], 'encoders': ['pcm_s24le_planar']}, 'pcm_s32be': {'decoders': ['pcm_s32be'], 'encoders': ['pcm_s32be']}, 'pcm_s32le': {'decoders': ['pcm_s32le'], 'encoders': ['pcm_s32le']}, 'pcm_s32le_planar': {'decoders': ['pcm_s32le_planar'], 'encoders': ['pcm_s32le_planar']}, 'pcm_s64be': {'decoders': ['pcm_s64be'], 'encoders': ['pcm_s64be']}, 'pcm_s64le': {'decoders': ['pcm_s64le'], 'encoders': ['pcm_s64le']}, 'pcm_s8': {'decoders': ['pcm_s8'], 'encoders': ['pcm_s8']}, 'pcm_s8_planar': {'decoders': ['pcm_s8_planar'], 'encoders': ['pcm_s8_planar']}, 'pcm_sga': {'decoders': ['pcm_sga'], 'encoders': []}, 'pcm_u16be': {'decoders': ['pcm_u16be'], 'encoders': ['pcm_u16be']}, 'pcm_u16le': {'decoders': ['pcm_u16le'], 'encoders': ['pcm_u16le']}, 'pcm_u24be': {'decoders': ['pcm_u24be'], 'encoders': ['pcm_u24be']}, 'pcm_u24le': {'decoders': ['pcm_u24le'], 'encoders': ['pcm_u24le']}, 'pcm_u32be': {'decoders': ['pcm_u32be'], 'encoders': ['pcm_u32be']}, 'pcm_u32le': {'decoders': ['pcm_u32le'], 'encoders': ['pcm_u32le']}, 'pcm_u8': {'decoders': ['pcm_u8'], 'encoders': ['pcm_u8']}, 'pcm_vidc': {'decoders': ['pcm_vidc'], 'encoders': ['pcm_vidc']}, 'qcelp': {'decoders': ['qcelp'], 'encoders': []}, 'qdm2': {'decoders': ['qdm2'], 'encoders': []}, 'qdmc': {'decoders': ['qdmc'], 'encoders': []}, 'ra_144': {'decoders': ['ra_144'], 'encoders': ['real_144']}, 'ra_288': {'decoders': ['ra_288'], 'encoders': []}, 'ralf': {'decoders': ['ralf'], 'encoders': []}, 'roq_dpcm': {'decoders': ['roq_dpcm'], 'encoders': ['roq_dpcm']}, 's302m': {'decoders': ['s302m'], 'encoders': ['s302m']}, 'sbc': {'decoders': ['sbc'], 'encoders': ['sbc']}, 'sdx2_dpcm': {'decoders': ['sdx2_dpcm'], 'encoders': []}, 'shorten': {'decoders': ['shorten'], 'encoders': []}, 'sipr': {'decoders': ['sipr'], 'encoders': []}, 'siren': {'decoders': ['siren'], 'encoders': []}, 'smackaudio': {'decoders': ['smackaudio'], 'encoders': []}, 'smv': {'decoders': [], 'encoders': []}, 'sol_dpcm': {'decoders': ['sol_dpcm'], 'encoders': []}, 'sonic': {'decoders': ['sonic'], 'encoders': ['sonic']}, 'sonicls': {'decoders': [], 'encoders': ['sonicls']}, 'speex': {'decoders': ['speex'], 'encoders': []}, 'tak': {'decoders': ['tak'], 'encoders': []}, 'truehd': {'decoders': ['truehd'], 'encoders': ['truehd']}, 'truespeech': {'decoders': ['truespeech'], 'encoders': []}, 'tta': {'decoders': ['tta'], 'encoders': ['tta']}, 'twinvq': {'decoders': ['twinvq'], 'encoders': []}, 'vmdaudio': {'decoders': ['vmdaudio'], 'encoders': []}, 'vorbis': {'decoders': ['vorbis'], 'encoders': ['vorbis', 'libvorbis']}, 'wavesynth': {'decoders': ['wavesynth'], 'encoders': []}, 'wavpack': {'decoders': ['wavpack'], 'encoders': ['wavpack']}, 'westwood_snd1': {'decoders': ['westwood_snd1'], 'encoders': []}, 'wmalossless': {'decoders': ['wmalossless'], 'encoders': []}, 'wmapro': {'decoders': ['wmapro'], 'encoders': []}, 'wmav1': {'decoders': ['wmav1'], 'encoders': ['wmav1']}, 'wmav2': {'decoders': ['wmav2'], 'encoders': ['wmav2']}, 'wmavoice': {'decoders': ['wmavoice'], 'encoders': []}, 'xan_dpcm': {'decoders': ['xan_dpcm'], 'encoders': []}, 'xma1': {'decoders': ['xma1'], 'encoders': []}, 'xma2': {'decoders': ['xma2'], 'encoders': []}, 'bin_data': {'decoders': [], 'encoders': []}, 'dvd_nav_packet': {'decoders': [], 'encoders': []}, 'epg': {'decoders': [], 'encoders': []}, 'klv': {'decoders': [], 'encoders': []}, 'mpegts': {'decoders': [], 'encoders': []}, 'otf': {'decoders': [], 'encoders': []}, 'scte_35': {'decoders': [], 'encoders': []}, 'timed_id3': {'decoders': [], 'encoders': []}, 'ttf': {'decoders': [], 'encoders': []}, 'arib_caption': {'decoders': [], 'encoders': []}, 'ass': {'decoders': ['ass'], 'encoders': ['ssa', 'ass']}, 'dvb_subtitle': {'decoders': ['dvb_subtitle'], 'encoders': ['dvbsub']}, 'dvb_teletext': {'decoders': [], 'encoders': []}, 'dvd_subtitle': {'decoders': ['dvd_subtitle'], 'encoders': ['dvdsub']}, 'eia_608': {'decoders': ['eia_608'], 'encoders': []}, 'hdmv_pgs_subtitle': {'decoders': ['hdmv_pgs_subtitle'], 'encoders': []}, 'hdmv_text_subtitle': {'decoders': [], 'encoders': []}, 'jacosub': {'decoders': ['jacosub'], 'encoders': []}, 'microdvd': {'decoders': ['microdvd'], 'encoders': []}, 'mov_text': {'decoders': ['mov_text'], 'encoders': ['mov_text']}, 'mpl2': {'decoders': ['mpl2'], 'encoders': []}, 'pjs': {'decoders': ['pjs'], 'encoders': []}, 'realtext': {'decoders': ['realtext'], 'encoders': []}, 'sami': {'decoders': ['sami'], 'encoders': []}, 'srt': {'decoders': [], 'encoders': []}, 'ssa': {'decoders': [], 'encoders': []}, 'stl': {'decoders': ['stl'], 'encoders': []}, 'subrip': {'decoders': ['subrip'], 'encoders': ['srt', 'subrip']}, 'subviewer': {'decoders': ['subviewer'], 'encoders': []}, 'subviewer1': {'decoders': ['subviewer1'], 'encoders': []}, 'text': {'decoders': ['text'], 'encoders': ['text']}, 'ttml': {'decoders': [], 'encoders': ['ttml']}, 'vplayer': {'decoders': ['vplayer'], 'encoders': []}, 'webvtt': {'decoders': ['webvtt'], 'encoders': ['webvtt']}, 'xsub': {'decoders': ['xsub'], 'encoders': ['xsub']}}
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found hearing in stream title, setting hearing_impaired disposition to True.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Input Data
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - {
"format": "matroska,webm",
"format-fullname": "unknown",
"video": {
"index": 0,
"codec": "hevc",
"bitrate": 52894273,
"pix_fmt": "yuv420p10le",
"profile": "2",
"fps": 23.976023976023978,
"framedata": {
"pix_fmt": "yuv420p10le",
"color_space": "bt2020nc",
"color_primaries": "bt2020",
"color_transfer": "smpte2084",
"side_data_list": [
{
"side_data_type": "Mastering display metadata",
"red_x": "34000/50000",
"red_y": "16000/50000",
"green_x": "13250/50000",
"green_y": "34500/50000",
"blue_x": "7500/50000",
"blue_y": "3000/50000",
"white_point_x": "15635/50000",
"white_point_y": "16450/50000",
"min_luminance": "1/10000",
"max_luminance": "10000000/10000"
},
{
"side_data_type": "Content light level metadata",
"max_content": 0,
"max_average": 0
},
{
"side_data_type": "H.26[45] User Data Unregistered SEI message"
},
{
"side_data_type": "H.26[45] User Data Unregistered SEI message"
},
{
"side_data_type": "Dolby Vision RPU Data"
},
{
"side_data_type": "Dolby Vision Metadata",
"rpu_type": 2,
"rpu_format": 18,
"vdr_rpu_profile": 1,
"vdr_rpu_level": 0,
"chroma_resampling_explicit_filter_flag": 0,
"coef_data_type": 0,
"coef_log2_denom": 23,
"vdr_rpu_normalized_idc": 1,
"bl_video_full_range_flag": 0,
"bl_bit_depth": 10,
"el_bit_depth": 10,
"vdr_bit_depth": 12,
"spatial_resampling_filter_flag": 0,
"el_spatial_resampling_filter_flag": 0,
"disable_residual_flag": 1,
"vdr_rpu_id": 0,
"mapping_color_space": 0,
"mapping_chroma_format_idc": 0,
"nlq_method_idc": -1,
"nlq_method_idc_name": "none",
"num_x_partitions": 1,
"num_y_partitions": 1,
"components": [
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
},
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
},
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
}
],
"dm_metadata_id": 0,
"scene_refresh_flag": 1,
"ycc_to_rgb_matrix": "9574/8192 0/8192 13802/8192 9574/8192 -1540/8192 -5348/8192 9574/8192 17610/8192 0/8192",
"ycc_to_rgb_offset": "16777216/268435456 134217728/268435456 134217728/268435456",
"rgb_to_lms_matrix": "7222/16384 8771/16384 390/16384 2654/16384 12430/16384 1300/16384 0/16384 422/16384 15962/16384",
"signal_eotf": 65535,
"signal_eotf_param0": 0,
"signal_eotf_param1": 0,
"signal_eotf_param2": 0,
"signal_bit_depth": 12,
"signal_color_space": 0,
"signal_chroma_format": 0,
"signal_full_range_flag": 1,
"source_min_pq": 7,
"source_max_pq": 3079,
"source_diagonal": 42
}
]
},
"dimensions": "3840x2160",
"level": 5.1,
"field_order": "unknown"
},
"audio": [
{
"index": 1,
"codec": "truehd",
"bitrate": 5128437,
"channels": 8,
"samplerate": 48000,
"language": "eng",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
},
{
"index": 2,
"codec": "ac3",
"bitrate": 640000,
"channels": 6,
"samplerate": 48000,
"language": "eng",
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
}
],
"subtitle": [
{
"index": 3,
"codec": "hdmv_pgs_subtitle",
"bitrate": 19781,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "eng"
},
{
"index": 4,
"codec": "hdmv_pgs_subtitle",
"bitrate": 30880,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
"language": "eng"
},
{
"index": 5,
"codec": "hdmv_pgs_subtitle",
"bitrate": 11215,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "zho"
},
{
"index": 6,
"codec": "hdmv_pgs_subtitle",
"bitrate": 12348,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "zho"
},
{
"index": 7,
"codec": "hdmv_pgs_subtitle",
"bitrate": 20301,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "ell"
},
{
"index": 8,
"codec": "hdmv_pgs_subtitle",
"bitrate": 16613,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "ces"
},
{
"index": 9,
"codec": "hdmv_pgs_subtitle",
"bitrate": 16909,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "dan"
},
{
"index": 10,
"codec": "hdmv_pgs_subtitle",
"bitrate": 16808,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "nld"
},
{
"index": 11,
"codec": "hdmv_pgs_subtitle",
"bitrate": 18727,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "fin"
},
{
"index": 12,
"codec": "hdmv_pgs_subtitle",
"bitrate": 21379,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "fra"
},
{
"index": 13,
"codec": "hdmv_pgs_subtitle",
"bitrate": 18935,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "fra"
},
{
"index": 14,
"codec": "hdmv_pgs_subtitle",
"bitrate": 18996,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "deu"
},
{
"index": 15,
"codec": "hdmv_pgs_subtitle",
"bitrate": 19315,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "ita"
},
{
"index": 16,
"codec": "hdmv_pgs_subtitle",
"bitrate": 16145,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "jpn"
},
{
"index": 17,
"codec": "hdmv_pgs_subtitle",
"bitrate": 11780,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "kor"
},
{
"index": 18,
"codec": "hdmv_pgs_subtitle",
"bitrate": 18231,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "nor"
},
{
"index": 19,
"codec": "hdmv_pgs_subtitle",
"bitrate": 17641,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "pol"
},
{
"index": 20,
"codec": "hdmv_pgs_subtitle",
"bitrate": 18886,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "por"
},
{
"index": 21,
"codec": "hdmv_pgs_subtitle",
"bitrate": 20369,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "spa"
},
{
"index": 22,
"codec": "hdmv_pgs_subtitle",
"bitrate": 21240,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "spa"
},
{
"index": 23,
"codec": "hdmv_pgs_subtitle",
"bitrate": 17160,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "swe"
}
],
"attachment": []
}
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Reading video stream.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Profile: 2.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - HDR video stream detected for 0.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Pool of video codecs is ['vc1', 'avc', 'h264', 'x264', 'hevc', 'h265', 'x265', 'vp9', 'vp8'].
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Total bitrate is 59106428.0.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Total audio bitrate is 5768437.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Estimated video bitrate is 53337991.0.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Using video bitrate ratio of 1.000000, which results in 50671.091450 changing to 50671.091450.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video codec: copy.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video bitrate: 50671.09145.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video CRF: -1.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video maxrate: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video bufsize: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video level: 0.0.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video profile: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video preset: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video pix format: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video field order: unknown.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video width: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Video debug video.hdr.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Video codec parameters None.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Reading audio streams.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found indexes [] where codec parameters matched combination ['trudhd', 'ac3', 'aac']
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found indexes [] where codec parameters matched combination ['dts', 'ac3', 'aac']
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found indexes [0] where codec parameters matched combination ['truehd', 'ac3']
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found indexes [] where codec parameters matched combination ['ac3', 'aac']
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Found indexes [] where codec parameters matched combination ['dts', 'ac3']
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [[1, 2]] [stream-codec-combinations].
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Reordering streams to be in accordance with approved languages and channels [sort-streams, prefer-more-channels].
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 eng 6 channel.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Attempting to set bitrate based on source stream bitrate.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Audio codec: copy.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Channels: 6.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Bitrate: 640.0.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - VBR: 5.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Audio Profile: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Language: eng.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Filter: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Disposition: -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Debug: audio.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Audio detected for stream 1 - truehd eng 8 channel.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Attempting to set bitrate based on source stream bitrate.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Audio codec: libfdk_aac.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Channels: 8.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Bitrate: 5128.437.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - VBR: 5.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Audio Profile: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Language: eng.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Filter: None.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-03-12 19:54:20 - resources.mediaprocessor - DEBUG - Debug: audio.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Creating libfdk_aac audio stream from source stream 1.
2022-03-12 19:54:20 - resources.mediaprocessor - INFO - Copying audio stream from source stream 1 format truehd [audio-copy-original].
2022-03-12 19:54:20 - resources.mediaprocessor - ERROR - Unable to generate options, unexpected exception occurred.
Traceback (most recent call last):
File "/home/vxsz/tools/sickbeard_mp4_automator/resources/mediaprocessor.py", line 138, in process
options, preopts, postopts, ripsubopts, downloaded_subs = self.generateOptions(inputfile, info=info, original=original, tagdata=tagdata)
File "/home/vxsz/tools/sickbeard_mp4_automator/resources/mediaprocessor.py", line 989, in generateOptions
if self.purgeDuplicateStreams(acombinations, audio_settings, info):
File "/home/vxsz/tools/sickbeard_mp4_automator/resources/mediaprocessor.py", line 525, in purgeDuplicateStreams
same_codec_options = [x for x in same_channel_options if Converter.codec_name_to_ffprobe_codec_name("audio", x['codec']) == codec or (x['codec'] == 'copy' and self.getSourceStream(x['map'], info).codec == codec)]
File "/home/vxsz/tools/sickbeard_mp4_automator/resources/mediaprocessor.py", line 525, in <listcomp>
same_codec_options = [x for x in same_channel_options if Converter.codec_name_to_ffprobe_codec_name("audio", x['codec']) == codec or (x['codec'] == 'copy' and self.getSourceStream(x['map'], info).codec == codec)]
TypeError: codec_name_to_ffprobe_codec_name() takes 1 positional argument but 2 were given
2022-03-12 19:54:20 - SABPostProcess - ERROR - Converting file failed /home/vxsz/Downloads/complete/Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR/Maleficent.Mistress.of.Evil.2019.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX-FraMeSToR.mkv.
2022-03-12 19:54:20 - SABPostProcess - ERROR - No valid files found for conversion in download, aborting.
2022-03-12 19:54:20 - SABPostProcess - ERROR - Unexpected exception.
Traceback (most recent call last):
File "/home/vxsz/tools/sickbeard_mp4_automator/SABPostProcess.py", line 92, in <module>
sys.exit(1)
SystemExit: 1

Config:

[Converter]
ffmpeg = ffmpeg
ffprobe = ffprobe
threads = 0
hwaccels = 
hwaccel-decoders = h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, hevc_qsv, h264_qsv, hevc_vaapi, h264_vaapi
hwdevices = vaapi:/dev/dri/renderD128
hwaccel-output-format = vaapi:vaapi
output-directory = 
output-format = mp4
output-extension = mp4
temp-extension = 
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to = 
move-to = 
delete-original = True
sort-streams = True
process-same-extensions = True
bypass-if-copying-all = False
force-convert = False
post-process = True
wait-post-process = True
detailed-progress = False
opts-separator = ,
preopts = 
postopts = 
regex-directory-replace = [^\w\-_\. ]

[Permissions]
chmod = 0644
uid = -1
gid = -1

[Metadata]
relocate-moov = True
full-path-guess = True
tag = False
tag-language = eng
download-artwork = False
sanitize-disposition = 
strip-metadata = False
keep-titles = True

[Video]
codec = vc1, avc, h264, x264, hevc, h265, x265, vp9, vp8 
max-bitrate = 0
bitrate-ratio = 
crf = -1
crf-profiles = 
preset = 
codec-parameters = 
dynamic-parameters = False
max-width = 0
profile = 
max-level = 0.0
pix-fmt = 
filter = 
force-filter = False

[HDR]
codec = 
pix-fmt = 
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset = 
codec-parameters = 
filter = 
force-filter = False
profile = 

[Audio]
codec = libfdk_aac, aac, ac3, eac3, opus
languages = 
default-language = 
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 0
variable-bitrate = 5
max-bitrate = 0
max-channels = 0
prefer-more-channels = False
default-more-channels = True
filter = 
profile = 
force-filter = False
sample-rates = 
sample-format = 
copy-original = True
copy-original-before = False
aac-adtstoasc = False
ignore-truehd = 
ignored-dispositions = 
unique-dispositions = False
stream-codec-combinations = trudhd:ac3:aac, truehd:ac3, ac3:aac, dts:ac3:aac, dts:ac3

[Universal Audio]
codec = 
variable-bitrate = 5
first-stream-only = False
move-after = False
filter = 
profile = 
force-filter = False
channel-bitrate = 128

[Audio.ChannelFilters]
6-2 = pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE

[Subtitle]
codec = mov_text
codec-image-based = 
languages = ara, eng
default-language = ara
first-stream-of-language = False
encoding = 
burn-subtitles = False
burn-dispositions = 
embed-subs = True
embed-image-subs = False
embed-only-internal-subs = False
filename-dispositions = forced
ignore-embedded-subs = False
ignored-dispositions = hearing_impaired
unique-dispositions = False
attachment-codec = 

[Subtitle.Subliminal]
download-subs = False
download-hearing-impaired-subs = False
providers = 

[Subtitle.Subliminal.Auth]
opensubtitles = 
tvsubtitles = 

[Sonarr]
host = localhost
port = 8989
apikey = b7283bd833054648bddb42c1a3ae6c19
ssl = False
webroot = /sonarr
force-rename = False
rescan = True
block-reprocess = False

[Radarr]
host = localhost
port = 7878
apikey = 7afbdb0e50ca4d619994f76cdfbe4a2a
ssl = False
webroot = /radarr
force-rename = False
rescan = True
block-reprocess = False

[Sickbeard]
host = localhost
port = 8081
ssl = False
apikey = 
webroot = 
username = 
password = 

[Sickrage]
host = localhost
port = 8081
ssl = False
apikey = 
webroot = 
username = 
password = 

[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory = 
path-mapping = 

[Deluge]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username = 
password = 
output-directory = 
remove = False
path-mapping = 

[qBittorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before = 
action-after = 
host = localhost
port = 8080
ssl = False
username = 
password = 
output-directory = 
path-mapping = 

[uTorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before = 
action-after = 
host = localhost
ssl = False
port = 8080
username = 
password = 
output-directory = 
path-mapping = 

[Plex]
host = localhost
port = 32400
refresh = False
token = 
mdhiggins commented 2 years ago

Looks like you're running an out-of-date version of the script, the error you're getting was fixed previously and is preventing the stream-codec-combinations option from doing what it's supposed to do, does updating and thus fixing that feature get your closer to what you're looking for?

I appreciate you putting together the example of what you're aiming for, but do you have any log files of an input file that would produce the results in the example? Being able to see how the input streams are mapped is helpful for figuring out a sorting algorithm as its a little unclear what input file would generate the output scenario you are showing

prefer-more-channels = False
default-more-channels = True

You may also get that AAC track to be default by changing default-more-channels to False

Either way though I would say if you could update to fix the stream-codec-combination feature and then post a sample of a file that has all these commentary tracks and then an example of what you want it to be I can see how that might be able to be achieved on a more consistent basis

setDefaultAudioStream is the function that handles determining the default audio track and is a bit more complex than the function that handles sorting sortStreams but you can review those to get some insight into how its currently handled

also ignoring it if it's not 5.1/7.1 (since I'm targeting 5.1/7.1 audio) would be a huge feature

So you mean a feature to ignore input tracks if they have less than a certain number of channels? That could potentially be doable but may need some checks/balances to ensure that you don't end up with no audio tracks

VXsz commented 2 years ago

Looks like you're running an out-of-date version of the script, the error you're getting was fixed previously and is preventing the stream-codec-combinations option from doing what it's supposed to do, does updating and thus fixing that feature get your closer to what you're looking for?

I have updated the script (looks like when I tried to update a few days ago it didn't go through), the crashing issue got fixed, thank you

I appreciate you putting together the example of what you're aiming for, but do you have any log files of an input file that would produce the results in the example? Being able to see how the input streams are mapped is helpful for figuring out a sorting algorithm as its a little unclear what input file would generate the output scenario you are showing

Sure, this is the input/original mapping:

{
"format": "matroska,webm",
"format-fullname": "unknown",
"video": {
"index": 0,
"codec": "hevc",
"bitrate": 45092100,
"pix_fmt": "yuv420p10le",
"profile": "2",
"fps": 23.976023976023978,
"framedata": {
"pix_fmt": "yuv420p10le",
"color_space": "bt2020nc",
"color_primaries": "bt2020",
"color_transfer": "smpte2084",
"side_data_list": [
{
"side_data_type": "Mastering display metadata",
"red_x": "34000/50000",
"red_y": "16000/50000",
"green_x": "13250/50000",
"green_y": "34500/50000",
"blue_x": "7500/50000",
"blue_y": "3000/50000",
"white_point_x": "15635/50000",
"white_point_y": "16450/50000",
"min_luminance": "50/10000",
"max_luminance": "10000000/10000"
},
{
"side_data_type": "Content light level metadata",
"max_content": 0,
"max_average": 0
},
{
"side_data_type": "Dolby Vision RPU Data"
},
{
"side_data_type": "Dolby Vision Metadata",
"rpu_type": 2,
"rpu_format": 18,
"vdr_rpu_profile": 1,
"vdr_rpu_level": 0,
"chroma_resampling_explicit_filter_flag": 0,
"coef_data_type": 0,
"coef_log2_denom": 23,
"vdr_rpu_normalized_idc": 1,
"bl_video_full_range_flag": 0,
"bl_bit_depth": 10,
"el_bit_depth": 10,
"vdr_bit_depth": 12,
"spatial_resampling_filter_flag": 0,
"el_spatial_resampling_filter_flag": 0,
"disable_residual_flag": 1,
"vdr_rpu_id": 0,
"mapping_color_space": 0,
"mapping_chroma_format_idc": 0,
"nlq_method_idc": -1,
"nlq_method_idc_name": "none",
"num_x_partitions": 1,
"num_y_partitions": 1,
"components": [
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
},
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
},
{
"pivots": "0 1023",
"pieces": [
{
"mapping_idc": 0,
"mapping_idc_name": "polynomial",
"poly_order": 1,
"poly_coef": "0 8388608"
}
]
}
],
"dm_metadata_id": 0,
"scene_refresh_flag": 1,
"ycc_to_rgb_matrix": "9574/8192 0/8192 13802/8192 9574/8192 -1540/8192 -5348/8192 9574/8192 17610/8192 0/8192",
"ycc_to_rgb_offset": "16777216/268435456 134217728/268435456 134217728/268435456",
"rgb_to_lms_matrix": "7222/16384 8771/16384 390/16384 2654/16384 12430/16384 1300/16384 0/16384 422/16384 15962/16384",
"signal_eotf": 65535,
"signal_eotf_param0": 0,
"signal_eotf_param1": 0,
"signal_eotf_param2": 0,
"signal_bit_depth": 12,
"signal_color_space": 0,
"signal_chroma_format": 0,
"signal_full_range_flag": 1,
"source_min_pq": 62,
"source_max_pq": 3696,
"source_diagonal": 42
}
]
},
"dimensions": "3840x2160",
"level": 5.1,
"field_order": "unknown"
},
"audio": [
{
"index": 1,
"codec": "truehd",
"bitrate": 7508979,
"channels": 8,
"samplerate": 48000,
"language": "eng",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
},
{
"index": 2,
"codec": "ac3",
"bitrate": 640000,
"channels": 6,
"samplerate": 48000,
"language": "eng",
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
}
],
"subtitle": [
{
"index": 3,
"codec": "hdmv_pgs_subtitle",
"bitrate": 36085,
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "eng"
},
{
"index": 4,
"codec": "hdmv_pgs_subtitle",
"bitrate": 17658,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "zho"
},
{
"index": 5,
"codec": "hdmv_pgs_subtitle",
"bitrate": 29810,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "fra"
},
{
"index": 6,
"codec": "hdmv_pgs_subtitle",
"bitrate": 31362,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "deu"
},
{
"index": 7,
"codec": "hdmv_pgs_subtitle",
"bitrate": 22334,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "jpn"
},
{
"index": 8,
"codec": "hdmv_pgs_subtitle",
"bitrate": 29998,
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"language": "spa"
}
],
"attachment": []
}

And this is the output mapping with my settings:

"source": [
"Guardians.of.the.Galaxy.Vol.2.2017.HYBRiD.2160p.BluRay.REMUX.HEVC.DV.TrueHD.Atmos.7.1-Flights.mkv"
],
"format": "mp4",
"video": {
"codec": "copy",
"map": 0,
"bitrate": 42960.6948,
"crf": -1,
"maxrate": null,
"bufsize": null,
"level": 0.0,
"profile": null,
"preset": null,
"pix_fmt": null,
"field_order": "unknown",
"width": null,
"filter": null,
"params": null,
"framedata": null,
"title": "4K HDR",
"debug": "video.hdr"
},
"audio": [
{
"map": 2,
"codec": "copy",
"channels": 6,
"bitrate": 640.0,
"profile": null,
"quality": 5,
"filter": null,
"samplerate": null,
"sampleformat": "",
"language": "eng",
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"bsf": null,
"title": "AC-3",
"debug": "audio"
},
{
"map": 1,
"codec": "libfdk_aac",
"channels": 8,
"bitrate": 7508.979,
"profile": null,
"quality": 5,
"filter": null,
"samplerate": null,
"sampleformat": "",
"language": "eng",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"bsf": null,
"title": "TrueHD Atmos 7.1",
"debug": "audio"
},
{
"map": 1,
"codec": "copy",
"channels": 8,
"language": "eng",
"disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
"title": "TrueHD Atmos 7.1",
"debug": "audio-copy-original"
}
],
"subtitle": [],
"attachment": []
}
2022-03-13 09:25:27 - resources.mediaprocessor - INFO - Preopts
2022-03-13 09:25:27 - resources.mediaprocessor - INFO - []
2022-03-13 09:25:27 - resources.mediaprocessor - INFO - Postopts
2022-03-13 09:25:27 - resources.mediaprocessor - INFO - [
"-threads",
"0",
"-metadata:g",
"encoding_tool=SMA",
"-strict",
"experimental",
"-tag:v",
"hvc1"
]

You may also get that AAC track to be default by changing default-more-channels to False

I changed it and it still has the same sorting, AC3 is the first (as you can see above from the mapping), and even through the libfdk_aac track is supposedly map: 1 the end result is actual getting mapped second in audio tracks (after AC3), like this:

AC3 AAC DTS-HD/TrueHD

Either way though I would say if you could update to fix the stream-codec-combination feature and then post a sample of a file that has all these commentary tracks and then an example of what you want it to be I can see how that might be able to be achieved on a more consistent basis

I currently don't have a media with commentary so I can't check or give an example, but I can insert some Saw movies since their remuxes seem to have tons of commentary tracks, and most are untagged (I think that's the reason) so the commentary tracks actually are the first ones (that play) so those who want to watch the media will actually have to switch to the last audio track to get the normal audio, but that's another issue that isn't my current focus (I can open an issue later if you'd like)

As for the setDefaultAudioStream suggestion, I'll try reading the code but I'm not sure if I will be able to actually understand or get much from the code, but I'll give it a shot

So you mean a feature to ignore input tracks if they have less than a certain number of channels? That could potentially be doable but may need some checks/balances to ensure that you don't end up with no audio tracks

my idea was that if there's an AC3 **5.1** track, save our time and don't encode with libfdk_aac and if there's an AC3 **2.0**, then we don't want stereo so let's encode with libfdk_aac, basically don't encode if there's an easy-to-play audio track that's 5.1 and not stereo, I hope that idea got through, but there's could be a problem with stereo media (sitecoms and such which usually have 2.0 audio, even the lossless), in that case I think using the stream-codec-combinations would help in this case to check if the source is actually stereo too or not (before doing what's above) so media with stereo tracks doesn't result in an empty audio, and if the video doesn't contain any lossless tracks then just passthrough the audio track(s) since encoding from lossy to lossy would result in just worse quality audio (and probably higher bit-rate than the original)

mdhiggins commented 2 years ago

So the map is just telling FFMPEG what source stream your new stream is being created from, being map 1 just means it was stream 1 in the source file

If you include TrueHD on your codec list that should get you down to 2 output streams and prevent that extra AAC stream from getting created

I have a new approach that I've been working on for sorting to give a little more end user control, see this branch here

https://github.com/mdhiggins/sickbeard_mp4_automator/tree/newsort

This removes the following options

[Audio]
prefer-more-channels = True
default-more-channels = True

And adds the following options

[Audio]
sorting = language, channels.d, d.comment
default-sorting = channels.d, d.comment

[Subtitle]
sorting = language, d.comment, d.default.d, d.forced.d

This lets you prioritize your sorting however you want and opens up for it to be expanded to additional parameters

The valid options are

codec
language
channels
bitrate
d.*

The d.* prefix is the disposition flag so you can sort by dispositions like comment for commentary

You can also add a suffix of .a or .d for ascending or descending to change up the sort order

The default values should reflect how the sorting worked in the previous version

The codec sorter is a little tricky. It uses your list of codecs and will match the order in which they are specified, but ignores the first option on the list since that is typically your encoder and I didn't want people to be forced to have that always be sorted first

Using your own settings codec = libfdk_aac, ac3, eac3, aac, opus, truehd

Should give you the order you want with a sort order of ac3, eac3, aac, opus, truehd

Let me know if that is getting you closer to what you're aiming for

mdhiggins commented 2 years ago

Decided to get a little more aggressive with some of these changes on the newsort branch

Still removed the 2 options mentioned previously but now sectioned off the sorting options as follows

[Audio.Sorting]
sorting = language, channels.d, d.comment
default-sorting = channels.d, d.comment
codecs = 
final-sort = False

[Subtitle.Sorting]
sorting = language, d.comment, d.default.d, d.forced.d
codecs = 

The codecs option in the sorting sections lets you specify codec sorting without impacting your other codec lists, figured this would be less confusing and give more flexibility

The final-sort option adds a final sort sweep to the audio options after they've been generated, this will potentially break up 'affiliated' audio tracks but give greater sorting control, so you can play around with toggling that as well

Edit:

So to achieve your goal of

AAC AC3 AC3 (Commentary 1) AC3 (Commentary 2) DTS-HD DTS-HD (Commentary 1) DTS-HD (Commentary 2)

you should be able to use

[Audio.Sorting]
sorting = language, d.comment, codec
default-sorting = codec
codecs = aac, ac3, dts, truehd
final-sort = True
mdhiggins commented 2 years ago

Also increased the scenarios in which a duplicate stream can be purged using the stream-codec-combination technique

mdhiggins commented 2 years ago

Added some additional sorting options

codec
language
channels
bitrate
d.*
map
smamap

map will sort by the original map values of the source file smamap is similar but a more complex variant, will sort by the sorted input source streams while accounting for stream-codec-combinations

Both of these new sort options exist to keep streams that came from the same source stream together

mdhiggins commented 2 years ago

Going to try to merge this branch this weekend if you have any time to test or provide feedback it would be much appreciated

mdhiggins commented 2 years ago

Merged into master

VXsz commented 2 years ago

Hey, sorry about the very late reply, but I just got busy with other stuff, sorry about that I'll try checking it out this weekend, thanks for everything (and the merge!)

mdhiggins commented 2 years ago

No problem keep me posted

mdhiggins commented 2 years ago

I did make some small tweaks today just to simplify some of the sorting code, going to summarize the changes so you don't get confused when you test compared to what I've written earlier in this post

removed the smamap sort option in favor of a universal map option removed the final-sort option entirely, sorting is always done as the final step instead of both before and after; if you want to sort based on the source stream just use the above map option

mdhiggins commented 2 years ago

Going to close this issue out due to inactivity, should hopefully be fixed with the sorting overhaul

Feel free to reopen or continue comments if there's any questions or issues