-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get/configure SMA to use my Nvidia GPU #1702
Comments
I updated to the latest release of SMA. Then made the following edits to my .ini file. SMA now is working will with h264 input files and using my nVidia GPU for down scaling video files. But its not working for h265 input files, see below. [Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels = cuda, cuvid
hwaccel-decoders = h264_cuda, h264_cuvid, hevc_cuda, hevc_nvenc, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid
hwdevices =
hwaccel-output-format = cuda:cuda
output-directory = /media/data1/work
output-directory-space-ratio = 0.0
output-format = mp4
output-extension = mp4
temp-extension = rokuize
minimum-size = 50
ignored-extensions = nfo, ds_store
copy-to =
move-to = /media/data1/tvprocess
delete-original = True
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 =
regex-directory-replace = [^\w\-_\. ]
[Permissions]
chmod = 0664
uid = -1
gid = -1
[Metadata]
relocate-moov = True
full-path-guess = True
tag = True
tag-language = eng
download-artwork = False
sanitize-disposition =
strip-metadata = True
keep-titles = False
[Video]
codec = h264_nvenc, h264, x264
max-bitrate = 2800
bitrate-ratio =
crf = -1
crf-profiles =
preset =
codec-parameters =
dynamic-parameters = False
max-width = 1280
profile = main
max-level = 4.1
pix-fmt =
prioritize-source-pix-fmt = True
filter =
force-filter = true
[HDR]
codec =
pix-fmt =
space = bt2020nc
transfer = smpte2084
primaries = bt2020
preset =
codec-parameters =
filter =
force-filter = False
profile =
[Audio]
codec = aac,ac3
languages = eng
default-language = eng
include-original-language = True
first-stream-of-language = False
channel-bitrate = 128
variable-bitrate = 0
max-bitrate = 0
max-channels = 0
filter = volume=5dB
profile =
force-filter = False
sample-rates =
sample-format =
copy-original = False
aac-adtstoasc = False
ignored-dispositions =
force-default = False
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]
[Subtitle]
codec = mov_text
codec-image-based =
languages = eng
default-language = eng
include-original-language = False
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 =
force-default = False
unique-dispositions = False
attachment-codec =
remove-bitstream-subs = False
[Subtitle.Sorting]
sorting = language, d.comment, d.default.d, d.forced.d
codecs =
burn-sorting = language, d.comment, d.default.d, d.forced.d
[Subtitle.CleanIt]
enabled = False
config-path =
tags =
[Subtitle.FFSubsync]
enabled = False
[Subtitle.Subliminal]
download-subs = False
download-forced-subs = False
include-hearing-impaired-subs = False
providers =
[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles = ===
Suggestions? |
Does it work without the scaler? Looks like it might be that filter that's throwing an error. Try adjusting your settings so you're not resizing the video You're also converting from a 10 bit color format to 8 bit here which could be why you're seeing a difference If you can provide a ffmpeg command that works for your hardware I can potentially guide you on what settings you need to adjust to achieve a similar output |
Thanks for following up. It will be a day or two before I can test your suggestion. |
This is the command that works to convert hevc/h265 to h264 and scale to 720p using my nVidia card. I've attached my autoprocess.ini file for your review. /usr/local/bin/ffmpeg -benchmark -hwaccel cuda -hwaccel_output_format cuda -i "/tvdl/video-file.1080p.HEVC.x265.mkv" -vf scale_cuda=-2:720 -c:v hevc_nvenc "/work/video-file.720p.x264.mp4" |
Looks like SMA is defaulting to using scale_npp and you're using scale_cuda If you set your encoder to I didn't previously have one for h264 but I just added Also, in your sample you are encoding to hevc not h264, so this is entirely different compared to your autoProcess config where you're converting to h264 which might account for some differences as well But I would recommend either [Video]
codec = h264_nvenc_cuda, h264 or if you're trying to convert to hevc [Video]
codec = h265_nvenc_cuda, h264 |
Using SMA, just downloaded and installed it a few days ago, so a recent version.
My system is Linux Mint 20.2
Graphic card: nVidia TU116 [GeForce GTX 1660 Ti]
I built the ffmpeg using the following.
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-nvenc --enable-cuvid
I only use your manual.py script, calling it from inside my own script the loops the media files, doing some "other" things before and after your script. As it is now it does process my 1080p media down to 720p, with my preferred bitrate, but it seems really slow. I doesn't look like its using my Nvidia GPU at all. Suggestions to allow your script & ffmpeg to utilize my gpu? Is there something I'm missing from my ffmpeg build? Any guidance would be helpful.
I've attached several file for your reference.
sma-codec-list.txt
hwaccels-list.txt
decoder-list.txt
autoprocess.ini.txt
sma.log.txt
The text was updated successfully, but these errors were encountered: