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.52k stars 202 forks source link

GPU Encoding on Windows #1594

Closed vtyr closed 2 years ago

vtyr commented 2 years ago

Hi there,

I'm attempting to decode/encode all on my GTX 960, however encoding keeps going back to my Ryzen 5 CPU on Windows. This is the relevant section of my autoprocess.ini:

[Converter]
ffmpeg = C:\Tools\ffmpeg\bin\ffmpeg.exe
ffprobe = C:\Tools\ffmpeg\bin\ffprobe.exe
threads = 0
hwaccels = cuda
hwaccel-decoders = h264_cuda
hwdevices = 
hwaccel-output-format = 

I read in issue 1421 to leave hwdevices and hwaccel-output-format blank as it's my only GPU in the system.

In addition to this, when attempting to pass conversion into Radarr through a custom script, it returns 'Exit code 1'

My .bat script for Radarr: "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe" "C:\Tools\Convert Automation\postRadarr.py"

If I run my .bat script outside of Radarr it returns: image

mdhiggins commented 2 years ago

The postRadarr error is normal if you're running it outside of Radarr, it needs environment variables that Radarr provides to run and can't be run manually

Exit code 1 just means the script had an error, you'll need to look at the logs to see what that error was or I can't help

Please look at the issue template and include all the of the relevant data points as I can't provide any help without that information especially for complex questions like hardware acceleration

A good rule of thumb is to first create an ffmpeg command that does what you want hardware wise outside of the SMA script to ensure your system even supports it (you need drivers/dependency libraries, custom ffmpeg builds, and appropriate hardware to run nvidia based hardware acceleration ), then to see if you can get manual.py to work or generate a command that mimics your test command, then to set up your integration with things like Radarr, especially if you don't know how to look at sma.log or radarr logs to find your error

vtyr commented 2 years ago

Apologies. Added information below. The script is now working from SAB to Radarr, however still encountering GPU encoding issues (or lack thereof)

FWIW here's how my Jellyfin is encoding/decoding using the GPU:

C:\Program Files\Jellyfin\Server\ffmpeg.exe -analyzeduration 200M -init_hw_device cuda=cu:0 -filter_hw_device cu -hwaccel cuda -hwaccel_output_format cuda -threads 1 -autorotate 0 -i file:"H:\Joker (2019)\Joker.2019.2160p.HDR.WEB-DL.DDP5.1.HEVC-BLUTONiUM.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -preset p4 -b:v 36867918 -maxrate 36867918 -bufsize 73735836 -profile:v:0 high -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_cuda=w=1920:h=1080:format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "C:\ProgramData\Jellyfin\Server\transcodes\356050d83d9e4224aec8d841f6d991fc%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "C:\ProgramData\Jellyfin\Server\transcodes\356050d83d9e4224aec8d841f6d991fc.m3u8"

Describe the bug Encoding is running on my GPU, rather than my GPU whilst using this automation script.

Command or context you are trying to run Either using manual.py or the postSonarr.py script results in encoding being done on the CPU and decoding on GPU, rather than GPU for both.

autoProcess.ini settings

[Converter]
ffmpeg = C:\Tools\ffmpeg\bin\ffmpeg.exe
ffprobe = C:\Tools\ffmpeg\bin\ffprobe.exe
threads = 0
hwaccels = cuda 
hwaccel-decoders = h264_cuvid
hwdevices = 
hwaccel-output-format = cuda
output-directory = 
output-format = mp4
output-extension = mp4
temp-extension = 
temp-output = False
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 = 
first-stream-of-language = False
allow-language-relax = True
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 = 
unique-dispositions = False
stream-codec-combinations = 

[Audio.Sorting]
sorting = language, channels.d, map, d.comment
default-sorting = channels.d, 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]
6-2 = pan=stereo|FL=0.5*FC+0.707*FL+0.707*BL+0.5*LFE|FR=0.5*FC+0.707*FR+0.707*BR+0.5*LFE

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

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

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

[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 = XXX
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 = 

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

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

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

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

[Plex]
host = localhost
port = 32400
refresh = False
token = 

Log files

2022-06-14 23:57:21 - MANUAL - INFO - Manual processor started.
2022-06-14 23:57:21 - MANUAL - INFO - Python 64-bit 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)].
2022-06-14 23:57:21 - MANUAL - INFO - Guessit version: 3.4.3.
2022-06-14 23:57:21 - MANUAL - INFO - C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe
2022-06-14 23:57:21 - MANUAL - INFO - Loading config file C:\Tools\ConvertAutomation\config\autoProcess.ini.
2022-06-14 23:57:26 - MANUAL - INFO - Matched movie title as: I Am Legend 2007-12-12 (TMDB ID: 6479)
2022-06-14 23:57:28 - MANUAL - INFO - Processing I Am Legend
2022-06-14 23:57:28 - MANUAL - INFO - Input Data
2022-06-14 23:57:28 - MANUAL - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "hevc",
        "bitrate": 4201129,
        "pix_fmt": "yuv420p",
        "profile": "main",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p",
            "color_space": "bt709",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                },
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "1920x804",
        "level": 5.1,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "dts",
            "bitrate": 1536000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        },
        {
            "index": 2,
            "codec": "ac3",
            "bitrate": 192000,
            "channels": 2,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "-default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [
        {
            "index": 3,
            "codec": "hdmv_pgs_subtitle",
            "bitrate": 33879,
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "eng"
        }
    ],
    "attachment": []
}
2022-06-14 23:57:28 - MANUAL - INFO - Reading video stream.
2022-06-14 23:57:28 - MANUAL - INFO - Video codec detected: hevc.
2022-06-14 23:57:28 - MANUAL - INFO - Pix Fmt: yuv420p.
2022-06-14 23:57:28 - MANUAL - INFO - Profile: main.
2022-06-14 23:57:28 - MANUAL - INFO - Video codec parameters None.
2022-06-14 23:57:28 - MANUAL - INFO - Creating h264 video stream from source stream 0.
2022-06-14 23:57:28 - MANUAL - INFO - Reading audio streams.
2022-06-14 23:57:28 - MANUAL - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-06-14 23:57:28 - MANUAL - INFO - Audio detected for stream 1 - dts eng 6 channel.
2022-06-14 23:57:28 - MANUAL - INFO - Creating ac3 audio stream from source stream 1.
2022-06-14 23:57:28 - MANUAL - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-06-14 23:57:28 - MANUAL - INFO - Audio detected for stream 2 - ac3 eng 2 channel.
2022-06-14 23:57:28 - MANUAL - INFO - Creating aac audio stream from source stream 2.
2022-06-14 23:57:28 - MANUAL - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-06-14 23:57:28 - MANUAL - INFO - Final sorting:
2022-06-14 23:57:28 - MANUAL - INFO - ['0->0', '1->1', '2->2']
2022-06-14 23:57:28 - MANUAL - INFO - Final sorting:
2022-06-14 23:57:28 - MANUAL - INFO - ['0->0', '1->1', '2->2']
2022-06-14 23:57:28 - MANUAL - INFO - Default audio stream set to eng ac3 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-06-14 23:57:28 - MANUAL - INFO - Reading subtitle streams.
2022-06-14 23:57:28 - MANUAL - INFO - Subtitle detected for stream 3 - hdmv_pgs_subtitle eng.
2022-06-14 23:57:28 - MANUAL - INFO - Stream 3 is image-based subtitle for codec hdmv_pgs_subtitle.
2022-06-14 23:57:28 - MANUAL - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2022-06-14 23:57:28 - MANUAL - INFO - Final sorting:
2022-06-14 23:57:28 - MANUAL - INFO - []
2022-06-14 23:57:28 - MANUAL - INFO - cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2022-06-14 23:57:28 - MANUAL - INFO - Output Data
2022-06-14 23:57:28 - MANUAL - INFO - {
    "source": [
        "I:\\70bb1689c5754142b91c34c0708d9b87.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "h264",
        "map": 0,
        "bitrate": 4000.07855,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "unknown",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": null,
        "bsf": null,
        "debug": "video",
        "title": "FHD"
    },
    "audio": [
        {
            "map": 1,
            "codec": "ac3",
            "channels": 6,
            "bitrate": 768,
            "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"
        },
        {
            "map": 2,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "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": "universal-audio",
            "title": "Stereo (Commentary)"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2022-06-14 23:57:28 - MANUAL - INFO - Preopts
2022-06-14 23:57:28 - MANUAL - INFO - [
    "-hwaccel",
    "cuda"
]
2022-06-14 23:57:28 - MANUAL - INFO - Postopts
2022-06-14 23:57:28 - MANUAL - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2022-06-14 23:57:28 - MANUAL - INFO - Starting conversion.
2022-06-14 23:57:28 - MANUAL - INFO - FFmpeg command:
2022-06-14 23:57:28 - MANUAL - INFO - ======================
2022-06-14 23:57:28 - MANUAL - INFO - C:\Tools\ffmpeg\bin\ffmpeg.exe -hwaccel cuda -i I:\70bb1689c5754142b91c34c0708d9b87.mkv -vcodec libx264 -map 0:0 -vb 4000k -metadata:s:v BPS=4000000 -metadata:s:v BPS-eng=4000000 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -tag:v avc1 -c:a:0 ac3 -map 0:1 -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=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:a:2 aac -map 0:2 -ac:a:2 2 -b:a:2 256k -metadata:s:a:2 BPS=256000 -metadata:s:a:2 BPS-eng=256000 -metadata:s:a:2 "title=Stereo (Commentary)" -metadata:s:a:2 "handler_name=Stereo (Commentary)" -metadata:s:a:2 language=eng -disposition:a:2 -default-dub-original+comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y I:\70bb1689c5754142b91c34c0708d9b87.mp4
2022-06-14 23:57:28 - MANUAL - INFO - ======================

FFMpeg headers image

System Information

Expected behavior Both encoding and decoding is all handled by the GPU

vtyr commented 2 years ago

Fixed this with the following info in autoProcess.ini with some reading of issue 1463

hwaccels =
hwaccel-decoders = hevc_cuvid, h264_cuda, hevc_cuda, h264_cuvid
hwdevices = 
hwaccel-output-format = cuda:cuda
...
[Video]
codec = h264_nvenc, x264, h264
vtyr commented 2 years ago

Apologies - I now seem to be having issues with fix_sub_duration. Is there a way to skip or plainly remove subs and ignore them for conversion? Appears that when it runs fix_sub_duration is does it all on the CPU very slowly with minimal CPU usage.

2022-06-15 09:44:20 - SABPostProcess - INFO - SAB post processing started.
2022-06-15 09:44:20 - resources.readsettings - INFO - C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe
2022-06-15 09:44:20 - resources.readsettings - INFO - Loading config file C:\Tools\ConvertAutomation\config\autoProcess.ini.
2022-06-15 09:44:20 - SABPostProcess - INFO - Performing conversion
2022-06-15 09:44:21 - SABPostProcess - INFO - Processing file I:\complete\Yes.Man.2008.1080p.BluRay.DTS.x264-DON\165462.mkv.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Input Data
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - {
    "format": "matroska,webm",
    "format-fullname": "Matroska / WebM",
    "video": {
        "index": 0,
        "codec": "h264",
        "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": "1920x800",
        "level": 4.1,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "dts",
            "bitrate": 1536000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [
        {
            "index": 2,
            "codec": "ass",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "spa"
        },
        {
            "index": 3,
            "codec": "ass",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "fra"
        },
        {
            "index": 4,
            "codec": "ass",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "fin"
        },
        {
            "index": 5,
            "codec": "ass",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "swe"
        },
        {
            "index": 6,
            "codec": "ass",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "fin"
        }
    ],
    "attachment": [
        {
            "index": 7,
            "codec": "ttf",
            "filename": "cronospro-bold.ttf",
            "mimetype": "application/x-truetype-font"
        },
        {
            "index": 8,
            "codec": "ttf",
            "filename": "cronospro-semibold.ttf",
            "mimetype": "application/x-truetype-font"
        },
        {
            "index": 9,
            "codec": "ttf",
            "filename": "cronospro-semiboldit.ttf",
            "mimetype": "application/x-truetype-font"
        }
    ]
}
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Reading video stream.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Video codec detected: h264.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Profile: high.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Video codec parameters None.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Reading audio streams.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Audio detected for stream 1 - dts eng 6 channel.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Final sorting:
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - ['0->0', '1->1']
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Final sorting:
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - ['0->0', '1->1']
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Default audio stream set to eng ac3 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Reading subtitle streams.
2022-06-15 09:44:21 - resources.mediaprocessor - INFO - Subtitle detected for stream 2 - ass spa.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Stream 2 is text-based subtitle for codec ass.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 2.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Subtitle detected for stream 3 - ass fra.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Stream 3 is text-based subtitle for codec ass.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 3.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Subtitle detected for stream 4 - ass fin.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Stream 4 is text-based subtitle for codec ass.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 4.
2022-06-15 09:44:22 - resources.mediaprocessor - INFO - Subtitle detected for stream 5 - ass swe.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Stream 5 is text-based subtitle for codec ass.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 5.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Subtitle detected for stream 6 - ass fin.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Stream 6 is text-based subtitle for codec ass.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 6.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Final sorting:
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - ['0->0', '1->1', '2->2', '3->3', '4->4']
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Output Data
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - {
    "source": [
        "I:\\complete\\Yes.Man.2008.1080p.BluRay.DTS.x264-DON\\165462.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 9911.78225,
        "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": 768,
            "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": "spa",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        },
        {
            "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": null
        },
        {
            "map": 4,
            "codec": "mov_text",
            "language": "fin",
            "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": "swe",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        },
        {
            "map": 6,
            "codec": "mov_text",
            "language": "fin",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "debug": "subtitle.embed-subs",
            "title": null
        }
    ],
    "attachment": []
}
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Preopts
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - [
    "-fix_sub_duration"
]
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Postopts
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - Starting conversion.
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - FFmpeg command:
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - ======================
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - C:\Tools\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -i I:\complete\Yes.Man.2008.1080p.BluRay.DTS.x264-DON\165462.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 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=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= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=spa -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=fra -disposition:s:1 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:2 mov_text -map 0:4 -metadata:s:s:2 title= -metadata:s:s:2 handler_name= -metadata:s:s:2 language=fin -disposition:s:2 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:3 mov_text -map 0:5 -metadata:s:s:3 title= -metadata:s:s:3 handler_name= -metadata:s:s:3 language=swe -disposition:s:3 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:4 mov_text -map 0:6 -metadata:s:s:4 title= -metadata:s:s:4 handler_name= -metadata:s:s:4 language=fin -disposition:s:4 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y I:\complete\Yes.Man.2008.1080p.BluRay.DTS.x264-DON\165462.mp4
2022-06-15 09:44:23 - resources.mediaprocessor - INFO - ======================
mdhiggins commented 2 years ago

I don't think the fix_sub_duration flag is to blame here

The command sample you posted is remuxing the video stream (copy) which means the GPU won't have anything to do (which is a good thing, remuxing is the most performance efficient and limited only by your hard drive speeds)

Any CPU usage you're seeing is probably from the audio streams being encoded which the GPU won't do anyway

vtyr commented 2 years ago

That eases the mind, thanks. I've now got files sat in the completed download folder after being successfully converted - the first 3 or so files were correctly moved over to their destination drives and removed from 'completed' - is it a case that the files sat in the completed folder will get moved at some point, is there a way to force them to be picked up? I've got Download Handling disabled in Radarr and done via the script.

mdhiggins commented 2 years ago

Just use the "manual import" feature in Radarr/Sonarr