Giter VIP home page Giter VIP logo

Comments (12)

mdhiggins avatar mdhiggins commented on June 8, 2024 1

Its channel bitrate, so 128 * 2 = 256

Looking into the sorting issue now

from sickbeard_mp4_automator.

mdhiggins avatar mdhiggins commented on June 8, 2024 1

Alright so overall it looks like everything was working as intended now that I have some logs

sorting = language, channels.d, map, d.comment
default-sorting = channels.a, map, d.comment

Resulted in

    "audio": [
        {
            "map": 2,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "profile": null,
            "quality": 0,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "kor",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "bsf": null,
            "debug": "audio",
            "title": "5.1 Channel"
        },
        {
            "map": 2,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "quality": 0,
            "profile": null,
            "samplerate": null,
            "sampleformat": "",
            "filter": null,
            "language": "kor",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "universal-audio",
            "title": "Stereo"
        }
    ],

This is all accurate, since language, map, and comment disposition are all the same essentially channels is the only thing driving the sort

In this case, the 2 channel is the default consistent with an ascending sort but the 6 channel comes first consistent with a descending sort which is exactly what you have configured the script to do

After looking closer at your original sample its working as intended as well I just misread it initially and didn't have any logs, but you were using the same inverted approach with a mixed ascending default sort and descending general sort

Your final example is the correct approach since you want channels ordered from lowest to highest (an ascending/ascending sort)

If you have logs of it not working that would be more helpful as so far everything you've posted looks like its working as intended, even on your original post

I did check the code just to confirm and the sorting does happen from beginning to end of the preference list so the final sort parameter in the list is the highest priority

It is possible that on the examples that weren't working one of the later sort parameters was actually relevant unlike all the previous examples where they were the same and was getting priority and giving you a different result but without logs its hard to know; but moving the channel sort to the front wouldn't help with this if anything it lowers its priority

from sickbeard_mp4_automator.

mdhiggins avatar mdhiggins commented on June 8, 2024 1

I mean the log for Bill and Ted you posted is consistent with this, the 6 channel audio comes first and then the stereo audio 2nd which is set as default
But this is what your original settings included below will generate

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

And that's because of the channels.d which should have been channels.a if you wanted the stereo AAC track first

from sickbeard_mp4_automator.

mdhiggins avatar mdhiggins commented on June 8, 2024 1

If you notice anything not behaving after these new settings feel free to reopen or post the logs

from sickbeard_mp4_automator.

mdhiggins avatar mdhiggins commented on June 8, 2024

Please share logs of a conversion as your settings look ok

from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

So, i did a fresh install of the container and 2 observations:

  1. The default settings for autoProcess.ini which is auto created is using default-sorting = channels.a, map, d.comment which resulted in same problem.
  2. Another observation is that although the default settings in autoProcess.ini say to encode at 128Kbps, the resulted AAC track has 256Kbps, don't sure where that's coming from...also makes no sense to me.

logs

2023-10-13 16:10:14 - RadarrPostProcess - INFO - Radarr extra script post processing started.
2023-10-13 16:10:14 - resources.readsettings - INFO - /usr/local/sma/venv/bin/python3
2023-10-13 16:10:14 - resources.readsettings - INFO - Loading config file /usr/local/sma/config/autoProcess.ini.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Processing /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Input Data
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "h264",
        "bitrate": 7154392,
        "pix_fmt": "yuv420p",
        "profile": "high",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "1920x1080",
        "level": 4.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "fra",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"    
        },
        {
            "index": 2,
            "codec": "eac3",
            "bitrate": 768000,
            "channels": 6,
            "samplerate": 48000,
            "language": "kor",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"    
        }
    ],
    "subtitle": [
        {
            "index": 3,
            "codec": "subrip",
            "disposition": "+default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions",   
            "language": "fra"
        },
        {
            "index": 4,
            "codec": "subrip",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "fra"
        },
        {
            "index": 5,
            "codec": "subrip",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
            "language": "fra"
        }
    ],
    "attachment": []
}
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Reading video stream.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Video codec detected: h264.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Profile: high.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Video codec parameters None.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Reading audio streams.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Audio detected for stream 1 - eac3 fra 6 channel.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Audio detected for stream 2 - eac3 kor 6 channel.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 2.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Creating aac audio stream from source audio stream 2 [universal-audio].
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - ['0->0', '1->1']
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - ['0->1', '1->0']
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Default audio stream set to kor aac 2 channel stream [audio-default-sorting: ['channels.a', 'map', 'd.comment']].
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Reading subtitle streams.
2023-10-13 16:10:14 - resources.mediaprocessor - INFO - Subtitle detected for stream 3 - subrip fra.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Stream 3 is text-based subtitle for codec subrip.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 3.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Subtitle detected for stream 4 - subrip fra.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Stream 4 is text-based subtitle for codec subrip.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 4.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Subtitle detected for stream 5 - subrip fra.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Stream 5 is text-based subtitle for codec subrip.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 5.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - ['0->0', '1->1', '2->2']
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Output Data
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - {
    "source": [
        "/data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 6786.4523,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "bsf": null,
        "debug": "video",
        "title": "FHD"
    },
    "audio": [
        {
            "map": 2,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "profile": null,
            "quality": 0,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "kor",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "bsf": null,
            "debug": "audio",
            "title": "5.1 Channel"
        },
        {
            "map": 2,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "quality": 0,
            "profile": null,
            "samplerate": null,
            "sampleformat": "",
            "filter": null,
            "language": "kor",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "universal-audio",
            "title": "Stereo"
        }
    ],
    "subtitle": [
        {
            "map": 3,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "+default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": "Forced"
        },
        {
            "map": 4,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        },
        {
            "map": 5,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": "Hearing Impaired"
        }
    ],
    "attachment": []
}
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Preopts
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - [
    "-fix_sub_duration"
]
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Postopts
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - Starting conversion.
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - FFmpeg command:
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - ======================
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - /usr/local/bin/ffmpeg -fix_sub_duration -i /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 ac3 -map 0:2 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 "title=5.1 Channel" -metadata:s:a:0 "handler_name=5.1 Channel" -metadata:s:a:0 language=kor -disposition:a:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:1 aac -map 0:2 -ac:a:1 2 -b:a:1 256k -metadata:s:a:1 BPS=256000 -metadata:s:a:1 BPS-eng=256000 -metadata:s:a:1 title=Stereo -metadata:s:a:1 handler_name=Stereo -metadata:s:a:1 language=kor -disposition:a:1 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 0:3 -metadata:s:s:0 title=Forced -metadata:s:s:0 handler_name=Forced -metadata:s:s:0 language=fra -disposition:s:0 +default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions -c:s:1 mov_text -map 0:4 -metadata:s:s:1 title= -metadata:s:s:1 handler_name= -metadata:s:s:1 language=fra -disposition:s:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:2 mov_text 
-map 0:5 -metadata:s:s:2 "title=Hearing Impaired" -metadata:s:s:2 "handler_name=Hearing Impaired" -metadata:s:s:2 language=fra -disposition:s:2 -default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mp4
2023-10-13 16:10:18 - resources.mediaprocessor - INFO - ======================
2023-10-13 16:15:52 - resources.mediaprocessor - INFO - /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mp4 created.
2023-10-13 16:15:53 - resources.mediaprocessor - INFO - Tagging /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv with TMDB ID 961268.
2023-10-13 16:15:53 - resources.metadata - INFO - Tagging file: /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mp4.
2023-10-13 16:15:54 - resources.metadata - INFO - Trying to write tags.
2023-10-13 16:15:54 - resources.metadata - INFO - Tags written successfully using mutagen.
2023-10-13 16:15:54 - resources.mediaprocessor - INFO - Relocating MOOV atom to start of file.
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 132721 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 172983 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 216602 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 55 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 1359 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching co64 with 1014 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Patching stco with 1 entries
2023-10-13 16:15:54 - qtfaststart - INFO - Writing output...
2023-10-13 16:17:44 - RadarrPostProcess - INFO - Radarr response from RescanMovie command: ID 1326043 started.
2023-10-13 16:17:54 - RadarrPostProcess - INFO - Rescan command completed successfully.
2023-10-13 16:17:54 - RadarrPostProcess - INFO - Radarr monitoring information updated for movie Ballerina.
2023-10-13 16:17:54 - RadarrPostProcess - INFO - Radarr response from Rename command: ID 1326046 queued.

from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

and here is the new autoProcess.ini that was created with the new container:

again, it has 128Kbps listed yet for some reason gets ignored, just like my mapping order gets ignored

[Converter]
ffmpeg = ffmpeg
ffprobe = ffprobe
threads = 0
hwaccels =
hwaccel-decoders =
hwdevices =
hwaccel-output-format =
output-directory =
output-directory-space-ratio = 0.0   
output-format = mp4
output-extension = mp4
temp-extension =
minimum-size = 0
ignored-extensions = nfo, ds_store   
copy-to =
move-to =
delete-original = True
process-same-extensions = False      
bypass-if-copying-all = False        
force-convert = False
post-process = False
wait-post-process = False
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 = True
tag-language = eng
download-artwork = poster
sanitize-disposition =
strip-metadata = False
keep-titles = False

[Video]
codec = h264, x264
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 =
prioritize-source-pix-fmt = True
filter =
force-filter = False

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

[Audio]
codec = ac3
languages =
default-language =
include-original-language = True
first-stream-of-language = False
channel-bitrate = 128
variable-bitrate = 0
max-bitrate = 0
max-channels = 0
filter =
profile =
force-filter = False
sample-rates =
sample-format =
copy-original = False
aac-adtstoasc = False
ignored-dispositions =
force-default = False
unique-dispositions = False
stream-codec-combinations =

[Audio.Sorting]
sorting = language, channels.d, map, d.comment
default-sorting = channels.a, map, d.comment
codecs =

[Universal Audio]
codec = aac
channel-bitrate = 128
variable-bitrate = 0
first-stream-only = False
filter =
profile =
force-filter = False

[Audio.ChannelFilters]

[Subtitle]
codec = mov_text
codec-image-based =
languages =
default-language =
include-original-language = False
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 =
force-default = False
unique-dispositions = False
attachment-codec =
remove-bitstream-subs = False

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

[Subtitle.CleanIt]
enabled = False
config-path =
tags =

[Subtitle.FFSubsync]
enabled = False

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




from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

I think i've fixed it with this:

[Audio.Sorting]
sorting = channels.a, language, map, d.comment
default-sorting = channels.a, map, d.comment
codecs =

As a side note:
sorting = language, channels.a, map, d.comment did not work, it required me to move the channels to the first priority position

after reading your documentation here i'm not actually sure why it works....i thought channels was priority position by putting it first, but according to your documentation the last item mentioned gets priority...

anyway here is the log of it working:

2023-10-13 18:02:14 - resources.readsettings - INFO - Loading config file /usr/local/sma/config/autoProcess.ini.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Processing /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Input Data
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "h264",
        "bitrate": 7154392,
        "pix_fmt": "yuv420p",
        "profile": "high",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "1920x1080",
        "level": 4.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "fra",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        },
        {
            "index": 2,
            "codec": "eac3",
            "bitrate": 768000,
            "channels": 6,
            "samplerate": 48000,
            "language": "kor",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [
        {
            "index": 3,
            "codec": "subrip",
            "disposition": "+default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions",
            "language": "fra"
        },
        {
            "index": 4,
            "codec": "subrip",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "fra"
        },
        {
            "index": 5,
            "codec": "subrip",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
            "language": "fra"
        }
    ],
    "attachment": []
}
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Reading video stream.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Video codec detected: h264.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Profile: high.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Video codec parameters None.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Reading audio streams.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Audio detected for stream 1 - eac3 fra 6 channel.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Audio detected for stream 2 - eac3 kor 6 channel.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 2.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Creating aac audio stream from source audio stream 2 [universal-audio].
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - ['0->1', '1->0']
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - ['0->0', '1->1']
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Default audio stream set to kor aac 2 channel stream [audio-default-sorting: ['channels.a', 'map', 'd.comment']].
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Reading subtitle streams.
2023-10-13 18:02:15 - resources.mediaprocessor - INFO - Subtitle detected for stream 3 - subrip fra.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Stream 3 is text-based subtitle for codec subrip.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 3.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Subtitle detected for stream 4 - subrip fra.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Stream 4 is text-based subtitle for codec subrip.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 4.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Subtitle detected for stream 5 - subrip fra.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Stream 5 is text-based subtitle for codec subrip.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 5.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Final sorting:
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - ['0->0', '1->1', '2->2']
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Output Data
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - {
    "source": [
        "/data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 6786.4523,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "bsf": null,
        "debug": "video",
        "title": "FHD"
    },
    "audio": [
        {
            "map": 2,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "quality": 0,
            "profile": null,
            "samplerate": null,
            "sampleformat": "",
            "filter": null,
            "language": "kor",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "universal-audio",
            "title": "Stereo"
        },
        {
            "map": 2,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "profile": null,
            "quality": 0,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "kor",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "bsf": null,
            "debug": "audio",
            "title": "5.1 Channel"
        }
    ],
    "subtitle": [
        {
            "map": 3,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "+default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": "Forced"
        },
        {
            "map": 4,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        },
        {
            "map": 5,
            "codec": "mov_text",
            "language": "fra",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": "Hearing Impaired"
        }
    ],
    "attachment": []
}
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Preopts
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - [
    "-fix_sub_duration"
]
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Postopts
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2023-10-13 18:02:18 - resources.mediaprocessor - INFO - Starting conversion.
2023-10-13 18:02:19 - resources.mediaprocessor - INFO - FFmpeg command:
2023-10-13 18:02:19 - resources.mediaprocessor - INFO - ======================
2023-10-13 18:02:19 - resources.mediaprocessor - INFO - /usr/local/bin/ffmpeg -fix_sub_duration -i /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mkv -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 aac -map 0:2 -ac:a:0 2 -b:a:0 256k -metadata:s:a:0 BPS=256000 -metadata:s:a:0 BPS-eng=256000 -metadata:s:a:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=kor -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:a:1 ac3 -map 0:2 -ac:a:1 6 -b:a:1 768k -metadata:s:a:1 BPS=768000 -metadata:s:a:1 BPS-eng=768000 -metadata:s:a:1 "title=5.1 Channel" -metadata:s:a:1 "handler_name=5.1 Channel" -metadata:s:a:1 language=kor -disposition:a:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:3 -metadata:s:s:0 title=Forced -metadata:s:s:0 handler_name=Forced -metadata:s:s:0 language=fra -disposition:s:0 +default-dub-original-comment-lyrics-karaoke+forced-hearing_impaired-visual_impaired-captions -c:s:1 mov_text -map 0:4 -metadata:s:s:1 title= -metadata:s:s:1 handler_name= -metadata:s:s:1 language=fra -disposition:s:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:2 mov_text -map 0:5 -metadata:s:s:2 "title=Hearing Impaired" -metadata:s:s:2 "handler_name=Hearing Impaired" -metadata:s:s:2 language=fra -disposition:s:2 -default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mp4
2023-10-13 18:02:19 - resources.mediaprocessor - INFO - ======================
2023-10-13 18:07:49 - resources.mediaprocessor - INFO - /data/movies/Ballerina.2023/Ballerina.2023.WEBDL-1080p.mp4 created.

from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

Thanks for exploring this further, really appreciate it.

In regards to priority , are you saying that if i want to prioritize AAC 2.0 being first track above all else, then i should change my current working config to actually put channels.a at the end? This would be even better for me in theory?

[Audio.Sorting]
sorting = channels.a, language, map, d.comment   ---> language, map, d.comment,  channels.a ? even better?
default-sorting = channels.a, map, d.comment     ---> language, map, d.comment, channels.a ? even better?
codecs =

Forgive me if I'm wrong, but isn't one of the main goals behind this project to provide a maximum client compatible video? Surely putting AAC 2.0 should be the first default auido stream for this reason, otherwise you might run into unnecessary HLS conversions sometimes, as aforementioned.

Here is another log from a few days ago of it not working with
[Audio.Sorting] sorting = language, channels.d, map, d.comment and
default-sorting = channels.a, map, d.comment

2023-10-10 12:54:50 - resources.mediaprocessor - INFO - {
    "source": [
        "/data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 10022.247299999999,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "bsf": null,
        "debug": "video",
        "title": "FHD"
    },
    "audio": [
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 1536,
            "profile": null,
            "quality": 0,
            "filter": null,
            "samplerate": null,
            "sampleformat": "",
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "bsf": null,
            "debug": "audio",
            "title": "5.1 Channel"
        },
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "quality": 0,
            "profile": null,
            "samplerate": null,
            "sampleformat": "",
            "filter": "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",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "universal-audio",
            "title": "Stereo"
        }
    ],
    "subtitle": [
        {
            "map": 2,
            "codec": "mov_text",
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": "Hearing Impaired"
        },
        {
            "map": 3,
            "codec": "mov_text",
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        }
    ],
    "attachment": []
}
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - Preopts
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - [
    "-fix_sub_duration"
]
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - Postopts
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-movflags",
    "faststart"
]
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - Starting conversion.
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - FFmpeg command:
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - ======================
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - /usr/local/bin/ffmpeg -fix_sub_duration -i "/data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.mkv" -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 1536k -metadata:s:a:0 BPS=1536000 -metadata:s:a:0 BPS-eng=1536000 -metadata:s:a:0 "title=5.1 Channel" -metadata:s:a:0 "handler_name=5.1 Channel" -metadata:s:a:0 language=eng -disposition:a:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:a:1 aac -map 0:1 -ac:a:1 2 -b:a:1 256k -metadata:s:a:1 BPS=256000 -metadata:s:a:1 BPS-eng=256000 -filter:a:1 "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" -metadata:s:a:1 title=Stereo -metadata:s:a:1 handler_name=Stereo -metadata:s:a:1 language=eng -disposition:a:1 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 0:2 -metadata:s:s:0 "title=Hearing Impaired" -metadata:s:s:0 "handler_name=Hearing Impaired" -metadata:s:s:0 language=eng -disposition:s:0 +default-dub-original-comment-lyrics-karaoke-forced+hearing_impaired-visual_impaired-captions -c:s:1 mov_text -map 0:3 -metadata:s:s:1 title= -metadata:s:s:1 handler_name= -metadata:s:s:1 language=eng -disposition:s:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -movflags faststart -y "/data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.sickbeard"
2023-10-10 12:54:50 - resources.mediaprocessor - INFO - ======================
2023-10-10 13:09:56 - resources.mediaprocessor - INFO - /data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.sickbeard created.
2023-10-10 13:09:58 - resources.mediaprocessor - INFO - Tagging /data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.mkv with TMDB ID 1648.
2023-10-10 13:09:58 - resources.metadata - INFO - Tagging file: /data/movies/Bill & Ted's Excellent Adventure (1989)/Bill.&.Ted's.Excellent.Adventure.1989.WEBDL-1080p.mp4.
2023-10-10 13:18:17 - resources.metadata - INFO - Trying to write tags.

from sickbeard_mp4_automator.

mdhiggins avatar mdhiggins commented on June 8, 2024

Well if this is from 10/10 and you were using your original configuration from the OP then it looks like its working as intended. I was more interested on conversion that weren't working once you corrected your descending to ascending setting

With regards to where to put your channel setting, the answer is 'it depends'

If you want channels to be end all be all sort, then yeah put it last, but this may have unintended consequences
Commentary audio is often 2 channel so you may prioritize commentary over normal audio tracks which is why d.comment is placed last as the recommended setting

If you want audio tracks grouped based on their source order, keep the map option where it is, if not you can move channels to after map (this is where I would guess you may have been having issues with certain videos not behaving as expected after you fixed your settings but that's just a guess)

from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

Yes, the last log i posted was an example from prior to 10/10 when it wasn't working for any of my videos for as long as i can remember. It's strange, the file definitely had AAC as default 2nd audio stream, despite it appearing to be correct in the last log i posted. As evidenced here:

image

furthermore, i can confirm it didn't work if i run ffmpeg -i on the final mp4:

hd_video        : 2
    media_type      : 9
    description     : History is about to be rewritten by two guys who can't spell.
    synopsis        : Bill and Ted are high school buddies starting a band. They are also about to fail their history class—which means Ted would be sent to military school—but receive help from Rufus, a traveller from a future where their band is the foundation for a perf
  Duration: 01:29:51.21, start: 0.000000, bitrate: 11469 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x816 [SAR 799:800 DAR 47:20], 10547 kb/s, SAR 959:960 DAR 959:408, 24 fps, 24 tbr, 16k tbn, 48 tbc (default)
    Metadata:
      handler_name    : FHD
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      handler_name    : 5.1 Channel
    Side data:
      audio service type: main
    Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 257 kb/s (default)
    Metadata:
      handler_name    : Stereo
    Stream #0:3(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : Hearing Impaired
    Stream #0:4(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:5: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 1000x1500 [SAR 1:1 DAR 2:3], 90k tbr, 90k tbn, 90k tbc (attached pic)
At least one output file must be specified

thanks for explaining further about the priority, since it's working for me now i won't move them. Good point about audio commentary being 2.0, that thought has also crossed my mind.

we can mark this issue as closed if it suits you, otherwise i'm happy to pursue more testing if it's helpful.

from sickbeard_mp4_automator.

oregonpillow avatar oregonpillow commented on June 8, 2024

Sorry i misunderstood earlier. Ok this makes sense now! Thanks so much for your help on this, really appreciated!

from sickbeard_mp4_automator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.