mdhiggins / sickbeard_mp4_automator

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

Help Needed: Video Stream is copied every time regardless of source bitrate #1600

Closed JNR8 closed 2 years ago

JNR8 commented 2 years ago

Describe the bug When attempting to convert an HDR h265 movie the video stream is always copied, never converted.
(See Additional context for more details)

Command or context you are trying to run running this manually using: sickbeard_mp4_automator\manual.py -a -c 'C:\users\username\sickbeard_mp4_automator\config\autoProcess4k.ini' -i 'C:\Users\username\Videos\convert\movies\MovieName (Year)' -fc

autoProcess.ini settings

[Converter]
ffmpeg = C:\ffmpeg\bin\ffmpeg.exe
ffprobe = C:\ffmpeg\bin\ffprobe.exe
threads = 0
hwaccels = dxva2, cuvid, qsv, d3d11va
hwaccel-decoders = hevc_cuvid, hevc, hevc_nvenc, h265, x265, h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, hevc_qsv, h264_qsv, hevc_vaapi, h264_vaapi
hwdevices = vaapi:/dev/dri/renderD128
hwaccel-output-format = vaapi:vaapi
output-directory = 
output-format = mp4
output-extension = mp4
temp-extension = converting
temp-output = False
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to = 
move-to = 
delete-original = False
process-same-extensions = True
bypass-if-copying-all = False
force-convert = False
post-process = False
wait-post-process = False
detailed-progress = True
opts-separator = ,
preopts = 
postopts = -movflags,+faststart,-max_muxing_queue_size, 9999
regex-directory-replace = [^\w\-_\. ]

[Permissions]
chmod = 0777
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 = h265, x265, hevc
max-bitrate = 0
bitrate-ratio = 
crf = -1
crf-profiles = 1000:29:12M:40M
preset = medium
codec-parameters = 
dynamic-parameters = True
max-width = 3840
profile = main10, main 10
max-level = 5.0
pix-fmt = yuv420p10le
prioritize-source-pix-fmt = True
filter = 
force-filter = False

[HDR]
codec = h265
pix-fmt = yuv420p10le
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset = medium
codec-parameters = 
filter = 
force-filter = False
profile = main10, main 10

[Audio]
codec = ac3, eac3
languages = eng
default-language = eng
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 0
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 = eng
default-language = eng
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 = True
download-hearing-impaired-subs = False
providers = 

[Subtitle.Subliminal.Auth]
opensubtitles = 
tvsubtitles = 

Log files

2022-07-24 14:03:01 - MANUAL - INFO - Manual processor started.
2022-07-24 14:03:01 - MANUAL - INFO - Python 64-bit 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)].
2022-07-24 14:03:01 - MANUAL - INFO - Guessit version: 3.3.1.
2022-07-24 14:03:01 - MANUAL - INFO - c:\users\username\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
2022-07-24 14:03:01 - MANUAL - INFO - Loading config file c:\users\username\sickbeard_mp4_automator\config\autoProcess4k.ini.
2022-07-24 14:03:01 - MANUAL - INFO - Force conversion of files enabled. As a result conversion of mp4 files is also enabled
2022-07-24 14:03:01 - MANUAL - INFO - Processing file c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4
2022-07-24 14:03:02 - MANUAL - INFO - Matched movie title as: Doctor Strange in the Multiverse of Madness 2022-05-04 (TMDB ID: 453395)
2022-07-24 14:03:02 - MANUAL - INFO - Processing Doctor Strange in the Multiverse of Madness
2022-07-24 14:03:02 - MANUAL - INFO - Input Data
2022-07-24 14:03:02 - MANUAL - INFO - {
    "format": "mov,mp4,m4a,3gp,3g2,mj2",
    "format-fullname": "QuickTime / MOV",
    "video": {
        "index": 0,
        "codec": "hevc",
        "bitrate": 24111380,
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": "35400/50000",
                    "red_y": "14600/50000",
                    "green_x": "8500/50000",
                    "green_y": "39850/50000",
                    "blue_x": "6550/50000",
                    "blue_y": "2300/50000",
                    "white_point_x": "15635/50000",
                    "white_point_y": "16450/50000",
                    "min_luminance": "50/10000",
                    "max_luminance": "10000000/10000"
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ]
        },
        "dimensions": "3840x1608",
        "level": 5.0,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "ac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2022-07-24 14:03:02 - MANUAL - INFO - Reading video stream.
2022-07-24 14:03:02 - MANUAL - INFO - Video codec detected: hevc.
2022-07-24 14:03:02 - MANUAL - INFO - Pix Fmt: yuv420p10le.
2022-07-24 14:03:02 - MANUAL - INFO - Profile: main10.
2022-07-24 14:03:02 - MANUAL - INFO - HDR video stream detected for 0.
2022-07-24 14:03:02 - MANUAL - INFO - Acceptable profile match found for VBR 22936.8019 using CRF 29, maxrate 12m, bufsize 40m.
2022-07-24 14:03:02 - MANUAL - INFO - Video codec parameters None.
2022-07-24 14:03:02 - MANUAL - INFO - Creating copy video stream from source stream 0.
2022-07-24 14:03:02 - MANUAL - INFO - Reading audio streams.
2022-07-24 14:03:02 - MANUAL - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-07-24 14:03:02 - MANUAL - INFO - Audio detected for stream 1 - ac3 eng 6 channel.
2022-07-24 14:03:02 - MANUAL - INFO - Creating copy audio stream from source stream 1.
2022-07-24 14:03:02 - MANUAL - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-07-24 14:03:02 - MANUAL - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-07-24 14:03:02 - MANUAL - INFO - Final sorting:
2022-07-24 14:03:02 - MANUAL - INFO - ['0->0', '1->1']
2022-07-24 14:03:02 - MANUAL - INFO - Final sorting:
2022-07-24 14:03:02 - MANUAL - INFO - ['0->0', '1->1']
2022-07-24 14:03:02 - MANUAL - INFO - Default audio stream set to eng copy 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-07-24 14:03:02 - MANUAL - INFO - Reading subtitle streams.
2022-07-24 14:03:02 - MANUAL - INFO - Attempting to download subtitles.
2022-07-24 14:03:17 - MANUAL - INFO - Downloaded new subtitle c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt.
2022-07-24 14:03:17 - MANUAL - INFO - Scanned for external subtitles and found 1 results in your approved languages.
2022-07-24 14:03:17 - MANUAL - INFO - Creating mov_text subtitle stream by importing Text-based subtitle MovieName (year).4K.en.srt [embed-subs].
2022-07-24 14:03:17 - MANUAL - INFO - Final sorting:
2022-07-24 14:03:17 - MANUAL - INFO - ['0->0']
2022-07-24 14:03:17 - MANUAL - INFO - Tagging copied video stream as hvc1
2022-07-24 14:03:17 - MANUAL - INFO - Output Data
2022-07-24 14:03:17 - MANUAL - INFO - {
    "source": [
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.mp4",
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
    ],
    "format": "mp4",
    "video": {
        "codec": "copy",
        "map": 0,
        "bitrate": 22936.8019,
        "crf": 29,
        "maxrate": "12m",
        "bufsize": "40m",
        "level": 5.0,
        "profile": "main10",
        "preset": "medium",
        "pix_fmt": "yuv420p10le",
        "field_order": "unknown",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": 35400.0,
                    "red_y": 14600.0,
                    "green_x": 8500.0,
                    "green_y": 39850.0,
                    "blue_x": 6550.0,
                    "blue_y": 2300.0,
                    "white_point_x": 15635.0,
                    "white_point_y": 16450.0,
                    "min_luminance": 50.0,
                    "max_luminance": 10000000.0
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ],
            "hdr": true,
            "repeat-headers": true
        },
        "bsf": null,
        "debug": "video.hdr",
        "title": "4K HDR"
    },
    "audio": [
        {
            "map": 1,
            "codec": "copy",
            "channels": 6,
            "bitrate": 640.0,
            "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": [
        {
            "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": []
}
2022-07-24 14:03:17 - MANUAL - INFO - Preopts
2022-07-24 14:03:17 - MANUAL - INFO - [
    "-fix_sub_duration"
]
2022-07-24 14:03:17 - MANUAL - INFO - Postopts
2022-07-24 14:03:17 - MANUAL - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-movflags",
    "+faststart",
    "-max_muxing_queue_size",
    "9999",
    "-tag:v",
    "hvc1"
]
2022-07-24 14:03:17 - MANUAL - INFO - Downloaded Subtitles
2022-07-24 14:03:17 - MANUAL - INFO - [
    "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
]
2022-07-24 14:03:17 - MANUAL - INFO - Starting conversion.
2022-07-24 14:03:17 - MANUAL - INFO - FFmpeg command:
2022-07-24 14:03:17 - MANUAL - INFO - ======================
2022-07-24 14:03:17 - MANUAL - INFO - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original" -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt" -map_metadata -1 -vcodec copy -map 0:0 -metadata:s:v "title=4K HDR" -metadata:s:v "handler_name=4K HDR" -c:a:0 copy -map 0:1 -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 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 -movflags +faststart -max_muxing_queue_size 9999 -tag:v hvc1 -y "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting"
2022-07-24 14:03:17 - MANUAL - INFO - ======================

FFMpeg headers

ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, 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-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --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-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      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

System Information

Expected behavior to conver the source video and reduce file size.

Additional context I use a CRF profile "1000:22:12M:40M". I can change any of "source_birtare:CRF,max_bitrate:buffsize" value to be any value (higher or lower) and it will not make a difference. The Video Stream is always copied.

For example I changed the source_vitrate to be 1000 (really low), the CRF to be 29 (stupidly low), the maxbitrate to be lower than the source bitrate but still the video stream is copied, even when enabling the force conversion flag.

In the output/logs I always see this: "Acceptable profile match found for VBR 22936.8019 using CRF 29, maxrate 12m, bufsize 40m."

I interpret this as the as script accepting that the identified VBR of 22936.8019 matches the max_bitrate or source_bitrate values of the CRF profile when it shouldn't (correct me if I am wrong in my interpretation)

FYI: I pulled the version of your script as of todays date (24th July 2022), I also updated from ffmpeg 4.4.1 to 5.0 and reran my tests with the same results.

I also removed the CRF profile and set the following video options : ranged from "max-bitrate = 12000" to "max-bitrate = 5000" and crf = 22 ranged from "crf = 22" to "crf = 29"

no change in results for any value.

It seems to me that the script is analyzing the video file but ignoring any quality setting it would normally use to convert the video stream and just copying the stream instead.

mdhiggins commented 2 years ago

You just need to set include a max-bitrate option which doesn't look like its specified here

The script tries very hard not to convert unless some condition is violated

Force conversion applies to the file container not the individual video stream specifically, so you still need a violation to trigger conversion

In the example you posted there is no max-bitrate set

The CRF setting and CRF profiles are just CRF values and conditional combinations but will not ever cause a copy violation, they are simply applied if remuxing is not possible for some other violation; since CRF settings are one way and cannot be read back from source files you cannot use them to trigger conversions

Please post logs with max-bitrate set if you are still seeing copying (and ensure you include debug level logging turned on) as this would be a bug but it's not one I can reproduce, in my quick testing just now max-bitrate setting is working fine

https://github.com/mdhiggins/sickbeard_mp4_automator/wiki/Debug-Level-Logging

JNR8 commented 2 years ago

Thanks for your quick response.

I did as you siuggested, adding "max-bitrate = 18000" to the autoprocess settings. This confused me somewhat though as interpreted the comment in Video/crfprofiles section of the Wiki to override this setting. This section of the wiki states These profiles override the simple singlevideo-crfandvideo-bitratesetting . I interepted this to mean that the max-bitrate setting would be overridden by crf-profiles maxrate value. But I do admit that I thought that thevideo-bitrate setting was renamed to max-bitrate and so saw them as the same thing. I no longer see a video-bitrate setting in the wiki though (unless I just missed it).

Anyway, adding "max-bitrate = 18000" to the autoProcess.ini did infact resolve the issue I posted about and it attempted to convert the video stream, but ultimately failed becuase FFMPEG spat out an issue with the audio stream. I am not that good at reading the output to determine ht exact issue, but it seems to think that no audio stream is present even though there definitely is one. Any suggesttions?

New Log output:

2022-07-24 14:03:17 - MANUAL - INFO - ======================
2022-07-25 12:29:12 - MANUAL - INFO - Manual processor started.
2022-07-25 12:29:12 - MANUAL - INFO - Python 64-bit 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)].
2022-07-25 12:29:12 - MANUAL - INFO - Guessit version: 3.3.1.
2022-07-25 12:29:12 - MANUAL - INFO - c:\users\username\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
2022-07-25 12:29:12 - MANUAL - INFO - Loading config file c:\users\username\sickbeard_mp4_automator\config\autoProcess4k.ini.
2022-07-25 12:29:12 - MANUAL - INFO - Force conversion of files enabled. As a result conversion of mp4 files is also enabled
2022-07-25 12:29:12 - MANUAL - DEBUG - Invalid source, no video stream detected.
2022-07-25 12:29:13 - MANUAL - INFO - Processing file c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4
2022-07-25 12:29:13 - MANUAL - DEBUG - Guessed filename resulted in TMDB ID TMDBIDNO
2022-07-25 12:29:13 - MANUAL - DEBUG - Input IDs:
2022-07-25 12:29:13 - MANUAL - DEBUG - TMDBID: TMDBIDNO
2022-07-25 12:29:13 - MANUAL - DEBUG - IMDBID: None
2022-07-25 12:29:13 - MANUAL - DEBUG - TVDBID: None
2022-07-25 12:29:13 - MANUAL - DEBUG - Using TMDB ID: TMDBIDNO
2022-07-25 12:29:13 - MANUAL - DEBUG - Tagging language determined to be eng.
2022-07-25 12:29:14 - MANUAL - INFO - Matched movie title as: MovieName 2022-05-04 (TMDB ID: TMDBIDNO)
2022-07-25 12:29:14 - MANUAL - INFO - Processing MovieName
2022-07-25 12:29:14 - MANUAL - DEBUG - Process started.
2022-07-25 12:29:14 - MANUAL - INFO - Input Data
2022-07-25 12:29:14 - MANUAL - INFO - {
    "format": "mov,mp4,m4a,3gp,3g2,mj2",
    "format-fullname": "QuickTime / MOV",
    "video": {
        "index": 0,
        "codec": "hevc",
        "bitrate": 24111380,
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": "35400/50000",
                    "red_y": "14600/50000",
                    "green_x": "8500/50000",
                    "green_y": "39850/50000",
                    "blue_x": "6550/50000",
                    "blue_y": "2300/50000",
                    "white_point_x": "15635/50000",
                    "white_point_y": "16450/50000",
                    "min_luminance": "50/10000",
                    "max_luminance": "10000000/10000"
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ]
        },
        "dimensions": "3840x1608",
        "level": 5.0,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "ac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2022-07-25 12:29:14 - MANUAL - INFO - Reading video stream.
2022-07-25 12:29:14 - MANUAL - INFO - Video codec detected: hevc.
2022-07-25 12:29:14 - MANUAL - INFO - Pix Fmt: yuv420p10le.
2022-07-25 12:29:14 - MANUAL - INFO - Profile: main10.
2022-07-25 12:29:14 - MANUAL - INFO - HDR video stream detected for 0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Codec pool is missing the FFPROBE value of the primary conversion codec h265 which will prevent remuxing, adding hevc to the list.
2022-07-25 12:29:14 - MANUAL - DEBUG - Pool of video codecs is ['h265', 'hevc'].
2022-07-25 12:29:14 - MANUAL - DEBUG - Total bitrate is 24784002.0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Total audio bitrate is 640000.
2022-07-25 12:29:14 - MANUAL - DEBUG - Estimated video bitrate is 24144002.0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Using video bitrate ratio of 1.000000, which results in 22936.801900 changing to 22936.801900.
2022-07-25 12:29:14 - MANUAL - DEBUG - Overriding video bitrate. Codec cannot be copied because video bitrate is too high [video-max-bitrate].
2022-07-25 12:29:14 - MANUAL - DEBUG - VCRF profiles detected [video-crf-profiles].
2022-07-25 12:29:14 - MANUAL - INFO - Acceptable profile match found for VBR 22936.8019 using CRF 29, maxrate 12m, bufsize 40m.
2022-07-25 12:29:14 - MANUAL - DEBUG - Source bit-depth 10, output 10, using depth 10.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video codec: h265.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video bitrate: 18000.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video CRF: 29.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video maxrate: 12m.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video bufsize: 40m.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video level: 5.0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video profile: main10.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video preset: medium.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video pix_fmt: yuv420p10le.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video field order: unknown.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video width: None.
2022-07-25 12:29:14 - MANUAL - DEBUG - Video debug video.hdr.max-bitrate.
2022-07-25 12:29:14 - MANUAL - INFO - Video codec parameters None.
2022-07-25 12:29:14 - MANUAL - INFO - Creating h265 video stream from source stream 0.
2022-07-25 12:29:14 - MANUAL - INFO - Reading audio streams.
2022-07-25 12:29:14 - MANUAL - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-07-25 12:29:14 - MANUAL - DEBUG - Pool universal audio codecs is ['aac'].
2022-07-25 12:29:14 - MANUAL - DEBUG - Pool of audio codecs is ['ac3', 'eac3'].
2022-07-25 12:29:14 - MANUAL - INFO - Audio detected for stream 1 - ac3 eng 6 channel.
2022-07-25 12:29:14 - MANUAL - DEBUG - Found an audio filter for converting from 6 channels to 2 channels. Applying 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 to UA.
2022-07-25 12:29:14 - MANUAL - DEBUG - Audio codec: aac.
2022-07-25 12:29:14 - MANUAL - DEBUG - Channels: 2.
2022-07-25 12:29:14 - MANUAL - DEBUG - 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.
2022-07-25 12:29:14 - MANUAL - DEBUG - Bitrate: 256.
2022-07-25 12:29:14 - MANUAL - DEBUG - VBR: 0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Profile: None.
2022-07-25 12:29:14 - MANUAL - DEBUG - Language: eng.
2022-07-25 12:29:14 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-25 12:29:14 - MANUAL - DEBUG - Attempting to set bitrate based on source stream bitrate.
2022-07-25 12:29:14 - MANUAL - DEBUG - Audio codec: copy.
2022-07-25 12:29:14 - MANUAL - DEBUG - Channels: 6.
2022-07-25 12:29:14 - MANUAL - DEBUG - Bitrate: 640.0.
2022-07-25 12:29:14 - MANUAL - DEBUG - VBR: 0.
2022-07-25 12:29:14 - MANUAL - DEBUG - Audio Profile: None.
2022-07-25 12:29:14 - MANUAL - DEBUG - Language: eng.
2022-07-25 12:29:14 - MANUAL - DEBUG - Filter: None.
2022-07-25 12:29:14 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-25 12:29:14 - MANUAL - DEBUG - Debug: audio.
2022-07-25 12:29:14 - MANUAL - INFO - Creating copy audio stream from source stream 1.
2022-07-25 12:29:14 - MANUAL - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-07-25 12:29:14 - MANUAL - DEBUG - Purging the following streams:
2022-07-25 12:29:14 - MANUAL - DEBUG - []
2022-07-25 12:29:14 - MANUAL - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-07-25 12:29:14 - MANUAL - DEBUG - Triggering audio track sort [audio.sorting-sorting].
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorting streams with keys ['language', 'channels.d', 'map', 'd.comment'].
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted ascending with language:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted descending with channels:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted ascending with map:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - INFO - Final sorting:
2022-07-25 12:29:14 - MANUAL - INFO - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorting streams with keys ['channels.d', 'map', 'd.comment'].
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted descending with channels:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted ascending with map:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-07-25 12:29:14 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - INFO - Final sorting:
2022-07-25 12:29:14 - MANUAL - INFO - ['0->0', '1->1']
2022-07-25 12:29:14 - MANUAL - DEBUG - Sorting audio streams for default audio stream designation.
2022-07-25 12:29:14 - MANUAL - DEBUG - 2 total audio streams with 2 set to default disposition. 2 defaults in your preferred language (eng), 0 in other languages.
2022-07-25 12:29:14 - MANUAL - DEBUG - 1 streams in preferred language cleared of default disposition flag from preferred language.
2022-07-25 12:29:14 - MANUAL - INFO - Default audio stream set to eng copy 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-07-25 12:29:14 - MANUAL - INFO - Reading subtitle streams.
2022-07-25 12:29:14 - MANUAL - INFO - Attempting to download subtitles.
2022-07-25 12:29:14 - MANUAL - DEBUG - Refining subliminal search using included metadata
2022-07-25 12:29:27 - MANUAL - INFO - Downloaded new subtitle c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt.
2022-07-25 12:29:27 - MANUAL - DEBUG - Potential subtitle candidate identified MovieName (year).4K.en.srt.
2022-07-25 12:29:27 - MANUAL - DEBUG - Processing subtitle file suffix en.
2022-07-25 12:29:27 - MANUAL - DEBUG - Found language match eng.
2022-07-25 12:29:27 - MANUAL - DEBUG - Valid external eng subtitle file detected MovieName (year).4K.en.srt.
2022-07-25 12:29:27 - MANUAL - INFO - Scanned for external subtitles and found 1 results in your approved languages.
2022-07-25 12:29:28 - MANUAL - DEBUG - isImageBasedSubtitle FFmpeg command:
2022-07-25 12:29:28 - MANUAL - DEBUG - C:\ffmpeg\bin\ffmpeg.exe -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt" -c:s:0 srt -map 0:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=und -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f srt -t 00:00:01 -f null -
2022-07-25 12:29:28 - MANUAL - INFO - Creating mov_text subtitle stream by importing Text-based subtitle MovieName (year).4K.en.srt [embed-subs].
2022-07-25 12:29:28 - MANUAL - DEBUG - Path: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt.
2022-07-25 12:29:28 - MANUAL - DEBUG - Codec: mov_text.
2022-07-25 12:29:28 - MANUAL - DEBUG - Langauge: eng.
2022-07-25 12:29:28 - MANUAL - DEBUG - Disposition: -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-25 12:29:28 - MANUAL - DEBUG - Sorting streams with keys ['language', 'd.comment', 'd.default.d', 'd.forced.d'].
2022-07-25 12:29:28 - MANUAL - INFO - Final sorting:
2022-07-25 12:29:28 - MANUAL - INFO - ['0->0']
2022-07-25 12:29:28 - MANUAL - DEBUG - Subtitle streams detected, adding fix_sub_duration option to preopts.
2022-07-25 12:29:28 - MANUAL - DEBUG - Selected hwaccel options:
2022-07-25 12:29:28 - MANUAL - DEBUG - ['dxva2', 'cuvid', 'qsv', 'd3d11va']
2022-07-25 12:29:28 - MANUAL - DEBUG - Selected hwaccel decoder pairs:
2022-07-25 12:29:28 - MANUAL - DEBUG - ['hevc_cuvid', 'hevc', 'hevc_nvenc', 'h265', 'x265', 'h264_cuvid', 'mjpeg_cuvid', 'mpeg1_cuvid', 'mpeg2_cuvid', 'mpeg4_cuvid', 'vc1_cuvid', 'hevc_qsv', 'h264_qsv', 'hevc_vaapi', 'h264_vaapi']
2022-07-25 12:29:28 - MANUAL - DEBUG - FFMPEG hwaccels:
2022-07-25 12:29:28 - MANUAL - DEBUG - ['cuda', 'dxva2', 'qsv', 'd3d11va', 'opencl', 'vulkan']
2022-07-25 12:29:28 - MANUAL - DEBUG - Input format yuv420p10le bit depth 10.
2022-07-25 12:29:28 - MANUAL - INFO - dxva2 hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2022-07-25 12:29:28 - MANUAL - DEBUG - Decoder: hevc_dxva2.
2022-07-25 12:29:28 - MANUAL - INFO - hevc_cuvid decoder is supported by this ffmpeg build and will also be used [hwaccel-decoders].
2022-07-25 12:29:28 - MANUAL - DEBUG - Decoder formats:
2022-07-25 12:29:28 - MANUAL - DEBUG - ['cuda', 'nv12', 'p010le', 'p016le']
2022-07-25 12:29:28 - MANUAL - DEBUG - canBypassConvert returned False.
2022-07-25 12:29:28 - MANUAL - INFO - Output Data
2022-07-25 12:29:28 - MANUAL - INFO - {
    "source": [
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.mp4",
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
    ],
    "format": "mp4",
    "video": {
        "codec": "h265",
        "map": 0,
        "bitrate": 18000,
        "crf": 29,
        "maxrate": "12m",
        "bufsize": "40m",
        "level": 5.0,
        "profile": "main10",
        "preset": "medium",
        "pix_fmt": "yuv420p10le",
        "field_order": "unknown",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": 35400.0,
                    "red_y": 14600.0,
                    "green_x": 8500.0,
                    "green_y": 39850.0,
                    "blue_x": 6550.0,
                    "blue_y": 2300.0,
                    "white_point_x": 15635.0,
                    "white_point_y": 16450.0,
                    "min_luminance": 50.0,
                    "max_luminance": 10000000.0
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ],
            "hdr": true,
            "repeat-headers": true
        },
        "bsf": null,
        "debug": "video.hdr.max-bitrate",
        "title": "4K HDR"
    },
    "audio": [
        {
            "map": 1,
            "codec": "copy",
            "channels": 6,
            "bitrate": 640.0,
            "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": [
        {
            "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": []
}
2022-07-25 12:29:28 - MANUAL - INFO - Preopts
2022-07-25 12:29:28 - MANUAL - INFO - [
    "-fix_sub_duration",
    "-hwaccel",
    "dxva2",
    "-vcodec",
    "hevc_cuvid"
]
2022-07-25 12:29:28 - MANUAL - INFO - Postopts
2022-07-25 12:29:28 - MANUAL - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-movflags",
    "+faststart",
    "-max_muxing_queue_size",
    "9999"
]
2022-07-25 12:29:28 - MANUAL - INFO - Downloaded Subtitles
2022-07-25 12:29:28 - MANUAL - INFO - [
    "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
]
2022-07-25 12:29:28 - MANUAL - INFO - Starting conversion.
2022-07-25 12:29:28 - MANUAL - DEBUG - Input directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - File name: MovieName (year).4K.
2022-07-25 12:29:28 - MANUAL - DEBUG - Input extension: mp4.
2022-07-25 12:29:28 - MANUAL - DEBUG - Output directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - Output extension: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - Output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting.
2022-07-25 12:29:28 - MANUAL - DEBUG - Input directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - File name: MovieName (year).4K.
2022-07-25 12:29:28 - MANUAL - DEBUG - Input extension: mp4.
2022-07-25 12:29:28 - MANUAL - DEBUG - Output directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - Output extension: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-25 12:29:28 - MANUAL - DEBUG - Output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-25 12:29:28 - MANUAL - DEBUG - Final output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-25 12:29:28 - MANUAL - DEBUG - Inputfile and final outputfile are the same, trying to rename inputfile first.
2022-07-25 12:29:28 - MANUAL - DEBUG - Renamed original file to c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original.
2022-07-25 12:29:28 - MANUAL - INFO - FFmpeg command:
2022-07-25 12:29:28 - MANUAL - INFO - ======================
2022-07-25 12:29:28 - MANUAL - INFO - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -vcodec hevc_cuvid -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original" -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt" -map_metadata -1 -vcodec libx265 -map 0:0 -pix_fmt yuv420p10le -crf 29 -maxrate:v 12m -bufsize 40m -metadata:s:v BPS=18000000 -metadata:s:v BPS-eng=18000000 -metadata:s:v "title=4K HDR" -metadata:s:v "handler_name=4K HDR" -preset medium -profile:v main10 -level 5.0 -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50):max-cll=1478,916 -tag:v hvc1 -c:a:0 copy -map 0:1 -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 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 -movflags +faststart -max_muxing_queue_size 9999 -y "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting"
2022-07-25 12:29:28 - MANUAL - INFO - ======================
2022-07-25 12:29:30 - MANUAL - ERROR - Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "c:\users\username\sickbeard_mp4_automator\resources\mediaprocessor.py", line 2176, in convert
    for timecode, debug in conv:
  File "c:\users\username\sickbeard_mp4_automator\converter\__init__.py", line 329, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "c:\users\username\sickbeard_mp4_automator\converter\ffmpeg.py", line 760, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
2022-07-25 12:29:30 - MANUAL - ERROR - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -vcodec hevc_cuvid -i c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original -i c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt -map_metadata -1 -vcodec libx265 -map 0:0 -pix_fmt yuv420p10le -crf 29 -maxrate:v 12m -bufsize 40m -metadata:s:v BPS=18000000 -metadata:s:v BPS-eng=18000000 -metadata:s:v title=4K HDR -metadata:s:v handler_name=4K HDR -preset medium -profile:v main10 -level 5.0 -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50):max-cll=1478,916 -tag:v hvc1 -c:a:0 copy -map 0:1 -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 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 -movflags +faststart -max_muxing_queue_size 9999 -y c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting
2022-07-25 12:29:30 - MANUAL - ERROR - ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers

  built with gcc 11.2.0 (Rev7, 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-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --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-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      57. 17.100 / 57. 17.100

  libavcodec     59. 18.100 / 59. 18.100

  libavformat    59. 16.100 / 59. 16.100

  libavdevice    59.  4.100 / 59.  4.100

  libavfilter     8. 24.100 /  8. 24.100

  libswscale      6.  4.100 /  6.  4.100

  libswresample   4.  3.100 /  4.  3.100

  libpostproc    56.  3.100 / 56.  3.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d90b5e8180] stream 0, timescale not set

[extract_extradata @ 000001d90b5ba600] Invalid NAL unit 0, skipping.

    Last message repeated 1 times

[hevc @ 000001d90b5f1b40] Invalid NAL unit 0, skipping.

    Last message repeated 1 times

[hevc @ 000001d90b5f1b40] PPS id out of range: 65498

[hevc @ 000001d90b5f1b40] Error parsing NAL unit #0.

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d90b5e8180] Stream #2: not enough frames to estimate rate; consider increasing probesize

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d90b5e8180] Could not find codec parameters for stream 2 (Video: hevc, none): unspecified size

Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original':

  Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2mp41

    title           : MovieName

    genre           : Fantasy

    date            : 2022-05-04

    encoder         : SMA:MovieName (year).4K.mp4

    iTunEXTC        : mpaa|PG-13|300

    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>

                    : <key>cast</key><array>

                    : <dict><key>name</key><string>Benedict Cumberbatch</string></dict>

                    : <dict><key>name</key><string>Elizabeth Olsen</string></dict>

                    : <dict><key>name</key><string>Chiwetel Ejiofor</string></dict>

                    : <dict><key>name</key><string>Benedict Wong</string></dict>

                    : <dict><key>name</key><string>Xochitl Gomez</string></dict>

                    : </array>

                    : <key>screenwriters</key><array>

                    : <dict><key>name</key><string>Stan Lee</string></dict>

                    : <dict><key>name</key><string>Steve Ditko</string></dict>

                    : <dict><key>name</key><string>Michael Waldron</string></dict>

                    : </array>

                    : <key>directors</key><array>

                    : <dict><key>name</key><string>Sam Raimi</string></dict>

                    : <dict><key>name</key><string>Dominic Fysh</string></dict>

                    : </array>

                    : <key>producers</key><array>

                    : <dict><key>name</key><string>Sarah Halley Finn</string></dict>

                    : <dict><key>name</key><string>Kevin Feige</string></dict>

                    : <dict><key>name</key><string>Helen Pollak</string></dict>

                    : <dict><key>name</key><string>Helen Pollak</string></dict>

                    : <dict><key>name</key><string>Scott Derrickson</string></dict>

                    : </array>

                    : </dict></plist>

                    : 

    hd_video        : 3

    media_type      : 9

    description     : Enter a new dimension of Strange.

    synopsis        : Doctor Strange, with the help of mystical allies both old and new, traverses the mind-bending and dangerous alternate realities of the Multiverse to confront a mysterious new adversary.

  Duration: 02:06:31.25, start: 0.000000, bitrate: 24784 kb/s

  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608 [SAR 1:1 DAR 160:67], 24111 kb/s, 23.98 fps, 23.98 tbr, 16k tbn (default)

    Metadata:

      handler_name    : 4K HDR

      vendor_id       : [0][0][0][0]

  Stream #0:1[0x2](eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)

    Metadata:

      handler_name    : 5.1 Channel

      vendor_id       : [0][0][0][0]

    Side data:

      audio service type: main

  Stream #0:2[0x0]: Video: hevc, none, 90k tbr, 90k tbn (attached pic)

Input #1, srt, from 'c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt':

  Duration: N/A, bitrate: N/A

  Stream #1:0: Subtitle: subrip

2022-07-25 12:29:30 - MANUAL - ERROR - c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting deleted.
2022-07-25 12:29:30 - MANUAL - DEBUG - Error converting, no outputfile generated for inputfile c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-25 12:29:30 - MANUAL - ERROR - There was an error processing file c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4, no output data received
2022-07-25 12:29:30 - MANUAL - DEBUG - Invalid source, no audio stream detected.
mdhiggins commented 2 years ago

Looks like you need to allocate more resources to ffmpeg

Add these options to autoProcess.ini under the converter section / postops

[Converter]
postopts= -probesize, 50M, -analyzeduration, 100M, -max_muxing_queue_size, 9999
mdhiggins commented 2 years ago

This also may be a hardware acceleration problem, try turning that off for now

[Converter]
hwaccels = 
hwaccel-decoders = 
hwdevices = 
JNR8 commented 2 years ago

I had tried larger probesize and analyzeduration values previosuly, but had not attempted to remove the hwaccelleration config. I tried both just now but neither made any difference.

New Log fie:

2022-07-26 12:00:11 - MANUAL - INFO - Manual processor started.
2022-07-26 12:00:11 - MANUAL - INFO - Python 64-bit 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)].
2022-07-26 12:00:11 - MANUAL - INFO - Guessit version: 3.3.1.
2022-07-26 12:00:11 - MANUAL - INFO - c:\users\username\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
2022-07-26 12:00:11 - MANUAL - INFO - Loading config file c:\users\username\sickbeard_mp4_automator\config\autoProcess4k.ini.
2022-07-26 12:00:11 - MANUAL - INFO - Force conversion of files enabled. As a result conversion of mp4 files is also enabled
2022-07-26 12:00:11 - MANUAL - DEBUG - Invalid source, no video stream detected.
2022-07-26 12:00:11 - MANUAL - INFO - Processing file c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4
2022-07-26 12:00:11 - MANUAL - DEBUG - Guessed filename resulted in TMDB ID TMDBIDNO
2022-07-26 12:00:11 - MANUAL - DEBUG - Input IDs:
2022-07-26 12:00:11 - MANUAL - DEBUG - TMDBID: TMDBIDNO
2022-07-26 12:00:11 - MANUAL - DEBUG - IMDBID: None
2022-07-26 12:00:11 - MANUAL - DEBUG - TVDBID: None
2022-07-26 12:00:11 - MANUAL - DEBUG - Using TMDB ID: TMDBIDNO
2022-07-26 12:00:11 - MANUAL - DEBUG - Tagging language determined to be eng.
2022-07-26 12:00:11 - MANUAL - INFO - Matched movie title as: MovieName 2022-05-04 (TMDB ID: TMDBIDNO)
2022-07-26 12:00:11 - MANUAL - INFO - Processing MovieName
2022-07-26 12:00:11 - MANUAL - DEBUG - Process started.
2022-07-26 12:00:11 - MANUAL - INFO - Input Data
2022-07-26 12:00:11 - MANUAL - INFO - {
    "format": "mov,mp4,m4a,3gp,3g2,mj2",
    "format-fullname": "QuickTime / MOV",
    "video": {
        "index": 0,
        "codec": "hevc",
        "bitrate": 24111380,
        "pix_fmt": "yuv420p10le",
        "profile": "main10",
        "fps": 23.976023976023978,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": "35400/50000",
                    "red_y": "14600/50000",
                    "green_x": "8500/50000",
                    "green_y": "39850/50000",
                    "blue_x": "6550/50000",
                    "blue_y": "2300/50000",
                    "white_point_x": "15635/50000",
                    "white_point_y": "16450/50000",
                    "min_luminance": "50/10000",
                    "max_luminance": "10000000/10000"
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ]
        },
        "dimensions": "3840x1608",
        "level": 5.0,
        "field_order": "unknown"
    },
    "audio": [
        {
            "index": 1,
            "codec": "ac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions"
        }
    ],
    "subtitle": [],
    "attachment": []
}
2022-07-26 12:00:11 - MANUAL - INFO - Reading video stream.
2022-07-26 12:00:11 - MANUAL - INFO - Video codec detected: hevc.
2022-07-26 12:00:11 - MANUAL - INFO - Pix Fmt: yuv420p10le.
2022-07-26 12:00:11 - MANUAL - INFO - Profile: main10.
2022-07-26 12:00:11 - MANUAL - INFO - HDR video stream detected for 0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Codec pool is missing the FFPROBE value of the primary conversion codec h265 which will prevent remuxing, adding hevc to the list.
2022-07-26 12:00:11 - MANUAL - DEBUG - Pool of video codecs is ['h265', 'hevc'].
2022-07-26 12:00:11 - MANUAL - DEBUG - Total bitrate is 24784002.0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Total audio bitrate is 640000.
2022-07-26 12:00:11 - MANUAL - DEBUG - Estimated video bitrate is 24144002.0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Using video bitrate ratio of 1.000000, which results in 22936.801900 changing to 22936.801900.
2022-07-26 12:00:11 - MANUAL - DEBUG - Overriding video bitrate. Codec cannot be copied because video bitrate is too high [video-max-bitrate].
2022-07-26 12:00:11 - MANUAL - DEBUG - VCRF profiles detected [video-crf-profiles].
2022-07-26 12:00:11 - MANUAL - INFO - Acceptable profile match found for VBR 22936.8019 using CRF 29, maxrate 12m, bufsize 40m.
2022-07-26 12:00:11 - MANUAL - DEBUG - Source bit-depth 10, output 10, using depth 10.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video codec: h265.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video bitrate: 18000.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video CRF: 29.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video maxrate: 12m.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video bufsize: 40m.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video level: 5.0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video profile: main10.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video preset: medium.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video pix_fmt: yuv420p10le.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video field order: unknown.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video width: None.
2022-07-26 12:00:11 - MANUAL - DEBUG - Video debug video.hdr.max-bitrate.
2022-07-26 12:00:11 - MANUAL - INFO - Video codec parameters None.
2022-07-26 12:00:11 - MANUAL - INFO - Creating h265 video stream from source stream 0.
2022-07-26 12:00:11 - MANUAL - INFO - Reading audio streams.
2022-07-26 12:00:11 - MANUAL - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2022-07-26 12:00:11 - MANUAL - DEBUG - Pool universal audio codecs is ['aac'].
2022-07-26 12:00:11 - MANUAL - DEBUG - Pool of audio codecs is ['ac3', 'eac3'].
2022-07-26 12:00:11 - MANUAL - INFO - Audio detected for stream 1 - ac3 eng 6 channel.
2022-07-26 12:00:11 - MANUAL - DEBUG - Found an audio filter for converting from 6 channels to 2 channels. Applying 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 to UA.
2022-07-26 12:00:11 - MANUAL - DEBUG - Audio codec: aac.
2022-07-26 12:00:11 - MANUAL - DEBUG - Channels: 2.
2022-07-26 12:00:11 - MANUAL - DEBUG - 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.
2022-07-26 12:00:11 - MANUAL - DEBUG - Bitrate: 256.
2022-07-26 12:00:11 - MANUAL - DEBUG - VBR: 0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Profile: None.
2022-07-26 12:00:11 - MANUAL - DEBUG - Language: eng.
2022-07-26 12:00:11 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-26 12:00:11 - MANUAL - DEBUG - Attempting to set bitrate based on source stream bitrate.
2022-07-26 12:00:11 - MANUAL - DEBUG - Audio codec: copy.
2022-07-26 12:00:11 - MANUAL - DEBUG - Channels: 6.
2022-07-26 12:00:11 - MANUAL - DEBUG - Bitrate: 640.0.
2022-07-26 12:00:11 - MANUAL - DEBUG - VBR: 0.
2022-07-26 12:00:11 - MANUAL - DEBUG - Audio Profile: None.
2022-07-26 12:00:11 - MANUAL - DEBUG - Language: eng.
2022-07-26 12:00:11 - MANUAL - DEBUG - Filter: None.
2022-07-26 12:00:11 - MANUAL - DEBUG - Disposition: +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-26 12:00:11 - MANUAL - DEBUG - Debug: audio.
2022-07-26 12:00:11 - MANUAL - INFO - Creating copy audio stream from source stream 1.
2022-07-26 12:00:11 - MANUAL - INFO - Creating aac audio stream from source audio stream 1 [universal-audio].
2022-07-26 12:00:11 - MANUAL - DEBUG - Purging the following streams:
2022-07-26 12:00:11 - MANUAL - DEBUG - []
2022-07-26 12:00:11 - MANUAL - INFO - Found 0 streams that can be removed from the output file since they will be duplicates [stream-codec-combinations].
2022-07-26 12:00:11 - MANUAL - DEBUG - Triggering audio track sort [audio.sorting-sorting].
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorting streams with keys ['language', 'channels.d', 'map', 'd.comment'].
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted ascending with language:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted descending with channels:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted ascending with map:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - INFO - Final sorting:
2022-07-26 12:00:11 - MANUAL - INFO - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorting streams with keys ['channels.d', 'map', 'd.comment'].
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted descending with channels:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted ascending with map:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorted ascending with d.comment:
2022-07-26 12:00:11 - MANUAL - DEBUG - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - INFO - Final sorting:
2022-07-26 12:00:11 - MANUAL - INFO - ['0->0', '1->1']
2022-07-26 12:00:11 - MANUAL - DEBUG - Sorting audio streams for default audio stream designation.
2022-07-26 12:00:11 - MANUAL - DEBUG - 2 total audio streams with 2 set to default disposition. 2 defaults in your preferred language (eng), 0 in other languages.
2022-07-26 12:00:11 - MANUAL - DEBUG - 1 streams in preferred language cleared of default disposition flag from preferred language.
2022-07-26 12:00:11 - MANUAL - INFO - Default audio stream set to eng copy 6 channel stream [audio-default-sorting: ['channels.d', 'map', 'd.comment']].
2022-07-26 12:00:11 - MANUAL - INFO - Reading subtitle streams.
2022-07-26 12:00:11 - MANUAL - INFO - Attempting to download subtitles.
2022-07-26 12:00:11 - MANUAL - DEBUG - Refining subliminal search using included metadata
2022-07-26 12:00:26 - MANUAL - INFO - Downloaded new subtitle c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt.
2022-07-26 12:00:26 - MANUAL - DEBUG - Potential subtitle candidate identified MovieName (year).4K.en.srt.
2022-07-26 12:00:26 - MANUAL - DEBUG - Processing subtitle file suffix en.
2022-07-26 12:00:26 - MANUAL - DEBUG - Found language match eng.
2022-07-26 12:00:26 - MANUAL - DEBUG - Valid external eng subtitle file detected MovieName (year).4K.en.srt.
2022-07-26 12:00:26 - MANUAL - INFO - Scanned for external subtitles and found 1 results in your approved languages.
2022-07-26 12:00:26 - MANUAL - DEBUG - isImageBasedSubtitle FFmpeg command:
2022-07-26 12:00:26 - MANUAL - DEBUG - C:\ffmpeg\bin\ffmpeg.exe -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt" -c:s:0 srt -map 0:0 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=und -disposition:s:0 -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f srt -t 00:00:01 -f null -
2022-07-26 12:00:26 - MANUAL - INFO - Creating mov_text subtitle stream by importing Text-based subtitle MovieName (year).4K.en.srt [embed-subs].
2022-07-26 12:00:26 - MANUAL - DEBUG - Path: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt.
2022-07-26 12:00:26 - MANUAL - DEBUG - Codec: mov_text.
2022-07-26 12:00:26 - MANUAL - DEBUG - Langauge: eng.
2022-07-26 12:00:26 - MANUAL - DEBUG - Disposition: -default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions.
2022-07-26 12:00:26 - MANUAL - DEBUG - Sorting streams with keys ['language', 'd.comment', 'd.default.d', 'd.forced.d'].
2022-07-26 12:00:26 - MANUAL - INFO - Final sorting:
2022-07-26 12:00:26 - MANUAL - INFO - ['0->0']
2022-07-26 12:00:26 - MANUAL - DEBUG - Subtitle streams detected, adding fix_sub_duration option to preopts.
2022-07-26 12:00:26 - MANUAL - DEBUG - Selected hwaccel options:
2022-07-26 12:00:26 - MANUAL - DEBUG - []
2022-07-26 12:00:26 - MANUAL - DEBUG - Selected hwaccel decoder pairs:
2022-07-26 12:00:26 - MANUAL - DEBUG - []
2022-07-26 12:00:26 - MANUAL - DEBUG - FFMPEG hwaccels:
2022-07-26 12:00:26 - MANUAL - DEBUG - ['cuda', 'dxva2', 'qsv', 'd3d11va', 'opencl', 'vulkan']
2022-07-26 12:00:26 - MANUAL - DEBUG - Input format yuv420p10le bit depth 10.
2022-07-26 12:00:26 - MANUAL - DEBUG - canBypassConvert returned False.
2022-07-26 12:00:26 - MANUAL - INFO - Output Data
2022-07-26 12:00:26 - MANUAL - INFO - {
    "source": [
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.mp4",
        "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
    ],
    "format": "mp4",
    "video": {
        "codec": "h265",
        "map": 0,
        "bitrate": 18000,
        "crf": 29,
        "maxrate": "12m",
        "bufsize": "40m",
        "level": 5.0,
        "profile": "main10",
        "preset": "medium",
        "pix_fmt": "yuv420p10le",
        "field_order": "unknown",
        "width": null,
        "filter": null,
        "params": null,
        "framedata": {
            "pix_fmt": "yuv420p10le",
            "color_space": "bt2020nc",
            "color_primaries": "bt2020",
            "color_transfer": "smpte2084",
            "side_data_list": [
                {
                    "side_data_type": "Mastering display metadata",
                    "red_x": 35400.0,
                    "red_y": 14600.0,
                    "green_x": 8500.0,
                    "green_y": 39850.0,
                    "blue_x": 6550.0,
                    "blue_y": 2300.0,
                    "white_point_x": 15635.0,
                    "white_point_y": 16450.0,
                    "min_luminance": 50.0,
                    "max_luminance": 10000000.0
                },
                {
                    "side_data_type": "Content light level metadata",
                    "max_content": 1478,
                    "max_average": 916
                }
            ],
            "hdr": true,
            "repeat-headers": true
        },
        "bsf": null,
        "debug": "video.hdr.max-bitrate",
        "title": "4K HDR"
    },
    "audio": [
        {
            "map": 1,
            "codec": "copy",
            "channels": 6,
            "bitrate": 640.0,
            "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": [
        {
            "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": []
}
2022-07-26 12:00:26 - MANUAL - INFO - Preopts
2022-07-26 12:00:26 - MANUAL - INFO - [
    "-fix_sub_duration"
]
2022-07-26 12:00:26 - MANUAL - INFO - Postopts
2022-07-26 12:00:26 - MANUAL - INFO - [
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA",
    "-movflags",
    "+faststart",
    "-probesize",
    "50m",
    "-analyzeduration",
    "100m",
    "-max_muxing_queue_size",
    "9999"
]
2022-07-26 12:00:26 - MANUAL - INFO - Downloaded Subtitles
2022-07-26 12:00:26 - MANUAL - INFO - [
    "C:\\Users\\chris\\Videos\\convert\\movies\\MovieName (year)\\MovieName (year).4K.en.srt"
]
2022-07-26 12:00:26 - MANUAL - INFO - Starting conversion.
2022-07-26 12:00:26 - MANUAL - DEBUG - Input directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - File name: MovieName (year).4K.
2022-07-26 12:00:26 - MANUAL - DEBUG - Input extension: mp4.
2022-07-26 12:00:26 - MANUAL - DEBUG - Output directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - Output extension: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - Output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting.
2022-07-26 12:00:26 - MANUAL - DEBUG - Input directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - File name: MovieName (year).4K.
2022-07-26 12:00:26 - MANUAL - DEBUG - Input extension: mp4.
2022-07-26 12:00:26 - MANUAL - DEBUG - Output directory: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - Output extension: c:\users\username\Videos\convert\movies\MovieName (year).
2022-07-26 12:00:26 - MANUAL - DEBUG - Output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-26 12:00:26 - MANUAL - DEBUG - Final output file: c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-26 12:00:26 - MANUAL - DEBUG - Inputfile and final outputfile are the same, trying to rename inputfile first.
2022-07-26 12:00:26 - MANUAL - DEBUG - Renamed original file to c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original.
2022-07-26 12:00:27 - MANUAL - INFO - FFmpeg command:
2022-07-26 12:00:27 - MANUAL - INFO - ======================
2022-07-26 12:00:27 - MANUAL - INFO - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original" -i "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt" -map_metadata -1 -vcodec libx265 -map 0:0 -pix_fmt yuv420p10le -crf 29 -maxrate:v 12m -bufsize 40m -metadata:s:v BPS=18000000 -metadata:s:v BPS-eng=18000000 -metadata:s:v "title=4K HDR" -metadata:s:v "handler_name=4K HDR" -preset medium -profile:v main10 -level 5.0 -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50):max-cll=1478,916 -tag:v hvc1 -c:a:0 copy -map 0:1 -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 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 -movflags +faststart -probesize 50m -analyzeduration 100m -max_muxing_queue_size 9999 -y "c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting"
2022-07-26 12:00:27 - MANUAL - INFO - ======================
2022-07-26 12:00:27 - MANUAL - ERROR - Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "c:\users\username\sickbeard_mp4_automator\resources\mediaprocessor.py", line 2176, in convert
    for timecode, debug in conv:
  File "c:\users\username\sickbeard_mp4_automator\converter\__init__.py", line 329, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "c:\users\username\sickbeard_mp4_automator\converter\ffmpeg.py", line 760, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
2022-07-26 12:00:27 - MANUAL - ERROR - C:\ffmpeg\bin\ffmpeg.exe -fix_sub_duration -i c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original -i c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt -map_metadata -1 -vcodec libx265 -map 0:0 -pix_fmt yuv420p10le -crf 29 -maxrate:v 12m -bufsize 40m -metadata:s:v BPS=18000000 -metadata:s:v BPS-eng=18000000 -metadata:s:v title=4K HDR -metadata:s:v handler_name=4K HDR -preset medium -profile:v main10 -level 5.0 -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,50):max-cll=1478,916 -tag:v hvc1 -c:a:0 copy -map 0:1 -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 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 -movflags +faststart -probesize 50m -analyzeduration 100m -max_muxing_queue_size 9999 -y c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting
2022-07-26 12:00:27 - MANUAL - ERROR - ffmpeg version 5.0.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers

  built with gcc 11.2.0 (Rev7, 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-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --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-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      57. 17.100 / 57. 17.100

  libavcodec     59. 18.100 / 59. 18.100

  libavformat    59. 16.100 / 59. 16.100

  libavdevice    59.  4.100 / 59.  4.100

  libavfilter     8. 24.100 /  8. 24.100

  libswscale      6.  4.100 /  6.  4.100

  libswresample   4.  3.100 /  4.  3.100

  libpostproc    56.  3.100 / 56.  3.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 00000259ed0c8180] stream 0, timescale not set

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.original':

  Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2mp41

    title           : MovieName

    genre           : Fantasy

    date            : 2022-05-04

    encoder         : SMA:MovieName (year).4K.mp4

    iTunEXTC        : mpaa|PG-13|300

    iTunMOVI        : <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>

                    : <key>cast</key><array>

                    : <dict><key>name</key><string>Benedict Cumberbatch</string></dict>

                    : <dict><key>name</key><string>Elizabeth Olsen</string></dict>

                    : <dict><key>name</key><string>Chiwetel Ejiofor</string></dict>

                    : <dict><key>name</key><string>Benedict Wong</string></dict>

                    : <dict><key>name</key><string>Xochitl Gomez</string></dict>

                    : </array>

                    : <key>screenwriters</key><array>

                    : <dict><key>name</key><string>Stan Lee</string></dict>

                    : <dict><key>name</key><string>Steve Ditko</string></dict>

                    : <dict><key>name</key><string>Michael Waldron</string></dict>

                    : </array>

                    : <key>directors</key><array>

                    : <dict><key>name</key><string>Sam Raimi</string></dict>

                    : <dict><key>name</key><string>Dominic Fysh</string></dict>

                    : </array>

                    : <key>producers</key><array>

                    : <dict><key>name</key><string>Sarah Halley Finn</string></dict>

                    : <dict><key>name</key><string>Kevin Feige</string></dict>

                    : <dict><key>name</key><string>Helen Pollak</string></dict>

                    : <dict><key>name</key><string>Helen Pollak</string></dict>

                    : <dict><key>name</key><string>Scott Derrickson</string></dict>

                    : </array>

                    : </dict></plist>

                    : 

    hd_video        : 3

    media_type      : 9

    description     : Enter a new dimension of Strange.

    synopsis        : Doctor Strange, with the help of mystical allies both old and new, traverses the mind-bending and dangerous alternate realities of the Multiverse to confront a mysterious new adversary.

  Duration: 02:06:31.25, start: 0.000000, bitrate: 24784 kb/s

  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608 [SAR 1:1 DAR 160:67], 24111 kb/s, 23.98 fps, 23.98 tbr, 16k tbn (default)

    Metadata:

      handler_name    : 4K HDR

      vendor_id       : [0][0][0][0]

  Stream #0:1[0x2](eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)

    Metadata:

      handler_name    : 5.1 Channel

      vendor_id       : [0][0][0][0]

    Side data:

      audio service type: main

  Stream #0:2[0x0]: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1000x1500 [SAR 1:1 DAR 2:3], 90k tbr, 90k tbn (attached pic)

Input #1, srt, from 'c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.en.srt':

  Duration: N/A, bitrate: N/A

  Stream #1:0: Subtitle: subrip

Stream mapping:

  Stream #0:0 -> #0:0 (hevc (native) -> hevc (libx265))

  Stream #0:1 -> #0:1 (copy)

  Stream #0:1 -> #0:2 (ac3 (native) -> aac (native))

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

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

x265 [info]: HEVC encoder version 3.5+37-07b011400

x265 [info]: build info [Windows][GCC 11.2.0][64 bit] 10bit

x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

x265 [info]: Main 10 profile, Level-5 (Main tier)

x265 [info]: Thread pool created using 24 threads

x265 [info]: Slices                              : 1

x265 [info]: frame threads / pool features       : 4 / wpp(26 rows)

x265 [info]: Coding QT: max CU size, min CU size : 64 / 8

x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra

x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3

x265 [info]: Keyframe min / max / scenecut / bias  : 23 / 250 / 40 / 5.00 

x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2

x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0

x265 [info]: References / ref-limit  cu / depth  : 3 / off / on

x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1

x265 [info]: Rate Control / qCompress            : CRF-29.0 / 0.60

x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp

x265 [info]: tools: b-intra strong-intra-smoothing lslices=8 deblock sao

[mp4 @ 00000259ed536580] Value 0.050000 for parameter 'probesize' out of range [32 - 9.22337e+18]

[mp4 @ 00000259ed536580] Error setting option probesize to value 50m.

Could not write header for output file #0 (incorrect codec parameters ?): Result too large

Error initializing output stream 0:0 -- 

encoded 0 frames

[aac @ 00000259ed262280] Qavg: 63422.273

[aac @ 00000259ed262280] 2 frames left in the queue on closing

Conversion failed!

2022-07-26 12:00:27 - MANUAL - ERROR - c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.converting deleted.
2022-07-26 12:00:27 - MANUAL - DEBUG - Error converting, no outputfile generated for inputfile c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4.
2022-07-26 12:00:27 - MANUAL - ERROR - There was an error processing file c:\users\username\Videos\convert\movies\MovieName (year)\MovieName (year).4K.mp4, no output data received
2022-07-26 12:00:27 - MANUAL - DEBUG - Invalid source, no audio stream detected.
JNR8 commented 2 years ago

So I preformed a quick test. I removed the probesize and analyzeduration because they were throwing additional errors. I then set "embed-subs = False", it was set to true. It is now successfully converting the file.

So it seems that it has something to do with Subtitles, perhaps a format issue, or stream order issue?

mdhiggins commented 2 years ago

Stream order shouldn't matter. You can try turning on cleanit which will sweep the subtitle file for bad data and tags that might be causing issues

mdhiggins commented 2 years ago

Also are you seeing this with all subtitles or just the one example? and if its just the one file can you forward me the SRT file

JNR8 commented 2 years ago

I tried three different media files with three different subtitles files. They all behaved the same.

But enabling CleanIt and turning embed subs back on again seesm to have allowed ffmpeg to continue. I am running a full convertion right now. I will let you know what the outcome is.

mdhiggins commented 2 years ago

Guessing it must be a corrupted or modified subtitle file then, glad cleanit fixed; feel free to share the sub file so I can take a look