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 201 forks source link

subtitle errors #1712

Closed herbi3 closed 4 months ago

herbi3 commented 4 months ago

Describe the bug If processing of subtitles fail, ultimately the video itself is not converted.

Command or context you are trying to run Automatic using the sickchill post-processing

autoProcess.ini settings

[Converter]
ffmpeg = C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe
ffprobe = C:\Users\Admin\AppData\FFMPEG\bin\ffprobe.exe
threads = 0
hwaccels = cuda
hwaccel-decoders = hevc_nvenc, h265_nvenc, hevc_cuvid, h265_cuvid, h264_nvenc, h264_cuvid, hevc_vaapi, hevc_qsv, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, h264_qsv, h264_vaapi
output-directory =
output-format = mp4
output-extension = mp4
temp-extension = tmp
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to = 
move-to = 
delete-original = True
sort-streams = True
process-same-extensions = True
force-convert = True
post-process = False
preopts = 
postopts = 
hwdevices = 
hwaccel-output-format = cuda
detailed-progress = True
wait-post-process = False
bypass-if-copying-all = False
opts-separator = ,
regex-directory-replace = [^\w\-_\. ]
temp-output = False
output-directory-space-ratio = 0.0

[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 = True
keep-titles = False

[Video]
codec = hevc_nvenc
max-bitrate = 0
crf = 30
crf-profiles = 0:23:4M:8M,2000:20:6M:12M,5000:18:8M:16M
max-width = 0
profile = 
max-level = 4.1
pix-fmt = 
filter = 
force-filter = True
preset = fast
codec-parameters =
dynamic-parameters = True
bitrate-ratio = hevc:0.7, hevc_nvenc:0.7, h264:0.6
prioritize-source-pix-fmt = True

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

[Audio]
codec = OPUS
languages = eng
default-language = eng
first-stream-of-language = False
allow-language-relax = false
channel-bitrate = 0
max-bitrate = 256
max-channels = 0
prefer-more-channels = True
filter = 
force-filter = True
sample-rates = 
copy-original = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions = 
unique-dispositions = False
sample-format = 
stream-codec-combinations = trudhd:ac3:aac, truehd:ac3, ac3:aac
variable-bitrate = 0
profile = 
include-original-language = False
force-default = True

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

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

[Sonarr]
host = localhost
port = 8989
apikey = 
ssl = False
webroot = 
force-rename = False
rescan = True
block-reprocess = False
in-progress-check = True

[Radarr]
host = localhost
port = 7878
apikey = ***
ssl = False
webroot = /radarr
force-rename = True
rescan = True
block-reprocess = False
in-progress-check = True

[Sickbeard]
host = localhost
port = 8083
ssl = False
apikey = ***
webroot = /sickchill
username = ***
password = ***

[Sickrage]
host = localhost
port = 8083
ssl = False
apikey = ***
webroot = /sickchill
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 = 
password = 
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 = ***
port = 443
refresh = True
token = ***
username = 
password = 
servername = 
ssl = True
ignore-certs = True
path-mapping = 

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

[Subtitle.Subliminal.Auth]
opensubtitles = 
tvsubtitles = 

[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

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

[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 = True
config-path = 
tags = default, no-style

[Subtitle.FFSubsync]
enabled = True

Log files

2024-05-13 11:48:24 INFO :: POSTPROCESSOR-MANUAL :: Deleting folder: M:\Downloads\Downloaded\SickBeard\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA 2024-05-13 11:48:24 INFO :: POSTPROCESSOR-MANUAL :: Processing succeeded for M:\Downloads\Downloaded\SickBeard\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA.mkv AA 2024-05-13 11:48:24 - resources.mediaprocessor - ERROR - M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.tmp deleted. AA Conversion failed! AA frame= 2 fps=0.0 q=22.0 Lsize= 6KiB time=00:00:00.08 bitrate= 627.5kbits/s dup=1 drop=0 speed=0.455x AA [out#0/mp4 @ 000001d23bdd9a00] video:1KiB audio:1KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 154.294598% AA [out#0/mp4 @ 000001d23bdd9a00] Terminating thread with return code -22 (Invalid argument) AA [out#0/mp4 @ 000001d23bdd9a00] Task finished with error code: -22 (Invalid argument) AA [out#0/mp4 @ 000001d23bdd9a00] Error muxing a packet AA Last message repeated 1 times AA [vost#0:0/hevc_nvenc @ 000001d23c521b80] Error submitting a packet to the muxer: Invalid argument AA [mp4 @ 000001d23c650480] Application provided duration: 14400002000 is invalid AA encoder : Lavc61.5.103 mov_text AA Metadata: AA Stream #0:3(eng): Subtitle: mov_text (tx3g / 0x67337874) AA encoder : Lavc61.5.103 libopus AA handler_name : Stereo AA title : Stereo AA BPS-eng : 256000 AA BPS : 256000 AA Metadata: AA Stream #0:2(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, flt, 256 kb/s AA encoder : Lavc61.5.103 libopus AA handler_name : 5.1 Channel AA title : 5.1 Channel AA BPS-eng : 256000 AA BPS : 256000 AA Metadata: AA Stream #0:1(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, 5.1, flt, 256 kb/s (default) AA cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A AA Side data: AA encoder : Lavc61.5.103 hevc_nvenc AA handler_name : HD AA title : HD AA Metadata: AA Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), nv12(tv, progressive), 1280x640 [SAR 1:1 DAR 2:1], q=2-31, 2000 kb/s, 23.98 fps, 24k tbn (default) AA encoder : Lavf61.3.103 AA encoding_tool : SMA AA Metadata: AA Output #0, mp4, to 'M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.tmp': AA Press [q] to stop, [?] for help AA Stream #1:0 -> #0:3 (subrip (srt) -> mov_text (native)) AA Stream #0:1 -> #0:2 (dts (dca) -> opus (libopus)) AA Stream #0:1 -> #0:1 (dts (dca) -> opus (libopus)) AA Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> hevc (hevc_nvenc)) AA Stream mapping: AA Stream #1:0: Subtitle: subrip (srt) AA Duration: N/A, bitrate: N/A AA Input #1, srt, from 'M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.srt': AA _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES AA _STATISTICS_WRITING_DATE_UTC: 2023-08-23 17:25:25 AA _STATISTICS_WRITING_APP: mkvmerge v77.0 ('Elemental') 64-bit AA NUMBER_OF_BYTES : 18419138 AA NUMBER_OF_FRAMES: 1574 AA DURATION : 00:54:49.703000000 AA BPS : 44792 AA title : English AA Metadata: AA Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle (pgssub) AA _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES AA _STATISTICS_WRITING_DATE_UTC: 2023-08-23 17:25:25 AA _STATISTICS_WRITING_APP: mkvmerge v77.0 ('Elemental') 64-bit AA NUMBER_OF_BYTES : 638866404 AA NUMBER_OF_FRAMES: 317528 AA DURATION : 00:56:26.966000000 AA BPS : 1508999 AA Metadata: AA Stream #0:1: Audio: dts (dca) (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default) AA _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES AA _STATISTICS_WRITING_DATE_UTC: 2023-08-23 17:25:25 AA _STATISTICS_WRITING_APP: mkvmerge v77.0 ('Elemental') 64-bit AA NUMBER_OF_BYTES : 690077181 AA NUMBER_OF_FRAMES: 81206 AA DURATION : 00:56:26.967000000 AA BPS : 1629959 AA Metadata: AA Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x640, SAR 1:1 DAR 2:1, 23.98 fps, 23.98 tbr, 1k tbn (default) AA Duration: 00:56:26.97, start: 0.000000, bitrate: 3163 kb/s AA creation_time : 2023-08-23T17:25:25.000000Z AA encoder : libebml v1.4.4 + libmatroska v1.7.1 AA Metadata: AA Input #0, matroska,webm, from 'M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.mkv': AA Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options AA [matroska,webm @ 000001d23bdd5fc0] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size AA libpostproc 58. 2.100 / 58. 2.100 AA libswresample 5. 2.100 / 5. 2.100 AA libswscale 8. 2.100 / 8. 2.100 AA libavfilter 10. 2.101 / 10. 2.101 AA libavdevice 61. 2.100 / 61. 2.100 AA libavformat 61. 3.103 / 61. 3.103 AA libavcodec 61. 5.103 / 61. 5.103 AA libavutil 59. 17.100 / 59. 17.100 AA configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint AA built with gcc 13.2.0 (Rev5, Built by MSYS2 project) AA 2024-05-13 11:48:24 - resources.mediaprocessor - ERROR - ffmpeg version 2024-05-08-git-e8e84dc325-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers AA 2024-05-13 11:48:24 - resources.mediaprocessor - ERROR - C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel cuda -vcodec h264_cuvid -i M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.mkv -i M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.srt -map_metadata -1 -vcodec hevc_nvenc -map 0:0 -field_order progressive -metadata:s:v title=HD -metadata:s:v handler_name=HD -preset fast -level 4.1 -tag:v hvc1 -qp 23 -maxrate:v 4m -bufsize 8m -c:a:0 libopus -map 0:1 -ac:a:0 6 -b:a:0 256k -metadata:s:a:0 BPS=256000 -metadata:s:a:0 BPS-eng=256000 -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 libopus -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 -c:s:0 mov_text -map 1:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=eng -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -strict -2 -y M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.tmp AA converter.ffmpeg.FFMpegConvertError:  AA raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd, AA File "C:\Users\Admin\AppData\MP4_Automator\converter\ffmpeg.py", line 798, in convert AA for timecode, debug in self.ffmpeg.convert(outfile, AA File "C:\Users\Admin\AppData\MP4_Automator\converter\__init__.py", line 329, in convert AA for timecode, debug in conv: AA File "C:\Users\Admin\AppData\MP4_Automator\resources\mediaprocessor.py", line 2317, in convert AA Traceback (most recent call last): AA 2024-05-13 11:48:24 - resources.mediaprocessor - ERROR - Error converting file, FFMPEG error. AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - ====================== AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel cuda -vcodec h264_cuvid -i "M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.mkv" -i "M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.srt" -map_metadata -1 -vcodec hevc_nvenc -map 0:0 -field_order progressive -metadata:s:v title=HD -metadata:s:v handler_name=HD -preset fast -level 4.1 -tag:v hvc1 -qp 23 -maxrate:v 4m -bufsize 8m -c:a:0 libopus -map 0:1 -ac:a:0 6 -b:a:0 256k -metadata:s:a:0 BPS=256000 -metadata:s:a:0 BPS-eng=256000 -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 libopus -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 -c:s:0 mov_text -map 1:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=eng -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -strict -2 -y "M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.tmp" AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - ====================== AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - FFmpeg command: AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - Starting conversion. AA ] AA "encoding_tool=SMA" AA "-metadata:g", AA "0", AA "-threads", AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - [ AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - Postopts AA ] AA "h264_cuvid" AA "-vcodec", AA "cuda", AA "-hwaccel", AA "-fix_sub_duration", AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - [ AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - Preopts AA } AA "attachment": [] AA ], AA } AA "title": null AA "debug": "subtitle.embed-subs", AA "language": "eng", AA "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions", AA "codec": "mov_text", AA "map": 0, AA "source": 1, AA { AA "subtitle": [ AA ], AA } AA "title": "Stereo" AA "debug": "universal-audio", AA "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions", AA "language": "eng", AA "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", AA "sampleformat": "", AA "samplerate": null, AA "profile": null, AA "quality": 0, AA "bitrate": 256, AA "channels": 2, AA "codec": "opus", AA "map": 1, AA { AA }, AA "title": "5.1 Channel" AA "debug": "audio", AA "bsf": null, AA "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions", AA "language": "eng", AA "sampleformat": "", AA "samplerate": null, AA "filter": null, AA "quality": 0, AA "profile": null, AA "bitrate": 256, AA "channels": 6, AA "codec": "opus", AA "map": 1, AA { AA "audio": [ AA }, AA "title": "HD" AA "debug": "video", AA "bsf": null, AA }, AA ] AA } AA "side_data_type": "H.26[45] User Data Unregistered SEI message" AA { AA "side_data_list": [ AA "pix_fmt": "yuv420p", AA "framedata": { AA "params": null, AA "filter": null, AA "width": null, AA "field_order": "progressive", AA "pix_fmt": null, AA "preset": "fast", AA "profile": null, AA "level": 4.1, AA "bufsize": "8m", AA "maxrate": "4m", AA "crf": 23, AA "bitrate": 927.69153, AA "map": 0, AA "codec": "hevc_nvenc", AA "video": { AA "format": "mp4", AA ], AA "M:\\Media\\TV Shows\\For All Mankind\\Season 2\\For All Mankind - S2 E9 - Triage.srt" AA "M:\\Media\\TV Shows\\For All Mankind\\Season 2\\For All Mankind - S2 E9 - Triage.mkv", AA "source": [ AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - { AA 2024-05-13 11:48:24 - resources.mediaprocessor - INFO - Output Data AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - h264_cuvid decoder is supported by this ffmpeg build and will also be used [hwaccel-decoders]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - ['0->0'] AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Final sorting: AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream by importing Text-based subtitle For All Mankind - S2 E9 - Triage.srt [embed-subs]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 1 results in your approved languages. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Stream 2 is image-based subtitle for codec hdmv_pgs_subtitle. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Subtitle detected for stream 2 - hdmv_pgs_subtitle eng. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Reading subtitle streams. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Default audio stream set to eng opus 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - ['0->0', '1->1'] AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Final sorting: AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - ['0->0', '1->1'] AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Final sorting: AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Creating opus audio stream from source audio stream 1 [universal-audio]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Creating opus audio stream from source stream 1. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Audio detected for stream 1 - dts eng 6 channel. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations]. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Reading audio streams. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Creating hevc_nvenc video stream from source stream 0. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Video codec parameters None. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Acceptable profile match found for VBR 1546.15255 using CRF 23, maxrate 4m, bufsize 8m. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Profile: high. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Video codec detected: h264. AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Reading video stream. AA } AA "attachment": [] AA ], AA } AA "language": "eng" AA "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions", AA "bitrate": 44792, AA "codec": "hdmv_pgs_subtitle", AA "index": 2, AA { AA "subtitle": [ AA ], AA } AA "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions" AA "language": "eng", AA "samplerate": 48000, AA "channels": 6, AA "bitrate": 1536000, AA "codec": "dts", AA "index": 1, AA { AA "audio": [ AA }, AA "field_order": "progressive" AA "level": 4.1, AA "dimensions": "1280x640", AA }, AA ] AA } AA "side_data_type": "H.26[45] User Data Unregistered SEI message" AA { AA "side_data_list": [ AA "pix_fmt": "yuv420p", AA "framedata": { AA "fps": 23.976023976023978, AA "profile": "high", AA "pix_fmt": "yuv420p", AA "bitrate": 1629959, AA "codec": "h264", AA "index": 0, AA "video": { AA "format-fullname": "Matroska / WebM", AA "format": "matroska,webm", AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - { AA 2024-05-13 11:48:23 - resources.mediaprocessor - INFO - Input Data AA 2024-05-13 11:48:20 - resources.mediaprocessor - INFO - Processing M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.mkv. AA 2024-05-13 11:48:20 - resources.readsettings - WARNING - Force-convert is true, so process-same-extensions is being overridden to true as well AA 2024-05-13 11:48:20 - resources.readsettings - INFO - Loading config file C:\Users\admin\AppData\MP4_Automator\config\autoProcess.ini. AA 2024-05-13 11:48:20 - resources.readsettings - INFO - C:\Python39\python.exe 2024-05-13 11:48:19 INFO :: POSTPROCESSOR-MANUAL :: Executing command: ['C:\\Python39\\python.exe', 'C:\\Users\\Admin\\AppData\\MP4_Automator\\postSickbeard.py', 'M:\\Media\\TV Shows\\For All Mankind\\Season 2\\For All Mankind - S2 E9 - Triage.mkv', 'M:\\Downloads\\Downloaded\\SickBeard\\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA\\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA.mkv', '356202', '2', '9', '2021-04-16'] 2024-05-13 11:48:19 INFO :: POSTPROCESSOR-MANUAL :: 356202: Changed modify date of 'For All Mankind - S2 E9 - Triage.mkv' to show air date Apr 16,2021 (00:00) 2024-05-13 11:48:12 INFO :: POSTPROCESSOR-MANUAL :: Using release for release name. 2024-05-13 11:48:12 INFO :: POSTPROCESSOR-MANUAL :: Process method is 'move' and src and destination are on the same device, skipping free space check 2024-05-13 11:48:11 INFO :: POSTPROCESSOR-MANUAL :: This download is marked a priority download so I'm going to replace an existing file if I find one 2024-05-13 11:48:11 INFO :: POSTPROCESSOR-MANUAL :: Processing M:\Downloads\Downloaded\SickBeard\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA.mkv (for.all.mankind.s02e09.720p.bluray.x264-tabularia) 2024-05-13 11:47:58 INFO :: POSTPROCESSOR-MANUAL :: Processing M:\Downloads\Downloaded\SickBeard\For.All.Mankind.S02E09.720p.BluRay.x264-TABULARiA

FFMpeg headers

ffmpeg version 2024-05-08-git-e8e84dc325-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59. 17.100 / 59. 17.100
  libavcodec     61.  5.103 / 61.  5.103
  libavformat    61.  3.103 / 61.  3.103
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.101 / 10.  2.101
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
Universal media converter

System Information

Expected behavior

Additional context Im just having a best guess that it's related to subtitles. these are automatically downloaded and seems unpreventable unless we completely disable subtitles. this only happens with some files, not all of them.

Issues posted without any logs or autoProcess settings will be closed

mdhiggins commented 4 months ago

Any chance you can post the sma.log data in a more readable format? Parsing through this is miserable

Particularly include whatever ffmpeg error you get

Most of the time if you adjust your subtitle options and or encoding options you can eliminate these issues; cleanit can also be useful

herbi3 commented 4 months ago

thanks @mdhiggins - I do have cleanit enabled too

hopefully this looks better.


2024-05-13 11:48:24 - resources.mediaprocessor - ERROR - M:\Media\TV Shows\For All Mankind\Season 2\For All Mankind - S2 E9 - Triage.tmp deleted.
2024-05-13 12:42:43 - SickbeardPostProcess - INFO - Sickbeard extra script post processing started.
2024-05-13 12:42:43 - resources.readsettings - INFO - C:\Python39\python.exe
2024-05-13 12:42:43 - resources.readsettings - INFO - Loading config file C:\Users\admin\AppData\MP4_Automator\config\autoProcess.ini.
2024-05-13 12:42:43 - resources.readsettings - WARNING - Force-convert is true, so process-same-extensions is being overridden to true as well
2024-05-13 12:42:43 - resources.mediaprocessor - INFO - Processing M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.mkv.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Input Data
2024-05-13 12:42:47 - 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"
        },
        "dimensions": "1280x720",
        "level": 3.1,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "aac",
            "channels": 2,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Reading video stream.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Video codec detected: h264.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Profile: high.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Acceptable profile match found for VBR 1665.4773 using CRF 23, maxrate 4m, bufsize 8m.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Video codec parameters None.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Creating hevc_nvenc video stream from source stream 0.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Reading audio streams.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Audio detected for stream 1 - aac eng 2 channel.
2024-05-13 12:42:47 - resources.mediaprocessor - WARNING - Unable to determine audio bitrate from source stream 1, defaulting to 128 per channel.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Creating opus audio stream from source stream 1.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Final sorting:
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - ['0->0']
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Final sorting:
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - ['0->0']
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Default audio stream set to eng opus 2 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Reading subtitle streams.
2024-05-13 12:42:47 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 1 results in your approved languages.
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream by importing Text-based subtitle Resident Alien - S2 E6 - An Alien in New York.srt [embed-subs].
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Final sorting:
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - ['0->0']
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - h264_cuvid decoder is supported by this ffmpeg build and will also be used [hwaccel-decoders].
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Output Data
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - {
    "source": [
        "M:\\Media\\TV Shows\\Resident Alien\\Season 2\\Resident Alien - S2 E6 - An Alien in New York.mkv",
        "M:\\Media\\TV Shows\\Resident Alien\\Season 2\\Resident Alien - S2 E6 - An Alien in New York.srt"
    ],
    "format": "mp4",
    "video": {
        "codec": "hevc_nvenc",
        "map": 0,
        "bitrate": 999.28638,
        "crf": 23,
        "maxrate": "4m",
        "bufsize": "8m",
        "level": 4.1,
        "profile": null,
        "preset": "fast",
        "pix_fmt": null,
        "field_order": "progressive",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": {
            "pix_fmt": "yuv420p"
        },
        "bsf": null,
        "debug": "video",
        "title": "HD"
    },
    "audio": [
        {
            "map": 1,
            "codec": "opus",
            "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"
        }
    ],
    "subtitle": [
        {
            "source": 1,
            "map": 0,
            "codec": "mov_text",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions",
            "language": "eng",
            "debug": "subtitle.embed-subs",
            "title": null
        }
    ],
    "attachment": []
}
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Preopts
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - [
    "-fix_sub_duration",
    "-hwaccel",
    "cuda",
    "-vcodec",
    "h264_cuvid"
]
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Postopts
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - Starting conversion.
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - FFmpeg command:
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - ======================
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel cuda -vcodec h264_cuvid -i "M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.mkv" -i "M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.srt" -map_metadata -1 -vcodec hevc_nvenc -map 0:0 -field_order progressive -metadata:s:v title=HD -metadata:s:v handler_name=HD -preset fast -level 4.1 -tag:v hvc1 -qp 23 -maxrate:v 4m -bufsize 8m -c:a:0 libopus -map 0:1 -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=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 1:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=eng -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y "M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.tmp"
2024-05-13 12:42:48 - resources.mediaprocessor - INFO - ======================
2024-05-13 12:42:48 - resources.mediaprocessor - ERROR - Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\MP4_Automator\resources\mediaprocessor.py", line 2317, in convert
    for timecode, debug in conv:
  File "C:\Users\Admin\AppData\MP4_Automator\converter\__init__.py", line 329, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "C:\Users\Admin\AppData\MP4_Automator\converter\ffmpeg.py", line 798, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
2024-05-13 12:42:48 - resources.mediaprocessor - ERROR - C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel cuda -vcodec h264_cuvid -i M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.mkv -i M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.srt -map_metadata -1 -vcodec hevc_nvenc -map 0:0 -field_order progressive -metadata:s:v title=HD -metadata:s:v handler_name=HD -preset fast -level 4.1 -tag:v hvc1 -qp 23 -maxrate:v 4m -bufsize 8m -c:a:0 libopus -map 0:1 -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=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 1:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=eng -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.tmp
2024-05-13 12:42:48 - resources.mediaprocessor - ERROR - ffmpeg version 2024-05-08-git-e8e84dc325-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers

  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)

  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint

  libavutil      59. 17.100 / 59. 17.100

  libavcodec     61.  5.103 / 61.  5.103

  libavformat    61.  3.103 / 61.  3.103

  libavdevice    61.  2.100 / 61.  2.100

  libavfilter    10.  2.101 / 10.  2.101

  libswscale      8.  2.100 /  8.  2.100

  libswresample   5.  2.100 /  5.  2.100

  libpostproc    58.  2.100 / 58.  2.100

Input #0, matroska,webm, from 'M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.mkv':

  Metadata:

    encoder         : libebml v1.4.2 + libmatroska v1.6.4

  Duration: 00:44:19.16, start: 0.000000, bitrate: 1881 kb/s

  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)

  Stream #0:1(eng): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)

Input #1, srt, from 'M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.srt':

  Duration: N/A, bitrate: N/A

  Stream #1:0: Subtitle: subrip (srt)

Stream mapping:

  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> hevc (hevc_nvenc))

  Stream #0:1 -> #0:1 (aac (native) -> opus (libopus))

  Stream #1:0 -> #0:2 (subrip (srt) -> mov_text (native))

Press [q] to stop, [?] for help

Output #0, mp4, to 'M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.tmp':

  Metadata:

    encoding_tool   : SMA

    encoder         : Lavf61.3.103

  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), nv12(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 23.98 fps, 24k tbn (default)

      Metadata:

        title           : HD

        handler_name    : HD

        encoder         : Lavc61.5.103 hevc_nvenc

      Side data:

        cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A

  Stream #0:1(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, flt, 256 kb/s (default)

      Metadata:

        BPS             : 256000

        BPS-eng         : 256000

        title           : Stereo

        handler_name    : Stereo

        encoder         : Lavc61.5.103 libopus

  Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874)

      Metadata:

        encoder         : Lavc61.5.103 mov_text

[mp4 @ 0000028bd57571c0] Application provided duration: 14400002000 is invalid

[vost#0:0/hevc_nvenc @ 0000028bd5bf00c0] Error submitting a packet to the muxer: Invalid argument

    Last message repeated 1 times

[out#0/mp4 @ 0000028bd5d3e700] Error muxing a packet

[out#0/mp4 @ 0000028bd5d3e700] Task finished with error code: -22 (Invalid argument)

[out#0/mp4 @ 0000028bd5d3e700] Terminating thread with return code -22 (Invalid argument)

[out#0/mp4 @ 0000028bd5d3e700] video:8KiB audio:41KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 4.715447%

frame=    2 fps=0.0 q=22.0 Lsize=      52KiB time=00:00:00.08 bitrate=5064.5kbits/s speed=0.381x    

Conversion failed!

2024-05-13 12:42:48 - resources.mediaprocessor - ERROR - M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.tmp deleted.
mdhiggins commented 4 months ago

Hm, "Error muxing a packet" doesn't quite sound like a subtitle error suspect this has to do with the hardware acceleration; its definitely not an ffmpeg error I've ever seen before

If you eliminate the subtitle does that change the outcome of the file? And does this fail every time for the same file or is it intermittently failing?

herbi3 commented 4 months ago

thanks for the response. it fails only for some files. ive generally noticed thisApplication provided duration: 14400002000 is invalid is common for the files that don't get converted. which in milliseconds, seems to be 166 days.

if I remove the .srt subtitle file, it will process this as per normal

mdhiggins commented 4 months ago

That information is helpful, and I have a theory!

Wondering if a -fix_sub_duration parameter is needed before each input not just the first one, assuming your paths are the same, try this command and see if it errors

C:\Users\Admin\AppData\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel cuda -vcodec h264_cuvid -i M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.mkv  -fix_sub_duration -i M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.srt -map_metadata -1 -vcodec hevc_nvenc -map 0:0 -field_order progressive -metadata:s:v title=HD -metadata:s:v handler_name=HD -preset fast -level 4.1 -tag:v hvc1 -qp 23 -maxrate:v 4m -bufsize 8m -c:a:0 libopus -map 0:1 -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=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 1:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=eng -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y M:\Media\TV Shows\Resident Alien\Season 2\Resident Alien - S2 E6 - An Alien in New York.tmp

If that fixes it I have a change queued up

herbi3 commented 4 months ago

That seems to have done it!

image

mdhiggins commented 4 months ago

e6b168791235771f8aa1849863ac01a6bdbc1f5c

Alright there's the update that should automate this, feel free to close it out if that fixes your issue

herbi3 commented 4 months ago

@mdhiggins great stuff! tested now without issues, thank you!