Closed ItsRainingHP closed 2 years ago
NVEnc is already supported, you need a build of FFMPEG that is compiled with NVEnc, this can be obtained by changing the SMA_FFMPEG_URL environment variable to a URL of this version of FFMPEG or using the build
tag which will build the image locally and compile FFMPEG from source, see the relevant section of the readme (https://github.com/mdhiggins/sonarr-sma#special-considerations)
I do not have a URL to provide and would recommend the build option
Use the build arg ffmpeg_tag nvidia2004
for NVEnv capable FFMPEG build options, though make sure your ubuntu versions match across your sonarr_tag and ffmpeg_tag (2004 for both or 1804 for both)
Thank you for taking the time to answer. I see now that this is referencing how to use the build. I realize now I have been using the docker this entire time poorly. For some reason I cannot mount a /usr/local/sma/ location. Here is the log and hopefully someone knows:
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 50-gid-video: executing...
[cont-init.d] 50-gid-video: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 90-sma-config: executing...
[90-sma-config] Downloading and installing FFMpeg
chmod: cannot access '/usr/local/sma/*.sh': No such file or directory
/usr/local/sma/venv/bin/python3: can't open file '/usr/local/sma/update.py': [Errno 2] No such file or directory
[cont-init.d] 90-sma-config: exited 2.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Info] Bootstrap: Starting Radarr - /app/radarr/bin/Radarr - Version 3.2.2.5080
Here are my environment variables (I didn't know an easier way to post this):
Can you share your volumes for docker?
Good morning! I got it working using a fork of this image created for Unraid by RandomNinjaATK. Thank for you all your help and replies. mdhiggins replies on other forums helped greatly to find the solution.
Never mind you did that. Not sure what interface that is looks like some web UI for docker.
I notice it looks like your config path is wrong, should be /usr/ not /user/
Also if you ran the build container it shouldn't be trying to download FFMPEG which is weird
That is the Unraid dashboard your viewing. And wow I see that user versus usr I missed. Thank you for helping. For anyone reading using Unraid you can download Unraid ready dockers for Sonarr SMA and Radarr SMA through the Unraid community apps store.
Glad you got it working. I am friends with RandomNinjaATK on Discord and we worked closely to get that unRaid variant working, he does good work.
That's not surprising to hear. Seems to be a fairly small developer community. He helped me through Discord as well. No wonder it's a great fork if you helped him with it.
@mdhiggins I am having issues recently where suddenly I cannot get ffmpeg to use the GPU. My only goal here is to have all my medias containers changed to mp4 on import. Here is my autoProcess.ini:
[Converter]
ffmpeg = ffmpeg
ffprobe = ffprobe
threads = 0
hwaccels = cuda, nvenc, cuvid
hwaccel-decoders = hevc_cuda, h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, h264_cuda
hwdevices = hevc_nvenc:0
hwaccel-output-format = cuvid:cuvid
output-directory =
output-format = mp4
output-extension = mp4
temp-extension =
minimum-size = 0
ignored-extensions = nfo, ds_store
copy-to =
move-to =
delete-original = True
sort-streams = True
process-same-extensions = True
bypass-if-copying-all = False
force-convert = True
post-process = False
wait-post-process = False
detailed-progress = True
opts-separator = ,
preopts =
postopts =
regex-directory-replace = [^\w\-_\. ]
[Permissions]
chmod = 0644
uid = -1
gid = -1
[Metadata]
relocate-moov = True
full-path-guess = True
tag = True
tag-language = eng
download-artwork = poster
sanitize-disposition =
strip-metadata = False
keep-titles = False
[Video]
codec = hevc_nvenc, hevc
max-bitrate = 0
bitrate-ratio =
crf = -1
crf-profiles =
preset =
codec-parameters =
dynamic-parameters = False
max-width = 0
profile =
max-level = 0.0
pix-fmt =
filter =
force-filter = False
[HDR]
codec = hevc_nvenc, hevc
pix-fmt =
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset =
codec-parameters =
filter =
force-filter = False
profile =
[Audio]
codec = ac3
languages =
default-language =
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 128
max-bitrate = 0
max-channels = 0
prefer-more-channels = True
default-more-channels = True
filter =
force-filter = False
sample-rates =
sample-format =
copy-original = False
copy-original-before = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False
stream-codec-combinations =
[Universal Audio]
codec = aac
channel-bitrate = 128
first-stream-only = False
move-after = False
filter =
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 =
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 =
[Subtitle.Subliminal]
download-subs = False
download-hearing-impaired-subs = False
providers =
[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =
[Sonarr]
host = 192.168.50.6
port = 8989
apikey = myapi
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False
[Radarr]
host = localhost
port = 7878
apikey =
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False
[Sickbeard]
host = localhost
port = 8081
ssl = False
apikey =
webroot =
username =
password =
[Sickrage]
host = localhost
port = 8081
ssl = False
apikey =
webroot =
username =
password =
[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory =
path-mapping =
[Deluge]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username =
password =
output-directory =
remove = False
path-mapping =
[qBittorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before =
action-after =
host = localhost
port = 8080
ssl = False
username =
password =
output-directory =
path-mapping =
[uTorrent]
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before =
action-after =
host = localhost
ssl = False
port = 8080
username =
password =
output-directory =
path-mapping =
[Plex]
host = localhost
port = 32400
refresh = False
token = mytoken
I have tried the following settings:
hwaccels = cuda, nvenc, cuvid
hwaccel-decoders = hevc_cuda, h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, h264_cuda
hwdevices = hevc_nvenc:0
hwaccel-output-format = cuvid:cuvid
hwdevices =
hwaccel-output-format =
Log
2021-11-26 10:13:42 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2021-11-26 10:13:42 - resources.readsettings - INFO - /usr/bin/python3
2021-11-26 10:13:42 - resources.readsettings - INFO - Loading config file /usr/local/sma/config/autoProcess.ini.
2021-11-26 10:13:42 - resources.readsettings - WARNING - Force-convert is true, so process-same-extensions is being overridden to true as well
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Processing /anime/InuYasha/Season 4/InuYasha - S04E20 - Assault on the Wolf-Demon Tribe! HDTV-1080p.mkv.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Input Data
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - {
"format": "matroska,webm",
"format-fullname": "Matroska / WebM",
"video": {
"index": 0,
"codec": "hevc",
"bitrate": 1320373,
"pix_fmt": "yuv420p10le",
"profile": "main10",
"fps": 23.976023976023978,
"framedata": {
"pix_fmt": "yuv420p10le",
"color_space": "bt709",
"color_primaries": "bt709",
"color_transfer": "bt709"
},
"dimensions": "1440x1080",
"level": 4.0,
"field_order": "unknown"
},
"audio": [
{
"index": 1,
"codec": "ac3",
"bitrate": 224000,
"channels": 2,
"samplerate": 48000,
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired"
}
],
"subtitle": [
{
"index": 2,
"codec": "ass",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"language": "eng"
}
],
"attachment": []
}
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Reading video stream.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Video codec detected: hevc.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p10le.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Profile: main10.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Video codec parameters None.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Reading audio streams.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - The following stream indexes have been identified as being copies: [] [stream-codec-combinations].
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Audio detected for stream 1 - ac3 jpn 2 channel.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Creating aac audio stream from source stream 1.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Found 0 streams that can be removed from the output file since they will dupcliates [stream-codec-combinations].
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Default audio stream set to jpn aac 2 channel stream [default-more-channels: True].
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Reading subtitle streams.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Text-based subtitle detected for stream 2 - ass eng.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Creating mov_text subtitle stream from source stream 2.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Tagging copied video stream as hvc1
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Output Data
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - {
"source": [
"/anime/InuYasha/Season 4/InuYasha - S04E20 - Assault on the Wolf-Demon Tribe! HDTV-1080p.mkv"
],
"format": "mp4",
"video": {
"codec": "copy",
"map": 0,
"bitrate": 1256.0044999999998,
"crf": -1,
"maxrate": null,
"bufsize": null,
"level": 0.0,
"profile": null,
"preset": null,
"pix_fmt": null,
"field_order": "unknown",
"width": null,
"filter": null,
"params": null,
"framedata": null,
"title": "FHD",
"debug": "video"
},
"audio": [
{
"map": 1,
"codec": "aac",
"channels": 2,
"bitrate": 256,
"filter": null,
"samplerate": null,
"sampleformat": "",
"language": "jpn",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"bsf": null,
"title": "Stereo",
"debug": "universal-audio"
}
],
"subtitle": [
{
"map": 2,
"codec": "mov_text",
"language": "eng",
"disposition": "+default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
"title": null,
"debug": "subtitle.embed-subs"
}
],
"attachment": []
}
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Preopts
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - [
"-fix_sub_duration"
]
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Postopts
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - [
"-threads",
"0",
"-metadata:g",
"encoding_tool=SMA",
"-tag:v",
"hvc1"
]
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - Starting conversion.
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - FFmpeg command:
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - ======================
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - /usr/bin/ffmpeg -fix_sub_duration -i "/anime/InuYasha/Season 4/InuYasha - S04E20 - Assault on the Wolf-Demon Tribe! HDTV-1080p.mkv" -vcodec copy -map 0:0 -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -c:a:0 aac -map 0:1 -ac:a:0 2 -b:a:0 256k -metadata:s:a:0 BPS=256000 -metadata:s:a:0 BPS-eng=256000 -metadata:s:a:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=jpn -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c:s:0 mov_text -map 0:2 -metadata:s:s:0 title= -metadata:s:s:0 handler_name= -metadata:s:s:0 language=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 -tag:v hvc1 -y "/anime/InuYasha/Season 4/InuYasha - S04E20 - Assault on the Wolf-Demon Tribe! HDTV-1080p.mp4"
2021-11-26 10:13:42 - resources.mediaprocessor - INFO - ======================
2021-11-26 10:14:02 - resources.mediaprocessor - INFO - /anime/InuYasha/Season 4/InuYasha - S04E20 - Assault on the Wolf-Demon Tribe! HDTV-1080p.mp4 created.
2021-11-26 10:14:02 - resources.mediaprocessor - ERROR - Unable to tag file
Traceback (most recent call last):
File "/usr/local/sma/resources/mediaprocessor.py", line 69, in fullprocess
tag = Metadata(mediatype, tvdbid=tvdbid, tmdbid=tmdbid, imdbid=imdbid, season=season, episode=episode, original=original, language=language)
File "/usr/local/sma/resources/metadata.py", line 102, in __init__
self.seasondata = seasonquery.info(language=self.language)
File "/usr/local/lib/python3.8/dist-packages/tmdbsimple/tv.py", line 508, in info
response = self._GET(path, kwargs)
File "/usr/local/lib/python3.8/dist-packages/tmdbsimple/base.py", line 110, in _GET
return self._request('GET', path, params=params)
File "/usr/local/lib/python3.8/dist-packages/tmdbsimple/base.py", line 105, in _request
response.raise_for_status()
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.themoviedb.org/3/tv/35610/season/4?language=en&api_key=45e408d2851e968e6e4d0353ce621c66
2021-11-26 10:14:02 - SonarrPostProcess - INFO - Sonarr response from RescanSeries command: ID 14763 started.
2021-11-26 10:14:12 - SonarrPostProcess - INFO - Rescan command completed.
2021-11-26 10:14:12 - SonarrPostProcess - INFO - Sonarr monitoring information updated for episode Assault on the Wolf-Demon Tribe!.
2021-11-26 10:14:12 - SonarrPostProcess - INFO - Sonarr response RenameSeries command: ID 14765 queued.
You're not transcoding any video so there's nothing for the GPU to do
Well thank you that shows just how noob I am.
Copying is better though, faster and no quality loss, its the ideal scenario
Good morning,
I have been utiilizing your docker for a few months now and find it great. I would like to know if there is a method to utilize NVENC hardware acceleration for ffmpeg. I feel like there is a method I can employ by changing the script it calls but I cannot find it. I am utilizing your docker but am unable to locate any autoprocess.ini or the postSonarr/postRadarr.py files. I have tried mounting all the volumes used in your docker and tried finding it through the docker console. Any assistance or updated release would be appreciated!
Thank you.