Closed Whereamnow closed 4 years ago
Need way more info and complete logs I can't do anything with this its just a generic FFMPEG error which can be caused by about anything
2020-10-03 13:01:03 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2020-10-03 13:01:03 - resources.readsettings - INFO - C:\Python38\python.exe
2020-10-03 13:01:03 - resources.readsettings - INFO - Loading config file C:\sickbeard_mp4_automator-master\config\autoProcess.ini.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Processing C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mkv.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Input Data
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - {
"format": "matroska,webm",
"format-fullname": "Matroska / WebM",
"video": {
"index": 2,
"codec": "hevc",
"pix_fmt": "yuv420p",
"profile": "main",
"fps": 23.976023976023978,
"dimensions": "1920x1080",
"level": 12.0,
"field_order": "unknown"
},
"audio": [
{
"index": 0,
"codec": "aac",
"channels": 2,
"samplerate": 44100,
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
}
],
"subtitle": [
{
"index": 1,
"codec": "ass",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"language": "eng"
}
],
"attachment": [
{
"index": 3,
"codec": "ttf"
}
]
}
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Reading video stream.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Profile: main.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Video codec parameters None.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Creating h264 video stream from source stream 2.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Reading audio streams.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Audio detected for stream 0 - aac jpn 2 channel.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Creating copy audio stream from source stream 0.
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Default audio stream set to jpn copy 2 channel stream [default-more-channels: True].
2020-10-03 13:01:05 - resources.mediaprocessor - INFO - Reading subtitle streams.
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Text-based subtitle detected for stream 1 - ass eng.
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 1.
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - dxva2 hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Output Data
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - {
"source": [
"C:\\Users\\Homebase\\Documents\\SonarrOut\\Black Clover\\Season 1\\Black.Clover.-.S01E145.-.Recapture.mkv"
],
"format": "mp4",
"video": {
"codec": "h264",
"map": 2,
"bitrate": 1753.335,
"crf": -1,
"maxrate": null,
"bufsize": null,
"level": 0.0,
"profile": null,
"preset": null,
"pix_fmt": null,
"field_order": "unknown",
"width": null,
"filter": null,
"params": null,
"title": "FHD",
"debug": "video"
},
"audio": [
{
"map": 0,
"codec": "copy",
"channels": 2,
"bitrate": 256,
"filter": null,
"samplerate": null,
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"bsf": null,
"title": "Stereo",
"debug": "universal-audio"
}
],
"subtitle": [
{
"map": 1,
"codec": "mov_text",
"language": "eng",
"encoding": "",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"title": "",
"debug": "subtitle.embed-subs"
}
],
"attachment": []
}
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Preopts
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - [
"-fix_sub_duration",
"-hwaccel",
"dxva2"
]
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Postopts
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - [
"-threads",
"0",
"-metadata:g",
"encoding_tool=SMA"
]
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - Starting conversion.
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - FFmpeg command:
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - ======================
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - C:\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -i C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mkv -vcodec libx264 -map 0:2 -vb 1753k -metadata:s:v BPS=1753000 -metadata:s:v BPS-eng=1753000 -metadata:s:v title=FHD -c:a:0 copy -map 0:0 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=jpn -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:1 -metadata:s:s:0 title= -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 C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mp4
2020-10-03 13:01:07 - resources.mediaprocessor - INFO - ======================
2020-10-03 13:01:08 - resources.mediaprocessor - ERROR - Error converting file, FFMPEG error.
Traceback (most recent call last):
File "C:\sickbeard_mp4_automator-master\resources\mediaprocessor.py", line 1485, in convert
for timecode, debug in conv:
File "C:\sickbeard_mp4_automator-master\converter\__init__.py", line 304, in convert
for timecode, debug in self.ffmpeg.convert(outfile, optlist,
File "C:\sickbeard_mp4_automator-master\converter\ffmpeg.py", line 706, in convert
raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
2020-10-03 13:01:08 - resources.mediaprocessor - ERROR - C:\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -i C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mkv -vcodec libx264 -map 0:2 -vb 1753k -metadata:s:v BPS=1753000 -metadata:s:v BPS-eng=1753000 -metadata:s:v title=FHD -c:a:0 copy -map 0:0 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=jpn -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:1 -metadata:s:s:0 title= -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 C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mp4
2020-10-03 13:01:08 - resources.mediaprocessor - ERROR - ffmpeg version 2020-09-30-git-9d8f9b2e40-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev3, 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-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --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-libglslang --enable-vulkan --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libwavpack --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 56. 60.100 / 56. 60.100
libavcodec 58.108.100 / 58.108.100
libavformat 58. 59.100 / 58. 59.100
libavdevice 58. 11.102 / 58. 11.102
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, matroska,webm, from 'C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mkv':
Metadata:
encoder : libebml v1.3.7 + libmatroska v1.5.0
creation_time : 2020-09-29T11:19:24.000000Z
Duration: 00:23:54.25, start: 0.000000, bitrate: 1753 kb/s
Stream #0:0(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
Metadata:
BPS-eng : 127999
DURATION-eng : 00:23:54.088000000
NUMBER_OF_FRAMES-eng: 61761
NUMBER_OF_BYTES-eng: 22945402
_STATISTICS_WRITING_APP-eng: mkvmerge v33.0.0 ('A Little Bit of Madness') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-09-29 11:19:24
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Subtitle: ass (default)
Metadata:
BPS-eng : 109
DURATION-eng : 00:23:49.030000000
NUMBER_OF_FRAMES-eng: 327
NUMBER_OF_BYTES-eng: 19521
_STATISTICS_WRITING_APP-eng: mkvmerge v33.0.0 ('A Little Bit of Madness') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-09-29 11:19:24
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2: Video: hevc (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Metadata:
BPS-eng : 1621935
DURATION-eng : 00:23:54.016000000
NUMBER_OF_FRAMES-eng: 34382
NUMBER_OF_BYTES-eng: 290735198
_STATISTICS_WRITING_APP-eng: mkvmerge v33.0.0 ('A Little Bit of Madness') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2020-09-29 11:19:24
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:3: Attachment: ttf
Metadata:
filename : OpenSans-Semibold.ttf
mimetype : application/x-truetype-font
[AVHWDeviceContext @ 000002056bc6eac0] Failed to create Direct3D device
Device creation failed: -1313558101.
[hevc @ 000002056c0c46c0] No device available for decoder: device type dxva2 needed for codec hevc.
Stream mapping:
Stream #0:2 -> #0:0 (hevc (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (copy)
Stream #0:1 -> #0:2 (ass (ssa) -> mov_text (native))
Device setup failed for decoder on input stream #0:2 : Unknown error occurred
2020-10-03 13:01:08 - resources.mediaprocessor - ERROR - C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mp4 deleted.
2020-10-03 13:01:08 - SonarrPostProcess - INFO - Processing returned False.
2020-10-03 13:01:08 - SonarrPostProcess - ERROR - Error processing file
Traceback (most recent call last):
File "C:\sickbeard_mp4_automator-master\postSonarr.py", line 190, in <module>
sys.exit(1)
SystemExit: 1
[AVHWDeviceContext @ 000002056bc6eac0] Failed to create Direct3D device
Device creation failed: -1313558101.
[hevc @ 000002056c0c46c0] No device available for decoder: device type dxva2 needed for codec hevc.
You did set up your decoder or you don't have a device that can support it. Remove that from your hwaccel list
Im on a i7 with Nvidia Quadro 600
If i run this in Command Line. It works fine.
C:\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -i "C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mkv" -vcodec libx264 -map 0:2 -vb 1753k -metadata:s:v BPS=1753000 -metadata:s:v BPS-eng=1753000 -metadata:s:v title=FHD -c:a:0 copy -map 0:0 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=jpn -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:1 -metadata:s:s:0 title= -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 "C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black.Clover.-.S01E145.-.Recapture.mp4"
I'll assume that's the same command that's generated by the script plus or minus some quotes for the paths, feel free to correct me if you changed the command in some way I'm not noticing
It might be a permissions issue then? Maybe sonarr doesn't have access to the hardware?
My bad, I waited a little longer and got
Failed setup for format dxva2_vld: hwaccel initialisation returned error
So that's an FFMpeg problem with your hardware, either driver, FFMpeg build, or this specific file
If you can produce an FFMpeg command that works with hardware decoding for your setup I can advise on how to reproduce that in SMA but ultimately not a script problem
Check if this happens with all files
Could also try using cuvid
instead which is supported by Nvidia
Here is the manual.py way that i did earlier
2020-10-03 10:09:35 - MANUAL - INFO - C:\Python38\python.exe
2020-10-03 10:09:35 - MANUAL - INFO - Loading config file C:\sickbeard_mp4_automator-master\config\autoProcess.ini.
2020-10-03 10:09:38 - MANUAL - INFO - Matched TV episode as Black Clover (TMDB ID: 73223) S01E145
2020-10-03 10:09:43 - MANUAL - INFO - Processing Black Clover Season 01 Episode 145 - Rescue
2020-10-03 10:09:43 - MANUAL - INFO - Input Data
2020-10-03 10:09:43 - MANUAL - INFO - {
"format": "matroska,webm",
"format-fullname": "Matroska / WebM",
"video": {
"index": 2,
"codec": "hevc",
"pix_fmt": "yuv420p",
"profile": "main",
"fps": 23.976023976023978,
"dimensions": "1920x1080",
"level": 12.0,
"field_order": "unknown"
},
"audio": [
{
"index": 0,
"codec": "aac",
"channels": 2,
"samplerate": 44100,
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
}
],
"subtitle": [
{
"index": 1,
"codec": "ass",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"language": "eng"
}
],
"attachment": [
{
"index": 3,
"codec": "ttf"
}
]
}
2020-10-03 10:09:43 - MANUAL - INFO - Reading video stream.
2020-10-03 10:09:43 - MANUAL - INFO - Video codec detected: hevc.
2020-10-03 10:09:43 - MANUAL - INFO - Pix Fmt: yuv420p.
2020-10-03 10:09:43 - MANUAL - INFO - Profile: main.
2020-10-03 10:09:43 - MANUAL - INFO - Video codec parameters None.
2020-10-03 10:09:43 - MANUAL - INFO - Creating h264 video stream from source stream 2.
2020-10-03 10:09:43 - MANUAL - INFO - Reading audio streams.
2020-10-03 10:09:43 - MANUAL - INFO - Audio detected for stream 0 - aac jpn 2 channel.
2020-10-03 10:09:43 - MANUAL - INFO - Creating copy audio stream from source stream 0.
2020-10-03 10:09:43 - MANUAL - INFO - Default audio stream set to jpn copy 2 channel stream [default-more-channels: True].
2020-10-03 10:09:43 - MANUAL - INFO - Reading subtitle streams.
2020-10-03 10:09:49 - MANUAL - INFO - Text-based subtitle detected for stream 1 - ass eng.
2020-10-03 10:09:49 - MANUAL - INFO - Creating mov_text subtitle stream from source stream 1.
2020-10-03 10:09:49 - MANUAL - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2020-10-03 10:09:49 - MANUAL - INFO - dxva2 hwaccel is supported by this ffmpeg build and will be used [hwaccels].
2020-10-03 10:09:49 - MANUAL - INFO - Output Data
2020-10-03 10:09:49 - MANUAL - INFO - {
"source": [
"C:\\Users\\Homebase\\Documents\\SonarrOut\\Black Clover\\Season 1\\Black Clover - S01E145 - Recapture HDTV-1080p.mkv"
],
"format": "mp4",
"video": {
"codec": "h264",
"map": 2,
"bitrate": 1753.335,
"crf": -1,
"maxrate": null,
"bufsize": null,
"level": 0.0,
"profile": null,
"preset": null,
"pix_fmt": null,
"field_order": "unknown",
"width": null,
"filter": null,
"params": null,
"title": "FHD",
"debug": "video"
},
"audio": [
{
"map": 0,
"codec": "copy",
"channels": 2,
"bitrate": 256,
"filter": null,
"samplerate": null,
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"bsf": null,
"title": "Stereo",
"debug": "universal-audio"
}
],
"subtitle": [
{
"map": 1,
"codec": "mov_text",
"language": "eng",
"encoding": "",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"title": "",
"debug": "subtitle.embed-subs"
}
],
"attachment": []
}
2020-10-03 10:09:49 - MANUAL - INFO - Preopts
2020-10-03 10:09:49 - MANUAL - INFO - [
"-fix_sub_duration",
"-hwaccel",
"dxva2"
]
2020-10-03 10:09:49 - MANUAL - INFO - Postopts
2020-10-03 10:09:49 - MANUAL - INFO - [
"-threads",
"0",
"-metadata:g",
"encoding_tool=SMA"
]
2020-10-03 10:09:49 - MANUAL - INFO - Starting conversion.
2020-10-03 10:09:49 - MANUAL - INFO - FFmpeg command:
2020-10-03 10:09:49 - MANUAL - INFO - ======================
2020-10-03 10:09:49 - MANUAL - INFO - C:\FFMPEG\bin\ffmpeg.exe -fix_sub_duration -hwaccel dxva2 -i C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black Clover - S01E145 - Recapture HDTV-1080p.mkv -vcodec libx264 -map 0:2 -vb 1753k -metadata:s:v BPS=1753000 -metadata:s:v BPS-eng=1753000 -metadata:s:v title=FHD -c:a:0 copy -map 0:0 -metadata:s:a:0 title=Stereo -metadata:s:a:0 language=jpn -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -c:s:0 mov_text -map 0:1 -metadata:s:s:0 title= -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 C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black Clover - S01E145 - Recapture HDTV-1080p.mp4
2020-10-03 10:09:49 - MANUAL - INFO - ======================
2020-10-03 10:23:05 - MANUAL - INFO - C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black Clover - S01E145 - Recapture HDTV-1080p.mp4 created.
2020-10-03 10:23:05 - MANUAL - INFO - Tagging file: C:\Users\Homebase\Documents\SonarrOut\Black Clover\Season 1\Black Clover - S01E145 - Recapture HDTV-1080p.mp4.
2020-10-03 10:23:05 - MANUAL - INFO - Trying to write tags.
2020-10-03 10:23:05 - MANUAL - INFO - Tags written successfully using mutagen.
2020-10-03 10:23:05 - MANUAL - INFO - Relocating MOOV atom to start of file.
Here is a PasteBin for easier reading for what i put in Command Line https://pastebin.com/4e9V3PxQ
I think this might be a permission issue if manual works and postSonarr doesn't because they use the exact same code base, they just run the converter through mediaprocessor.py so there's really no variation
It seems that sonarr isn't able to access the device
Yup, your right. I set everything to "run as Admin" and it is working.
Not sure what went wrong. I tried the manual.py way and it worked.