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

Improvements to Audio Options/Subs #1465

Closed SharedHelp closed 3 years ago

SharedHelp commented 3 years ago

Hello,

Thanks for the quick fix with the profile options.

Could i request an improvement to the audio options. A lot of remuxes contain the commentary track, I would still like to strip this, but keep the original DTS Audio. So it would be nice to have an option with the copy original audio option to have it still respect the ignore dispositions.

Or maybe the universal audio settings could have more options so I could have it copy the DTS audio and then make a 5.1 AAC or AC3 track and then not need to use the copy original audio option.

Secondly, I'm not sure the script can correctly detect them. The tag of it being commentary seems to be in the Title or Description instead of in the disposition itself, the same seems to the case the PGS subs, so the script still adds the commentary subs even if the commentary audio is stripped.

Thanks.

mdhiggins commented 3 years ago

The copy original option already respects the ignored dispositions so this feature should already be available

As far as the commentary being in the title, this is a known issue and there's logic in the script to pull that disposition information from the title. Title's however are not read by ffprobe so you need to install pymediainfo for this feature to work

SharedHelp commented 3 years ago

Hi,

I do have that pip installed, i double checked but it still copies the commentary.

    {
        "map": 2,
        "codec": "copy",
        "channels": 2,
        "bitrate": 256,
        "filter": null,
        "samplerate": null,
        "language": "eng",
        "disposition": "-default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "bsf": null,
        "title": "Stereo (Commentary)",
        "debug": "audio"
    }

When reading the streams it doesn't seem to be checking the title, only on the encode.

    {
        "index": 2,
        "codec": "ac3",
        "bitrate": 224000,
        "channels": 2,
        "samplerate": 48000,
        "language": "eng",
        "disposition": "-default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
    }
mdhiggins commented 3 years ago

Can you post the full logs start to finish as well as the associated configuration file for that job

Also information about the titles would be good as well since without knowing the titles I can't tell you much.

You're not seeing a pymediainfo exception anywhere are you? Sometimes you need to install MediaInfo to get certain DLLs. The small excerpt you posted seems to show it recognizing the commentary.

SharedHelp commented 3 years ago

No errors showing up for pymediainfo, I don't have mediainfo installed though so could add that to see if it helps?

full log;

2021-07-26 18:03:30 - qBittorrentPostProcess - INFO - qBittorrent post processing started. 2021-07-26 18:03:30 - resources.readsettings - INFO - /usr/bin/python3 2021-07-26 18:03:30 - resources.readsettings - INFO - Loading config file /home/sickbeard_mp4_automator/config/autoProcess.ini. 2021-07-26 18:03:30 - qBittorrentPostProcess - INFO - Performing conversion 2021-07-26 18:03:30 - qBittorrentPostProcess - INFO - Processing file /home/downloads/Casino.Royale.2006.2160p.UHD.Bluray.x265.HDR10.DTS-HD.MA.5.1-4K4U/Casino.Royale.2006.2160p.UHD.Bluray.x265.HDR10.DTS-HD.MA.5.1-4K4U.mkv. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Input Data 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - { "format": "matroska,webm", "format-fullname": "Matroska / WebM", "video": { "index": 0, "codec": "hevc", "pix_fmt": "yuv420p10le", "profile": "main 10", "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": 4000, "max_average": 1000 } ] }, "dimensions": "3840x1600", "level": 5.1, "field_order": "unknown" }, "audio": [ { "index": 1, "codec": "dts", "channels": 6, "samplerate": 48000, "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired" }, { "index": 2, "codec": "ac3", "bitrate": 224000, "channels": 2, "samplerate": 48000, "language": "eng", "disposition": "-default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired" } ], "subtitle": [ { "index": 3, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "eng" }, { "index": 4, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "eng" }, { "index": 5, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" }, { "index": 6, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "spa" }, { "index": 7, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "fra" }, { "index": 8, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "spa" }, { "index": 9, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "dan" }, { "index": 10, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "nld" }, { "index": 11, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "fin" }, { "index": 12, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "deu" }, { "index": 13, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ita" }, { "index": 14, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "nob" }, { "index": 15, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "swe" }, { "index": 16, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "zho" }, { "index": 17, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ces" }, { "index": 18, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "hun" }, { "index": 19, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "kor" }, { "index": 20, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "zho" }, { "index": 21, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "pol" }, { "index": 22, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "por" }, { "index": 23, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "fra" }, { "index": 24, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "spa" }, { "index": 25, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "deu" }, { "index": 26, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ita" }, { "index": 27, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" }, { "index": 28, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" }, { "index": 29, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" } ], "attachment": [] } 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Reading video stream. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Video codec detected: hevc. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Profile: main 10. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - HDR video stream detected for 0. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Video codec parameters -early-skip. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Reading audio streams. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Audio detected for stream 1 - dts eng 6 channel. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Copying audio stream from source stream 1 format dts [audio-copy-original]. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 eng 2 channel. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Default audio stream set to eng ac3 6 channel stream [default-more-channels: True]. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Reading subtitle streams. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 3 - hdmv_pgs_subtitle eng. 2021-07-26 18:03:30 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 3. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 4 - hdmv_pgs_subtitle eng. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 4. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 5 - hdmv_pgs_subtitle jpn. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 5. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 6 - hdmv_pgs_subtitle spa. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 6. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 7 - hdmv_pgs_subtitle fra. 2021-07-26 18:03:31 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 7. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 8 - hdmv_pgs_subtitle spa. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 8. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 9 - hdmv_pgs_subtitle dan. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 9. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 10 - hdmv_pgs_subtitle nld. 2021-07-26 18:03:32 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 10. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 11 - hdmv_pgs_subtitle fin. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 11. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 12 - hdmv_pgs_subtitle deu. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 12. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 13 - hdmv_pgs_subtitle ita. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 13. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 14 - hdmv_pgs_subtitle nob. 2021-07-26 18:03:33 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 14. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 15 - hdmv_pgs_subtitle swe. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 15. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 16 - hdmv_pgs_subtitle zho. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 16. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 17 - hdmv_pgs_subtitle ces. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 17. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 18 - hdmv_pgs_subtitle hun. 2021-07-26 18:03:34 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 18. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 19 - hdmv_pgs_subtitle kor. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 19. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 20 - hdmv_pgs_subtitle zho. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 20. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 21 - hdmv_pgs_subtitle pol. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 21. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 22 - hdmv_pgs_subtitle por. 2021-07-26 18:03:35 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 22. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 23 - hdmv_pgs_subtitle fra. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 23. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 24 - hdmv_pgs_subtitle spa. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 24. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 25 - hdmv_pgs_subtitle deu. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 25. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 26 - hdmv_pgs_subtitle ita. 2021-07-26 18:03:36 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 26. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 27 - hdmv_pgs_subtitle jpn. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 27. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 28 - hdmv_pgs_subtitle jpn. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 28. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 29 - hdmv_pgs_subtitle jpn. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 29. 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Output Data 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - { "source": [ "/home/downloads/Casino.Royale.2006.2160p.UHD.Bluray.x265.HDR10.DTS-HD.MA.5.1-4K4U/Casino.Royale.2006.2160p.UHD.Bluray.x265.HDR10.DTS-HD.MA.5.1-4K4U.mkv" ], "format": "mkv", "video": { "codec": "copy", "map": 0, "bitrate": 19527.984, "crf": -1, "maxrate": null, "bufsize": null, "level": 0.0, "profile": null, "preset": "medium", "pix_fmt": null, "field_order": "unknown", "width": null, "filter": null, "params": "-early-skip", "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.0, "red_y": 16000.0, "green_x": 13250.0, "green_y": 34500.0, "blue_x": 7500.0, "blue_y": 3000.0, "white_point_x": 15635.0, "white_point_y": 16450.0, "min_luminance": 1.0, "max_luminance": 10000000.0 }, { "side_data_type": "Content light level metadata", "max_content": 4000, "max_average": 1000 } ], "hdr": true, "repeat-headers": true }, "title": "4K HDR", "debug": "video.hdr" }, "audio": [ { "map": 1, "codec": "ac3", "channels": 6, "bitrate": 768, "filter": null, "samplerate": null, "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "bsf": null, "title": "5.1 Channel", "debug": "audio" }, { "map": 1, "codec": "copy", "channels": 6, "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": "5.1 Channel", "debug": "audio-copy-original" }, { "map": 2, "codec": "copy", "channels": 2, "bitrate": 256, "filter": null, "samplerate": null, "language": "eng", "disposition": "-default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "bsf": null, "title": "Stereo (Commentary)", "debug": "audio" } ], "subtitle": [ { "map": 3, "codec": "pgs", "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 4, "codec": "pgs", "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 5, "codec": "pgs", "language": "jpn", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 6, "codec": "pgs", "language": "spa", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 7, "codec": "pgs", "language": "fra", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 8, "codec": "pgs", "language": "spa", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 9, "codec": "pgs", "language": "dan", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 10, "codec": "pgs", "language": "nld", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 11, "codec": "pgs", "language": "fin", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 12, "codec": "pgs", "language": "deu", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 13, "codec": "pgs", "language": "ita", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 14, "codec": "pgs", "language": "nob", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 15, "codec": "pgs", "language": "swe", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 16, "codec": "pgs", "language": "zho", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 17, "codec": "pgs", "language": "ces", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 18, "codec": "pgs", "language": "hun", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 19, "codec": "pgs", "language": "kor", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 20, "codec": "pgs", "language": "zho", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 21, "codec": "pgs", "language": "pol", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 22, "codec": "pgs", "language": "por", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 23, "codec": "pgs", "language": "fra", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 24, "codec": "pgs", "language": "spa", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 25, "codec": "pgs", "language": "deu", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 26, "codec": "pgs", "language": "ita", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 27, "codec": "pgs", "language": "jpn", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 28, "codec": "pgs", "language": "jpn", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 29, "codec": "pgs", "language": "jpn", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" } ], "attachment": [] } 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Preopts 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - [ "-fix_sub_duration" ] 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Postopts 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - [ "-threads", "0", "-metadata:g", "encoding_tool=SMA", "-tag:v", "hvc1" ] 2021-07-26 18:03:37 - resources.mediaprocessor - INFO - Starting conversion.

and config

[Converter] ffmpeg = /usr/bin/ffmpeg ffprobe = /usr/bin/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 = /home/convert/ output-format = mkv output-extension = mkv temp-extension = minimum-size = 600 ignored-extensions = nfo, dsstore, sample copy-to = move-to = delete-original = False sort-streams = True process-same-extensions = True bypass-if-copying-all = False force-convert = False post-process = False wait-post-process = False detailed-progress = True opts-separator = , preopts = postopts = regex-directory-replace = [^\w-. ]

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

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

[Video] codec = hevc,h265 max-bitrate = 22000 bitrate-ratio = crf = -1 crf-profiles = preset = medium codec-parameters = -early-skip dynamic-parameters = True max-width = 0 profile = max-level = 0.0 pix-fmt = filter = force-filter = False

[HDR] codec = hevc,h265 pix-fmt = space = bt2020nc transfer = smpte2084 primaries = bt2020 preset = medium codec-parameters = -early-skip filter = force-filter = False profile =

[Audio] codec = ac3 languages = eng default-language = eng first-stream-of-language = False allow-language-relax = True channel-bitrate = 128 max-bitrate = 0 max-channels = 0 prefer-more-channels = True default-more-channels = True filter = force-filter = False sample-rates = copy-original = True aac-adtstoasc = False ignore-truehd = mp4, m4v ignored-dispositions = Stereo (Commentary),Commentary unique-dispositions = True

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

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

[Subtitle] codec = mov_text,srt,subrip,ssa,aas codec-image-based = pgs languages = default-language = eng first-stream-of-language = False encoding = burn-subtitles = False burn-dispositions = embed-subs = True embed-image-subs = True embed-only-internal-subs = True filename-dispositions = forced ignore-embedded-subs = False ignored-dispositions = Commentary 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 = ssl = False webroot = force-rename = False rescan = True block-reprocess = False

[Radarr] host = localhost port = 7878 apikey = ssl = False webroot = 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 =

[CouchPotato] host = localhost port = 5050 username = password = apikey = delay = 65 method = renamer delete-failed = False ssl = False webroot =

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

[Deluge] couchpotato-label = couchpotato 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] couchpotato-label = couchpotato 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 = xxxx password = xxxx output-directory = path-mapping =

[uTorrent] couchpotato-label = couchpotato 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 =

I've tried different variations in the ignore bit, such as just 'commentary', always the same result.

mdhiggins commented 3 years ago

ignored-dispositions = Stereo (Commentary),Commentary

Here's your issue, dispositions are specific values set by FFMPEG, not just random strings

    DISPOSITIONS = [
        'default',
        'dub',
        'original',
        'comment',
        'lyrics',
        'karaoke',
        'forced',
        'hearing_impaired',
        'visual_impaired',
        'captions'
    ]

Change your setting to

ignored-dispositions = comment

SharedHelp commented 3 years ago

thank you, that has worked perfect.

Sorry I'm not the best with exactly what you can put where or the choices available. I do check your mini wiki just so you know I'm not being lazy.

Is there any chance you could add an option when you have say two 5.1 audio streams which one should be set as default, maybe by audio codec? It'll always use the one it makes but would be nice to have some influence over it.

mdhiggins commented 3 years ago

There are lots of options regarding the default track and the algorithms are fairly complicated weighing existing orders language channels and disposition. You can browse through some of this in the mediaprocessor.py file

SharedHelp commented 3 years ago

I've looked at the mediaprocessor.py and it seems the key influences are language, channels and default codec. If i put DTS as the codec in the config, it'll just end up copying the DTS track and not making the AC3, if I put AC3 it will create what i want to be safety track but then that will match more requirements for what should be made the default track. Maybe having an option for channels in the optimized tracked area so we can have a 5.1 AC3 track would be an easier solution?

SharedHelp commented 3 years ago

Could I also suggest adding bit depth as an option so we can convert from 24bit to 16bit

mdhiggins commented 3 years ago

950bbb2b9e641ebd53d71fa3e592fba1197101c2

That should include sorting based on the order of the audio codecs specified which should be inherited down to the default codecs

This is not as straightforward as it would seem on the surface though

Do you sort the incoming streams first? This is the simplest solution and allows tracks created as alternates/duplicates to remain grouped but may not have a huge impact on codec based sorting. Sorting by codecs is nice as the primary / preferred codec can be prioritized if all other factors are equal but for additional streams created it doesn't change much

Do you sort the final stream output before file creation? This disrupts the natural grouping that occurs with the above solution and introduces lots of other potential problems, its also somewhat annoying since lots of codecs may be listed as 'copy' so you would need a solution to map back to the original source to determine what the base codec was in the first place before applying the sort adding another layer of complexity

An individual option to put the 'copy original' before or after its main conversion stream might be viable but really has nothing to do with codec based sorting though would at least mirror what is seen with the universal audio options. Allowing the universal audio channel count to be dynamic might be viable though lots of the logic for that assumes stereo audio so it would need some testing

Curious what your thoughts are on a solution since you must have a scenario where you wanted to use this

With regards to bit depth, please include some sample FFMpeg command and how you think the script should perform when it encounters various bit depth scenarios for this to be considered

SharedHelp commented 3 years ago

Hi, Thanks for the in depth reply.

I should warn you I'm no ffmpeg pro like others on here or a particularly good script writer just knowing basic PHP.

The issue with the first situation is if I put DTS as the first and preferred codec then it won't make the compatible AC3 5.1 audio stream if AC3 is second in the list. Instead it will only just copy the original as the codecs for the DTS 5.1 MA match, in fact it is worse as it'll convert the bit rate down to what I have it set to for the AC3 and in the end you'll end up with just one reduced DTS audio stream and not even a second audio stream that is a straight copy of the original.

I'm not sure on the second solution tbh and the various issues that may arise but I think the third solution of an individual option to put the copy original audio before created would suffice. It isn't really about making a decision based on codec it was just a proposal to make sure the high quality DTS MA untouched audio is default with the lower quality compatible track coming after.

The scenario is most bluray remuxes provide either a DTS MA 5.1 track, or Atmos or TrueHD and so on. As I'm copying the original that is ideally the track I still want to be default and then I'm using automator to create a safer track that is AC3 5.1 in case a device doesn't support the advanced dolby features or 24bit 96khz. i have another copy of your script I use for creating a stereo stream when the source is 1080p and use the option provided to make sure it isn't the first default stream.

Which I guess comes onto the second inquiry. Right now when making the AC3 sound it'll copy the bit depth as we can't set it like we can the sample rate and ideally for AC3 to be most compatible we want it to be 16bit. From googling the command for it is

-sample_fmt

It would just go after the audio codec is set like you currently have with sample rate.

mdhiggins commented 3 years ago

Alright I added a sample-format option to the audio section of autoProcess.ini

FFProbe doesn't reliably report any data on this so its just a blind setting that gets applied if a conversion needs to take place but it will not force a stream to be converted if it would otherwise be appropriate for remuxing

You need to specify an appropriate format not just a bit depth (see ffmpeg -sample_fmts)

Added another option called copy-original-before that shifts the order around so the original audio track comes before the converted track when a copy-original track is to be added to the output. This order adjustment impacts the selection of the default track as well

Removed the previous codec based sorting since this is more likely to just disrupt useful sorting information from the source material

Will update the wiki with these new options after you've tested the changes

SharedHelp commented 3 years ago

Hi,

Just to let you know these changes have worked fine and it is putting the original audio first as expected.

I have noticed one interesting thing, and I don't know easy it would be to rectify with the script.

When the source files has two audio streams, for example the first being DTS True HD, then already has a secondary AC3 5.1 already included the script will still attempt to making its own AC3 5.1 from the first as it only cares about the first audio stream despite probing the second. It would be better if it checked all streams and if all matched the required settings just copied.

Example below;

"format": "matroska,webm",
"format-fullname": "Matroska / WebM",
"video": {
    "index": 0,
    "codec": "hevc",
    "pix_fmt": "yuv420p10le",
    "profile": "main10",
    "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": "6550/50000",
                "red_y": "2300/50000",
                "green_x": "35400/50000",
                "green_y": "14600/50000",
                "blue_x": "8500/50000",
                "blue_y": "39850/50000",
                "white_point_x": "15635/50000",
                "white_point_y": "16450/50000",
                "min_luminance": "20/10000",
                "max_luminance": "10000000/10000"
            },
            {
                "side_data_type": "Content light level metadata",
                "max_content": 992,
                "max_average": 518
            }
        ]
    },
    "dimensions": "3840x1600",
    "level": 5.0,
    "field_order": "unknown"
},
"audio": [
    {
        "index": 1,
        "codec": "truehd",
        "channels": 8,
        "samplerate": 48000,
        "language": "eng",
        "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
    },
    {
        "index": 2,
        "codec": "ac3",
        "bitrate": 448000,
        "channels": 6,
        "samplerate": 48000,
        "language": "eng",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
    }
],
"subtitle": [
    {
        "index": 3,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "eng"
    },
    {
        "index": 4,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "deu"
    },
    {
        "index": 5,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "ita"
    },
    {
        "index": 6,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "spa"
    },
    {
        "index": 7,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "zho"
    },
    {
        "index": 8,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "kor"
    },
    {
        "index": 9,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "por"
    },
    {
        "index": 10,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "ara"
    },
    {
        "index": 11,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "eng"
    },
    {
        "index": 12,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "ces"
    },
    {
        "index": 13,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "dan"
    },
    {
        "index": 14,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "fin"
    },
    {
        "index": 15,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "ell"
    },
    {
        "index": 16,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "hun"
    },
    {
        "index": 17,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "nor"
    },
    {
        "index": 18,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "pol"
    },
    {
        "index": 19,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "por"
    },
    {
        "index": 20,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "ron"
    },
    {
        "index": 21,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "rus"
    },
    {
        "index": 22,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "swe"
    },
    {
        "index": 23,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "tha"
    },
    {
        "index": 24,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "tur"
    },
    {
        "index": 25,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "jpn"
    },
    {
        "index": 26,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "jpn"
    },
    {
        "index": 27,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "jpn"
    },
    {
        "index": 28,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "jpn"
    },
    {
        "index": 29,
        "codec": "hdmv_pgs_subtitle",
        "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
        "language": "jpn"
    }
],
"attachment": []

} 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Reading video stream. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Video codec detected: hevc. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Profile: main10. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - HDR video stream detected for 0. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Video codec parameters -early-skip. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Reading audio streams. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Audio detected for stream 1 - truehd eng 8 channel. 2021-07-28 06:08:52 - resources.mediaprocessor - WARNING - Unable to determine audio bitrate from source stream 1, defaulting to 128 per channel. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Copying audio stream from source stream 1 format truehd [audio-copy-original]. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 eng 6 channel. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Default audio stream set to eng copy 8 channel stream [default-more-channels: True]. 2021-07-28 06:08:52 - resources.mediaprocessor - INFO - Reading subtitle streams. 2021-07-28 06:08:53 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 3 - hdmv_pgs_subtitle eng. 2021-07-28 06:08:53 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 3. 2021-07-28 06:08:53 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 4 - hdmv_pgs_subtitle deu. 2021-07-28 06:08:53 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 5 - hdmv_pgs_subtitle ita. 2021-07-28 06:08:54 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 6 - hdmv_pgs_subtitle spa. 2021-07-28 06:08:54 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 7 - hdmv_pgs_subtitle zho. 2021-07-28 06:08:55 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 8 - hdmv_pgs_subtitle kor. 2021-07-28 06:08:55 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 9 - hdmv_pgs_subtitle por. 2021-07-28 06:08:55 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 10 - hdmv_pgs_subtitle ara. 2021-07-28 06:08:56 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 11 - hdmv_pgs_subtitle eng. 2021-07-28 06:08:56 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 11. 2021-07-28 06:08:56 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 12 - hdmv_pgs_subtitle ces. 2021-07-28 06:08:57 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 13 - hdmv_pgs_subtitle dan. 2021-07-28 06:08:57 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 14 - hdmv_pgs_subtitle fin. 2021-07-28 06:08:57 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 15 - hdmv_pgs_subtitle ell. 2021-07-28 06:08:58 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 16 - hdmv_pgs_subtitle hun. 2021-07-28 06:08:58 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 17 - hdmv_pgs_subtitle nor. 2021-07-28 06:08:59 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 18 - hdmv_pgs_subtitle pol. 2021-07-28 06:08:59 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 19 - hdmv_pgs_subtitle por. 2021-07-28 06:08:59 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 20 - hdmv_pgs_subtitle ron. 2021-07-28 06:09:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 21 - hdmv_pgs_subtitle rus. 2021-07-28 06:09:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 22 - hdmv_pgs_subtitle swe. 2021-07-28 06:09:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 23 - hdmv_pgs_subtitle tha. 2021-07-28 06:09:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 24 - hdmv_pgs_subtitle tur. 2021-07-28 06:09:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 25 - hdmv_pgs_subtitle jpn. 2021-07-28 06:09:02 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 26 - hdmv_pgs_subtitle jpn. 2021-07-28 06:09:02 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 27 - hdmv_pgs_subtitle jpn. 2021-07-28 06:09:02 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 28 - hdmv_pgs_subtitle jpn. 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 29 - hdmv_pgs_subtitle jpn. 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Output Data 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - { "source": [ "/home/downloads/The.Matrix.1999.2160p.Bluray.HDR10.10bit.x265.HEVC.TrueHD.Atmos.7.1-PHOCiS/The.Matrix.1999.2160p.Bluray.HDR10.10bit.x265.HEVC.TrueHD.Atmos.7.1-PHOCiS.mkv" ], "format": "mkv", "video": { "codec": "copy", "map": 0, "bitrate": 9526.301, "crf": 17, "maxrate": null, "bufsize": null, "level": 5.1, "profile": "main10", "preset": "medium", "pix_fmt": null, "field_order": "unknown", "width": null, "filter": null, "params": "-early-skip", "framedata": { "pix_fmt": "yuv420p10le", "color_space": "bt2020nc", "color_primaries": "bt2020", "color_transfer": "smpte2084", "side_data_list": [ { "side_data_type": "Mastering display metadata", "red_x": 6550.0, "red_y": 2300.0, "green_x": 35400.0, "green_y": 14600.0, "blue_x": 8500.0, "blue_y": 39850.0, "white_point_x": 15635.0, "white_point_y": 16450.0, "min_luminance": 20.0, "max_luminance": 10000000.0 }, { "side_data_type": "Content light level metadata", "max_content": 992, "max_average": 518 } ], "hdr": true, "repeat-headers": true }, "title": "4K HDR", "debug": "video.hdr" }, "audio": [ { "map": 1, "codec": "copy", "channels": 8, "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": "7.1 Channel", "debug": "audio-copy-original" }, { "map": 1, "codec": "ac3", "channels": 6, "bitrate": 768, "filter": null, "samplerate": null, "sampleformat": "fltp", "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "bsf": null, "title": "5.1 Channel", "debug": "audio.max-channels" }, { "map": 2, "codec": "copy", "channels": 6, "bitrate": 448.0, "filter": null, "samplerate": null, "sampleformat": "fltp", "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "bsf": null, "title": "5.1 Channel", "debug": "audio" } ], "subtitle": [ { "map": 3, "codec": "pgs", "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" }, { "map": 11, "codec": "pgs", "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" } ], "attachment": [] } 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Preopts 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - [ "-fix_sub_duration" ] 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Postopts 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - [ "-threads", "0", "-metadata:g", "encoding_tool=SMA", "-max_muxing_queue_size", "9999", "-tag:v", "hvc1" ] 2021-07-28 06:09:03 - resources.mediaprocessor - INFO - Starting conversion.

mdhiggins commented 3 years ago

That's not always a good solution and is why the ignore-truehd option was introduced, there's no good way to know that the ac3 track and the truehd track are the same with high degree of certainty and trying to copy / match those pairs on the macro level in an automated fashion would be particularly challenging

I'm open to specific proposals as to how to fix that without creating problems when they don't match but its not as straightforward as you suggest, would need to outline the specific scenarios

Adding truehd to the list of audio codecs should allow it to be copied without creating an ac3 track but then you run into the reverse problem where you won't create the ac3 track if its not already there

SharedHelp commented 3 years ago

I don't think I explained it properly.

This isn't a situation where it is a TrueHD track with a second 5.1 track inside the TrueHD track.

This is a situation where the the remuxer has already been nice enough to copy the original TrueHD track and then make a second AC3 5.1 compatibility track themselves.

AC3 is the first codec in my in my autoprocessor.ini, the script reads there is a TrueHD track then sees the second AC3 5.1 stream which already matches my audio settings in the autoprocessor.ini and it will copy, but it will also make another AC3 track from the TrueHD track because it only checks if that matches.

My solution was for it to just copy if any of the streams match, not just compare the settings in the autoprocessor.ini to the first audio track.

If you look at my paste above you can see it detect the individual audiostreams.

mdhiggins commented 3 years ago

No I understand the situation, the script doesn't need to make the ac3 compatibility track because the source file already essentially contains one so you end up with duplicate ac3 tracks

My question is, how can you tell that ac3 track in your source material is a compatibility track? How do you handle determining when it should ignore creating the AC3 track in a reproducible and generalizable way that will be compatible with a multitude of other scenarios? What settings do you look at to see if that AC3 meets all the same requirements as the compatibility track that would have otherwise been created etc

Its a situation that's been run into before and resulted in the ignore truehd option as explained above. Including truehd in your approved codec list would prevent the creation of an additional compatibility track when truehd is encountered but that introduces its own problems

My best guess is you'd need some kind of specific scenario where if you have a truehd source track followed by another track that meets remuxing requirements but the truehd track did not, then you can delete the track that would have been otherwise generated

And then what do you do if you don't want ac3 but instead want say aac? do you convert both the source truehd and ac3, do you convert one and not the other? and how do you possibly dynamically account for that

And the whole situation gets even more complex when you consider each track could also result in a conversion, copy original, and universal audio track generated

Need to try and consider a solution that handles all these scenarios gracefully

SharedHelp commented 3 years ago

Hi,

Interesting set of scenarios to consider for sure but I don't think the approach has to be overly complicated and could work something like this.

Check first stream to see if matches the main codec on the autoprocessor.ini. if not check the second stream, if yes does it match the max channels, if yes does it match the max audio bit rate, if yes then copy.

If no for any then make the new stream.

mdhiggins commented 3 years ago

This would still be a huge departure from the current system and be a significant rewrite that would likely not work for lots of current workflows

I can think a number of scenarios that would need to be accounted for. Multiple seemingly identical tracks, tracks in alternate languages, commentary tracks, other valid codecs, etc and there would probably need to be some kind of recursive loop if initial conditions aren't met. While it may seem simple for your use case it needs to be a generalizable solution that won't break existing workflows. Using sorting and first track of language might be a feasible approach but then you'd have to consider how to handling if you wanted to copy extra streams etc

I'm going to try and come up with a solution to the truehd scenario specifically but anything beyond that I'm gonna need to see some specific input/output conditions and a theoretical approach to how you'd want this system to work or a pull request with some actual code (or just sample proposal code that I can review and then integrate) because I think as soon as you go to implement this you're going to break lots of existing workflows

SharedHelp commented 3 years ago

Well I can't code so wouldn't want to attempt a pull request. Just trying to give suggestions based on what I see it doing in the log when I read through it.

Well using first track of language in combination of preferring more channels I guess would solve it, well maybe as I guess it would still copy the truehd stream and then make its own AC3 5.1 stream, not sure how your code fully works so will test shortly.

I wonder if an alternative solution would be to allow creating full multiple profile audio profiles instead of just one, so you could have a section for TrueHD and then any other codecs you want?

Or maybe do something similar to your ignore TrueHD for mp4, but instead have an option to ignore TrueHD as the source for making the source if another compatible audio stream is detected and let the script run through as normal with the remaining audio streams? Hopefully that makes sense?

mdhiggins commented 3 years ago

b8e64da7cea3d92d9621b43f9ecc6c5e65675ff8 e39e4aaf883444b56d45d0a6193781fbfd1e7c1a

First attempt at this feature, not documented on the wiki yet but would appreciate some testing

Introduces a new option called stream-codec-combinations which is a CSV list of codec combinations that when found in the order specified will be analyzed to determine if they may represent different quality version of the same stream

For the TrueHD example, you would set this to stream-codec-combinations = truehd:ac3

What this will do is analyze the source audio for any combination of those 2 codecs in order, if any combinations are found, it then checks to see if those tracks have the same disposition and language. This should prevent things like commentary tracks from getting flagged inadvertently

If it identifies tracks that are the same, it does a sweep based on the output options generated and will try to purge duplicates

Example using keep original and universal audio

Input

a:0 - truehd 7.1
a:1 - ac3 5.1

Previous output

aac 2 from a:0
ac3 5.1 from a:0
truehd 7.1 (copy) from a:0
aac 2 from a:1
ac3 5.1 (copy) from a:1

New output

aac 2 from a:0
truehd 7.1 (copy) from a:0
ac3 5.1 (copy) from a:1

(an extra stream sort sweep is performed if anything is purged to try and clean up the order)

When two matching codecs of the same channel quantity are found, it will prioritize one that is being remuxed first, followed by the higher bitrate source if a remux track isn't available

SharedHelp commented 3 years ago

Hi and thank you for coming back to this.

I think it is heading in the right direction, but could use some refinement.

I tested it on a movie a TrueHD and then AC3 sound track with AC3 set as the audio-codec, not sure if this need to bet set or not along with copy-original set to true.

It did correctly copy the TrueHD and AC3 track and it said it was setting the AC3 track as the default track but it actually copied them in the same order and didn't set any default deposition for either.

However if I put ac3:truehd it'll find no matches, make a 5.1 AC3 track and then copy the TrueHD and then AC3 track. Or I put say truehd:ac3:eac3 and there is only a TrueHD and AC3 track it'll find no matches and do the same as above.

I think it would be perfect if it could detect them in any order and ignore formats it doesn't find and try to match what it does.

Again, thanks for the great work.

mdhiggins commented 3 years ago

2f06969e5adc08a7506d447c193549eff4213cda

Looks like I was mistakenly running the purge after the default stream selector was running which could in theory purge whichever track was chosen as the default, fixed in that update

With regards to the order, that was an intentional decision but if you want either order to work, you can just specify both in the options

stream-codec-combinations = truehd:ac3, ac3:truehd

The order is important however so I don't see ever eliminating that entirely but at least with this current implementation you have more control but can still implement multiple orders or combinations

Feel free to post some logs of conversions you've run so I can see the input/output parameters if you have questions or think it should have resulted in different behavior but hoping this will allow the truehd issue as well as duplicate universal audio stream issues to be solved once and for all

SharedHelp commented 3 years ago

Hi,

Thanks for explaining I can set multiple combinations. That does seem to work and now it is setting the default stream correctly. I guess I do have one unexpected behavior, that it detected the correct combination but still created an AC3 track from the TrueHD track despite a suitable AC3 track already being there. Maybe it is caused by the fact that I have the channel rate bit set to 128 and it decided the copy one was lower quality so to make it's own?

2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Input Data
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "hevc",
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "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": "35400/50000",
                    "red_y": "14600/50000",
                    "green_x": "8500/50000",
                    "green_y": "39850/50000",
                    "blue_x": "6550/50000",
                    "blue_y": "2300/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": 4000,
                    "max_average": 1000
                }
            ]
        },
        "dimensions": "3840x2072",
        "level": 5.1,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "truehd",
            "channels": 8,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
        },
        {
            "index": 2,
            "codec": "ac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
        }
    ],
    "subtitle": [
        {
            "index": 3,
            "codec": "hdmv_pgs_subtitle",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "language": "eng"
        },
        {
            "index": 4,
            "codec": "hdmv_pgs_subtitle",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "language": "fra"
        },
        {
            "index": 5,
            "codec": "hdmv_pgs_subtitle",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "language": "spa"
        },
        {
            "index": 6,
            "codec": "hdmv_pgs_subtitle",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "language": "ita"
        }
    ],
    "attachment": []
}
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Reading video stream.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Profile: main10.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - HDR video stream detected for 0.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Video codec parameters -early-skip.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Reading audio streams.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [[1, 2]] [stream-codec-combinations].
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Audio detected for stream 1 - truehd eng 8 channel.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Copying audio stream from source stream 1 format truehd [audio-copy-original].
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 eng 6 channel.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will dupcliates [stream-codec-combinations].
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Default audio stream set to eng ac3 6 channel stream [default-more-channels: False].
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Reading subtitle streams.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 3 - hdmv_pgs_subtitle eng.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 3.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 4 - hdmv_pgs_subtitle fra.
2021-08-26 05:00:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 5 - hdmv_pgs_subtitle spa.
2021-08-26 05:00:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 6 - hdmv_pgs_subtitle ita.
2021-08-26 05:00:01 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1
2021-08-26 05:00:01 - resources.mediaprocessor - INFO - Output Data
2021-08-26 05:00:01 - resources.mediaprocessor - INFO - {
    "source": [
        "/home/downloads/Luca.2021.2160p.UHD.Bluray.x265.HDR10..Atmos.TrueHD.7.1-4K4U/Luca.2021.2160p.UHD.Bluray.x265.HDR10..Atmos.TrueHD.7.1-4K4U.mkv"
    ],
    "format": "mkv",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 21583.671,
        "crf": 18,
        "maxrate": null,
        "bufsize": null,
        "level": 5.1,
        "profile": "main10",
        "preset": "medium",
        "pix_fmt": null,
        "field_order": "unknown",
        "width": null,
        "filter": null,
        "params": "-early-skip",
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": 35400.0,
                    "red_y": 14600.0,
                    "green_x": 8500.0,
                    "green_y": 39850.0,
                    "blue_x": 6550.0,
                    "blue_y": 2300.0,
                    "white_point_x": 15635.0,
                    "white_point_y": 16450.0,
                    "min_luminance": 1.0,
                    "max_luminance": 10000000.0
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 4000,
                    "max_average": 1000
                }
            ],
            "hdr": true,
            "repeat-headers": true
        },
        "title": "4K HDR",
        "debug": "video.hdr"
    },
    "audio": [
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "filter": null,
            "samplerate": null,
            "sampleformat": "fltp",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "5.1 Channel",
            "debug": "audio.max-channels"
        },
        {
            "map": 1,
            "codec": "copy",
            "channels": 8,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": "7.1 Channel",
            "debug": "audio-copy-original"
        }
    ],
    "subtitle": [
        {
            "map": 3,
            "codec": "pgs",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "title": null,
            "debug": "subtitle.embed-subs"
        }
    ],
    "attachment": []
} 
SharedHelp commented 3 years ago

ok i tested by taking out the channel rate and it did copy it but it doesn't set the AC3 as the default track so I guess I'll just leave it to make its own from the TrueHD

mdhiggins commented 3 years ago

Yeah so by your own settings your source AC3 track was not suitable to be copied so it was not, in which case the script will choose the highest quality source track as its source track

That being said, AC3 should still be allowed to be the default track, could you post the logs from the situation where the did not occur?

mdhiggins commented 3 years ago

Any info on this? Going to close it out and document the new change/features if there aren't further issues

mdhiggins commented 3 years ago

Closing due to inactivity

SharedHelp commented 2 years ago

Hi,

Sorry for not getting back to you sooner but here is an example of it putting the TrueHD as the default and not the AC3 using the combination setting.

2021-09-23 14:06:55 - resources.mediaprocessor - INFO - { "format": "matroska,webm", "format-fullname": "Matroska / WebM", "video": { "index": 0, "codec": "hevc", "pix_fmt": "yuv420p10le", "profile": "main10", "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": "7500/50000", "red_y": "3000/50000", "green_x": "34000/50000", "green_y": "16000/50000", "blue_x": "13250/50000", "blue_y": "34500/50000", "white_point_x": "15635/50000", "white_point_y": "16450/50000", "min_luminance": "50/10000", "max_luminance": "40000000/10000" }, { "side_data_type": "Content light level metadata", "max_content": 1642, "max_average": 167 } ] }, "dimensions": "3840x2076", "level": 5.0, "field_order": "unknown" }, "audio": [ { "index": 1, "codec": "truehd", "channels": 8, "samplerate": 48000, "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired" }, { "index": 2, "codec": "ac3", "bitrate": 640000, "channels": 6, "samplerate": 48000, "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired" }, { "index": 3, "codec": "ac3", "bitrate": 192000, "channels": 2, "samplerate": 48000, "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired" } ], "subtitle": [ { "index": 4, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "eng" }, { "index": 5, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ara" }, { "index": 6, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "zho" }, { "index": 7, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "zho" }, { "index": 8, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "zho" }, { "index": 9, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ces" }, { "index": 10, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "dan" }, { "index": 11, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "nld" }, { "index": 12, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "fin" }, { "index": 13, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "fra" }, { "index": 14, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "deu" }, { "index": 15, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "hun" }, { "index": 16, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "ita" }, { "index": 17, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" }, { "index": 18, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "jpn" }, { "index": 19, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "kor" }, { "index": 20, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "nor" }, { "index": 21, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "pol" }, { "index": 22, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "rus" }, { "index": 23, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "spa" }, { "index": 24, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "spa" }, { "index": 25, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "swe" }, { "index": 26, "codec": "hdmv_pgs_subtitle", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "language": "tha" } ], "attachment": [] } 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Reading video stream. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Video codec detected: hevc. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Profile: main10. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - HDR video stream detected for 0. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Video codec parameters -early-skip. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Reading audio streams. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [[1, 2]] [stream-codec-combinations]. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Audio detected for stream 1 - truehd eng 8 channel. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Copying audio stream from source stream 1 format truehd [audio-copy-original]. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Audio detected for stream 2 - ac3 eng 6 channel. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 2. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Audio detected for stream 3 - ac3 eng 2 channel. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Found 1 streams that can be removed from the output file since they will dupcliates [stream-codec-combinations]. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Default audio stream set to eng copy 8 channel stream [default-more-channels: False]. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Reading subtitle streams. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 4 - hdmv_pgs_subtitle eng. 2021-09-23 14:06:55 - resources.mediaprocessor - INFO - Creating pgs subtitle stream from source stream 4. 2021-09-23 14:06:56 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 5 - hdmv_pgs_subtitle ara. 2021-09-23 14:06:56 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 6 - hdmv_pgs_subtitle zho. 2021-09-23 14:06:57 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 7 - hdmv_pgs_subtitle zho. 2021-09-23 14:06:57 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 8 - hdmv_pgs_subtitle zho. 2021-09-23 14:06:58 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 9 - hdmv_pgs_subtitle ces. 2021-09-23 14:06:58 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 10 - hdmv_pgs_subtitle dan. 2021-09-23 14:06:59 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 11 - hdmv_pgs_subtitle nld. 2021-09-23 14:06:59 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 12 - hdmv_pgs_subtitle fin. 2021-09-23 14:07:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 13 - hdmv_pgs_subtitle fra. 2021-09-23 14:07:00 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 14 - hdmv_pgs_subtitle deu. 2021-09-23 14:07:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 15 - hdmv_pgs_subtitle hun. 2021-09-23 14:07:01 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 16 - hdmv_pgs_subtitle ita. 2021-09-23 14:07:02 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 17 - hdmv_pgs_subtitle jpn. 2021-09-23 14:07:02 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 18 - hdmv_pgs_subtitle jpn. 2021-09-23 14:07:03 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 19 - hdmv_pgs_subtitle kor. 2021-09-23 14:07:03 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 20 - hdmv_pgs_subtitle nor. 2021-09-23 14:07:04 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 21 - hdmv_pgs_subtitle pol. 2021-09-23 14:07:04 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 22 - hdmv_pgs_subtitle rus. 2021-09-23 14:07:05 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 23 - hdmv_pgs_subtitle spa. 2021-09-23 14:07:05 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 24 - hdmv_pgs_subtitle spa. 2021-09-23 14:07:06 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 25 - hdmv_pgs_subtitle swe. 2021-09-23 14:07:06 - resources.mediaprocessor - INFO - Image-based subtitle detected for stream 26 - hdmv_pgs_subtitle tha. 2021-09-23 14:07:06 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1 2021-09-23 14:07:06 - resources.mediaprocessor - INFO - Output Data 2021-09-23 14:07:06 - resources.mediaprocessor - INFO - { "source": [ "/home/downloads/Batman.(1989-1997).Collection-PHOCiS/Batman.And.Robin.1997.2160.BluRay.HDR10.10bit.x265.HEVC.TrueHD.Atmos.7.1-PHOCiS/Batman.And.Robin.1997.2160.BluRay.HDR10.10bit.x265.HEVC.TrueHD.Atmos.7.1-PHOCiS.mkv" ], "format": "mkv", "video": { "codec": "copy", "map": 0, "bitrate": 9512.551, "crf": 18, "maxrate": null, "bufsize": null, "level": 5.1, "profile": "main10", "preset": "medium", "pix_fmt": null, "field_order": "unknown", "width": null, "filter": null, "params": "-early-skip", "framedata": { "pix_fmt": "yuv420p10le", "color_space": "bt2020nc", "color_primaries": "bt2020", "color_transfer": "smpte2084", "side_data_list": [ { "side_data_type": "Mastering display metadata", "red_x": 7500.0, "red_y": 3000.0, "green_x": 34000.0, "green_y": 16000.0, "blue_x": 13250.0, "blue_y": 34500.0, "white_point_x": 15635.0, "white_point_y": 16450.0, "min_luminance": 50.0, "max_luminance": 40000000.0 }, { "side_data_type": "Content light level metadata", "max_content": 1642, "max_average": 167 } ], "hdr": true, "repeat-headers": true }, "title": "4K HDR", "debug": "video.hdr" }, "audio": [ { "map": 1, "codec": "copy", "channels": 8, "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": "7.1 Channel", "debug": "audio-copy-original" }, { "map": 2, "codec": "copy", "channels": 6, "bitrate": 768, "filter": null, "samplerate": null, "sampleformat": "", "language": "eng", "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "bsf": null, "title": "5.1 Channel", "debug": "audio" } ], "subtitle": [ { "map": 4, "codec": "pgs", "language": "eng", "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired", "title": null, "debug": "subtitle.embed-subs" } ], "attachment": [] }