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

Having issues with FFMPEG with CUDA & SMA #1444

Closed KaHooli closed 3 years ago

KaHooli commented 3 years ago

Hi,

I finally got FFMPEG working with CUDA & Sonarr, thanks to your help previously and some tweaking of your sonarr-sma:build docker image (see https://github.com/KaHooli/sonarr-sma/tree/build ).

Now I'm trying to get SMA working with it all, and the autoProcess.ini options are more complex than when I was using it a few years ago.

When trying to use the manual script, it keeps failing. I'm thinking I've not got the right settings in the autoProcess.ini file, but I'm getting stuck. Any assistance would be appreciated.

Output of manual script

root@f6e858a8c80b:/# ${SMA_PATH}/venv/bin/python3 ${SMA_PATH}/manual.py -i /data/videos/TV\ Shows/Bull\ \(2016\)/Season\ 5/Bull\ \(2016\)\ -\ S05E16\ -\ A\ Friend\ in\ Need.mkv -c /shared/sma/sonarr-autoProcess.ini
Manual processor started.
Python 64-bit 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0].
Guessit version: 3.3.1.
/usr/local/sma/venv/bin/python3
Loading config file /shared/sma/sonarr-autoProcess.ini.
Force-convert is true, so process-same-extensions is being overridden to true as well
Input Data
{
    "format": "matroska,webm",
    "format-fullname": "unknown",
    "video": {
        "index": 0,
        "codec": "h264",
        "pix_fmt": "yuv420p",
        "profile": "100",
        "fps": 24.0,
        "framedata": {
            "pix_fmt": "yuv420p",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "640x480",
        "level": 3.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "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": []
}
Reading video stream.
Video codec detected: h264.
Pix Fmt: yuv420p.
Profile: 100.
Video codec parameters None.
Creating hevc_nvenc video stream from source stream 0.
Reading audio streams.
Audio detected for stream 1 - eac3 eng 6 channel.
Creating aac audio stream source audio stream 1 [universal-audio].
Creating aac audio stream from source stream 1.
Default audio stream set to eng aac 2 channel stream [default-more-channels: True].
Reading subtitle streams.
Text-based subtitle detected for stream 2 - ass eng.
Creating mov_text subtitle stream from source stream 2.
Scanned for external subtitles and found 0 results in your approved languages.
Output Data
{
    "source": [
        "/data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "hevc_nvenc",
        "map": 0,
        "bitrate": 201.53965,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": 480,
        "filter": null,
        "params": null,
        "framedata": null,
        "title": "SD",
        "debug": "video.max-width"
    },
    "audio": [
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "samplerate": null,
            "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",
            "title": "Stereo",
            "debug": "universal-audio"
        },
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "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",
            "samplerate": null,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "Stereo",
            "debug": "audio.max-channels"
        }
    ],
    "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": []
}
Preopts
[
    "-fix_sub_duration"
]
Postopts
[
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
Starting conversion.
FFmpeg command:
======================
/usr/local/bin/ffmpeg -fix_sub_duration -i "/data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mkv" -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 201k -metadata:s:v BPS=201000 -metadata:s:v BPS-eng=201000 -metadata:s:v title=SD -metadata:s:v handler_name=SD -vf scale_npp=480:360 -tag:v hvc1 -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 -filter:a:0 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:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c: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 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 -y "/data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mp4"
======================
[                    ] 0% Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "/usr/local/sma/resources/mediaprocessor.py", line 1613, in convert
    for timecode, debug in conv:
  File "/usr/local/sma/converter/__init__.py", line 317, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "/usr/local/sma/converter/ffmpeg.py", line 723, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
/usr/local/bin/ffmpeg -fix_sub_duration -i /data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mkv -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 201k -metadata:s:v BPS=201000 -metadata:s:v BPS-eng=201000 -metadata:s:v title=SD -metadata:s:v handler_name=SD -vf scale_npp=480:360 -tag:v hvc1 -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 -filter:a:0 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:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c: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 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 -y /data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, matroska,webm, from '/data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mkv':
  Metadata:
    ENCODER         : Lavf58.31.101
  Duration: 00:42:57.60, start: 0.000000, bitrate: 852 kb/s
  Stream #0:0: Video: h264, yuv420p(progressive), 640x480 [SAR 4:3 DAR 16:9], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Metadata:
      ENCODER         : Lavc58.55.100 libx264
      DURATION        : 00:42:57.584000000
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      DURATION        : 00:42:57.600000000
  Stream #0:2(eng): Subtitle: ass
    Metadata:
      title           : English
      ENCODER         : Lavc58.55.100 ssa
      DURATION        : 00:42:19.537000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
  Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
  Stream #0:1 -> #0:2 (eac3 (native) -> aac (native))
  Stream #0:2 -> #0:3 (ass (ssa) -> mov_text (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[aac @ 0x55c0960cff80] Qavg: 65536.000
[aac @ 0x55c0960cff80] 2 frames left in the queue on closing
[aac @ 0x55c0960cd3c0] Qavg: 65536.000
[aac @ 0x55c0960cd3c0] 2 frames left in the queue on closing
Conversion failed!

/data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mp4 deleted.
There was an error processing file /data/videos/TV Shows/Bull (2016)/Season 5/Bull (2016) - S05E16 - A Friend in Need.mkv, no output data received

FFMPEG -codecs output

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100

Codecs:
 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression
 -------
 D.VI.S 012v                 
 D.V.L. 4xm                  
 D.VI.S 8bps                 
 .EVIL. a64_multi             (encoders: a64multi )
 .EVIL. a64_multi5            (encoders: a64multi5 )
 D.V..S aasc                 
 D.V.L. agm                  
 D.VIL. aic                  
 DEVI.S alias_pix            
 DEVIL. amv                  
 D.V.L. anm                  
 D.V.L. ansi                 
 DEV..S apng                 
 D.V.L. arbc                 
 D.V.L. argo                 
 DEVIL. asv1                 
 DEVIL. asv2                 
 D.VIL. aura                 
 D.VIL. aura2                
 DEV.L. av1                   (decoders: libaom-av1 av1 ) (encoders: libaom-av1 )
 D.V... avrn                 
 DEVI.S avrp                 
 D.V.L. avs                  
 ..V.L. avs2                 
 ..V.L. avs3                 
 DEVI.S avui                 
 DEVI.S ayuv                 
 D.V.L. bethsoftvid          
 D.V.L. bfi                  
 D.V.L. binkvideo            
 D.VI.. bintext              
 D.VI.S bitpacked            
 DEVI.S bmp                  
 D.V..S bmv_video            
 D.VI.S brender_pix          
 D.V.L. c93                  
 D.V.L. cavs                 
 D.V.L. cdgraphics           
 D.V..S cdtoons              
 D.VIL. cdxl                 
 DEV.L. cfhd                 
 DEV.L. cinepak              
 D.V.L. clearvideo           
 DEVIL. cljr                 
 D.VI.S cllc                 
 D.V.L. cmv                   (decoders: eacmv )
 D.V... cpia                 
 D.VILS cri                  
 D.V..S cscd                  (decoders: camstudio )
 D.VIL. cyuv                 
 ..V.LS daala                
 D.VILS dds                  
 D.V.L. dfa                  
 DEV.LS dirac                 (encoders: vc2 )
 DEVIL. dnxhd                
 DEVI.S dpx                  
 D.V.L. dsicinvideo          
 DEVIL. dvvideo              
 D.V..S dxa                  
 D.VI.S dxtory               
 D.VIL. dxv                  
 D.V.L. escape124            
 D.V.L. escape130            
 DEVILS exr                  
 DEV..S ffv1                 
 DEVI.S ffvhuff              
 D.V.L. fic                  
 DEVI.S fits                 
 DEV..S flashsv              
 DEV.L. flashsv2             
 D.V..S flic                 
 DEV.L. flv1                  (decoders: flv ) (encoders: flv )
 D.V..S fmvc                 
 D.VI.S fraps                
 D.VI.S frwu                 
 D.V.L. g2m                  
 D.V.L. gdv                  
 DEV..S gif                  
 DEV.L. h261                 
 DEV.L. h263                  (decoders: h263 h263_v4l2m2m ) (encoders: h263 h263_v4l2m2m )
 D.V.L. h263i                
 DEV.L. h263p                
 DEV.LS h264                  (decoders: h264 h264_v4l2m2m h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m nvenc nvenc_h264 )
 D.VIL. hap                  
 DEV.L. hevc                  (decoders: hevc hevc_v4l2m2m hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_v4l2m2m libkvazaar )
 D.V.L. hnm4video            
 D.VIL. hq_hqa               
 D.VIL. hqx                  
 DEVI.S huffyuv              
 D.VI.S hymt                 
 D.V.L. idcin                 (decoders: idcinvideo )
 D.VI.. idf                  
 D.V.L. iff_ilbm              (decoders: iff )
 D.V.L. imm4                 
 D.V.L. imm5                 
 D.V.L. indeo2               
 D.V.L. indeo3               
 D.V.L. indeo4               
 D.V.L. indeo5               
 D.V.L. interplayvideo       
 D.VIL. ipu                  
 DEVILS jpeg2000              (decoders: jpeg2000 libopenjpeg ) (encoders: jpeg2000 libopenjpeg )
 DEVILS jpegls               
 D.VIL. jv                   
 D.V.L. kgv1                 
 D.V.L. kmvc                 
 D.VI.S lagarith             
 .EVI.S ljpeg                
 D.VI.S loco                 
 D.V.L. lscr                 
 D.VI.S m101                 
 D.V.L. mad                   (decoders: eamad )
 DEVI.S magicyuv             
 D.VIL. mdec                 
 D.V.L. mimic                
 DEVIL. mjpeg                 (decoders: mjpeg mjpeg_cuvid )
 D.VIL. mjpegb               
 D.V.L. mmvideo              
 D.V.L. mobiclip             
 D.V.L. motionpixels         
 DEV.L. mpeg1video            (decoders: mpeg1video mpeg1_v4l2m2m mpeg1_cuvid )
 DEV.L. mpeg2video            (decoders: mpeg2video mpegvideo mpeg2_v4l2m2m mpeg2_cuvid )
 DEV.L. mpeg4                 (decoders: mpeg4 mpeg4_v4l2m2m mpeg4_cuvid ) (encoders: mpeg4 libxvid mpeg4_v4l2m2m )
 D.V.L. msa1                 
 D.VI.S mscc                 
 D.V.L. msmpeg4v1            
 DEV.L. msmpeg4v2            
 DEV.L. msmpeg4v3             (decoders: msmpeg4 ) (encoders: msmpeg4 )
 D.VI.S msp2                 
 D.V..S msrle                
 D.V.L. mss1                 
 D.VIL. mss2                 
 DEV.L. msvideo1             
 D.VI.S mszh                 
 D.V.L. mts2                 
 D.V.L. mv30                 
 D.VIL. mvc1                 
 D.VIL. mvc2                 
 D.V.L. mvdv                 
 D.VIL. mvha                 
 D.V..S mwsc                 
 D.V.L. mxpeg                
 D.VIL. notchlc              
 D.V.L. nuv                  
 D.V.L. paf_video            
 DEVI.S pam                  
 DEVI.S pbm                  
 DEVI.S pcx                  
 DEVI.S pfm                  
 DEVI.S pgm                  
 DEVI.S pgmyuv               
 D.VI.S pgx                  
 D.V.L. photocd              
 D.VIL. pictor               
 D.VIL. pixlet               
 DEV..S png                  
 DEVI.S ppm                  
 DEVIL. prores                (encoders: prores prores_aw prores_ks )
 D.VIL. prosumer             
 D.VI.S psd                  
 D.VIL. ptx                  
 D.VI.S qdraw                
 D.V.L. qpeg                 
 DEV..S qtrle                
 DEVI.S r10k                 
 DEVI.S r210                 
 D.V.L. rasc                 
 DEVI.S rawvideo             
 D.VIL. rl2                  
 DEV.L. roq                   (decoders: roqvideo ) (encoders: roqvideo )
 DEV.L. rpza                 
 D.V..S rscc                 
 DEV.L. rv10                 
 DEV.L. rv20                 
 D.V.L. rv30                 
 D.V.L. rv40                 
 D.V.L. sanm                 
 D.V.LS scpr                 
 D.V..S screenpresso         
 D.V.L. sga                  
 DEVI.S sgi                  
 D.VI.S sgirle               
 D.VI.S sheervideo           
 D.V.L. simbiosis_imx        
 D.V.L. smackvideo            (decoders: smackvid )
 D.V.L. smc                  
 D.VIL. smvjpeg              
 DEV.LS snow                 
 D.VIL. sp5x                 
 DEVIL. speedhq              
 D.VI.S srgc                 
 DEVI.S sunrast              
 ..V..S svg                  
 DEV.L. svq1                 
 D.V.L. svq3                 
 DEVI.S targa                
 D.VI.S targa_y216           
 D.V.L. tdsc                 
 D.V.L. tgq                   (decoders: eatgq )
 D.V.L. tgv                   (decoders: eatgv )
 DEV.L. theora                (encoders: libtheora )
 D.VIL. thp                  
 D.V.L. tiertexseqvideo      
 DEVI.S tiff                 
 D.VIL. tmv                  
 D.V.L. tqi                   (decoders: eatqi )
 D.V.L. truemotion1          
 D.V.L. truemotion2          
 D.VIL. truemotion2rt        
 D.V..S tscc                  (decoders: camtasia )
 D.V.L. tscc2                
 D.VIL. txd                  
 D.V.L. ulti                  (decoders: ultimotion )
 DEVI.S utvideo              
 DEVI.S v210                 
 D.VI.S v210x                
 DEVI.S v308                 
 DEVI.S v408                 
 DEVI.S v410                 
 D.V.L. vb                   
 D.VI.S vble                 
 D.V.L. vc1                   (decoders: vc1 vc1_v4l2m2m vc1_cuvid )
 D.V.L. vc1image             
 D.VIL. vcr1                 
 D.VIL. vixl                  (decoders: xl )
 D.V.L. vmdvideo             
 D.V..S vmnc                 
 D.V.L. vp3                  
 D.V.L. vp4                  
 D.V.L. vp5                  
 D.V.L. vp6                  
 D.V.L. vp6a                 
 D.V.L. vp6f                 
 D.V.L. vp7                  
 DEV.L. vp8                   (decoders: vp8 vp8_v4l2m2m libvpx vp8_cuvid ) (encoders: libvpx vp8_v4l2m2m )
 DEV.L. vp9                   (decoders: vp9 vp9_v4l2m2m libvpx-vp9 vp9_cuvid ) (encoders: libvpx-vp9 )
 ..V.L. vvc                  
 D.V..S wcmv                 
 DEVILS webp                  (encoders: libwebp )
 DEV.L. wmv1                 
 DEV.L. wmv2                 
 D.V.L. wmv3                 
 D.V.L. wmv3image            
 D.VIL. wnv1                 
 DEV..S wrapped_avframe      
 D.V.L. ws_vqa                (decoders: vqavideo )
 D.V.L. xan_wc3              
 D.V.L. xan_wc4              
 D.VI.. xbin                 
 DEVI.S xbm                  
 DEVIL. xface                
 D.VI.S xpm                  
 DEVI.S xwd                  
 DEVI.S y41p                 
 D.VI.S ylc                  
 D.V.L. yop                  
 DEVI.S yuv4                 
 D.V..S zerocodec            
 DEVI.S zlib                 
 DEV..S zmbv                 
 ..AIL. 4gv                  
 D.AIL. 8svx_exp             
 D.AIL. 8svx_fib             
 DEAIL. aac                   (decoders: aac aac_fixed libfdk_aac ) (encoders: aac libfdk_aac )
 D.AIL. aac_latm             
 DEAIL. ac3                   (decoders: ac3 ac3_fixed ) (encoders: ac3 ac3_fixed )
 D.AIL. acelp.kelvin         
 D.AIL. adpcm_4xm            
 DEAIL. adpcm_adx            
 D.AIL. adpcm_afc            
 D.AIL. adpcm_agm            
 D.AIL. adpcm_aica           
 DEAIL. adpcm_argo           
 D.AIL. adpcm_ct             
 D.AIL. adpcm_dtk            
 D.AIL. adpcm_ea             
 D.AIL. adpcm_ea_maxis_xa    
 D.AIL. adpcm_ea_r1          
 D.AIL. adpcm_ea_r2          
 D.AIL. adpcm_ea_r3          
 D.AIL. adpcm_ea_xas         
 DEAIL. adpcm_g722            (decoders: g722 ) (encoders: g722 )
 DEAIL. adpcm_g726            (decoders: g726 ) (encoders: g726 )
 DEAIL. adpcm_g726le          (decoders: g726le ) (encoders: g726le )
 DEAIL. adpcm_ima_alp        
 DEAIL. adpcm_ima_amv        
 D.AIL. adpcm_ima_apc        
 DEAIL. adpcm_ima_apm        
 D.AIL. adpcm_ima_cunning    
 D.AIL. adpcm_ima_dat4       
 D.AIL. adpcm_ima_dk3        
 D.AIL. adpcm_ima_dk4        
 D.AIL. adpcm_ima_ea_eacs    
 D.AIL. adpcm_ima_ea_sead    
 D.AIL. adpcm_ima_iss        
 D.AIL. adpcm_ima_moflex     
 D.AIL. adpcm_ima_mtf        
 D.AIL. adpcm_ima_oki        
 DEAIL. adpcm_ima_qt         
 D.AIL. adpcm_ima_rad        
 D.AIL. adpcm_ima_smjpeg     
 DEAIL. adpcm_ima_ssi        
 DEAIL. adpcm_ima_wav        
 D.AIL. adpcm_ima_ws         
 DEAIL. adpcm_ms             
 D.AIL. adpcm_mtaf           
 D.AIL. adpcm_psx            
 D.AIL. adpcm_sbpro_2        
 D.AIL. adpcm_sbpro_3        
 D.AIL. adpcm_sbpro_4        
 DEAIL. adpcm_swf            
 D.AIL. adpcm_thp            
 D.AIL. adpcm_thp_le         
 D.AIL. adpcm_vima           
 D.AIL. adpcm_xa             
 DEAIL. adpcm_yamaha         
 D.AIL. adpcm_zork           
 DEAI.S alac                 
 DEAIL. amr_nb                (decoders: amrnb libopencore_amrnb ) (encoders: libopencore_amrnb )
 D.AIL. amr_wb                (decoders: amrwb libopencore_amrwb )
 D.AI.S ape                  
 DEAIL. aptx                 
 DEAIL. aptx_hd              
 D.AIL. atrac1               
 D.AIL. atrac3               
 D.AI.S atrac3al             
 D.AIL. atrac3p               (decoders: atrac3plus )
 D.AI.S atrac3pal             (decoders: atrac3plusal )
 D.AIL. atrac9               
 D.AIL. avc                   (decoders: on2avc )
 D.AIL. binkaudio_dct        
 D.AIL. binkaudio_rdft       
 D.AIL. bmv_audio            
 ..AIL. celt                 
 ..AIL. codec2               
 DEAIL. comfortnoise         
 D.AIL. cook                 
 D.AIL. derf_dpcm            
 D.AIL. dolby_e              
 D.AIL. dsd_lsbf             
 D.AIL. dsd_lsbf_planar      
 D.AIL. dsd_msbf             
 D.AIL. dsd_msbf_planar      
 D.AIL. dsicinaudio          
 D.AIL. dss_sp               
 D.AI.S dst                  
 DEAILS dts                   (decoders: dca ) (encoders: dca )
 D.AIL. dvaudio              
 DEAIL. eac3                 
 D.AIL. evrc                 
 D.AIL. fastaudio            
 DEAI.S flac                 
 DEAIL. g723_1               
 D.AIL. g729                 
 D.AIL. gremlin_dpcm         
 D.AIL. gsm                  
 D.AIL. gsm_ms               
 D.AIL. hca                  
 D.AIL. hcom                 
 D.AIL. iac                  
 D.AIL. ilbc                 
 D.AIL. imc                  
 D.AIL. interplay_dpcm       
 D.AIL. interplayacm         
 D.AIL. mace3                
 D.AIL. mace6                
 D.AIL. metasound            
 DEAI.S mlp                  
 D.AIL. mp1                   (decoders: mp1 mp1float )
 DEAIL. mp2                   (decoders: mp2 mp2float ) (encoders: mp2 mp2fixed )
 DEAIL. mp3                   (decoders: mp3float mp3 ) (encoders: libmp3lame )
 D.AIL. mp3adu                (decoders: mp3adufloat mp3adu )
 D.AIL. mp3on4                (decoders: mp3on4float mp3on4 )
 D.AI.S mp4als                (decoders: als )
 ..A.L. mpegh_3d_audio       
 D.AIL. musepack7             (decoders: mpc7 )
 D.AIL. musepack8             (decoders: mpc8 )
 DEAIL. nellymoser           
 DEAIL. opus                  (decoders: opus libopus ) (encoders: opus libopus )
 D.AIL. paf_audio            
 DEAIL. pcm_alaw             
 D.AI.S pcm_bluray           
 DEAI.S pcm_dvd              
 D.AI.S pcm_f16le            
 D.AI.S pcm_f24le            
 DEAI.S pcm_f32be            
 DEAI.S pcm_f32le            
 DEAI.S pcm_f64be            
 DEAI.S pcm_f64le            
 D.AI.S pcm_lxf              
 DEAIL. pcm_mulaw            
 DEAI.S pcm_s16be            
 DEAI.S pcm_s16be_planar     
 DEAI.S pcm_s16le            
 DEAI.S pcm_s16le_planar     
 DEAI.S pcm_s24be            
 DEAI.S pcm_s24daud          
 DEAI.S pcm_s24le            
 DEAI.S pcm_s24le_planar     
 DEAI.S pcm_s32be            
 DEAI.S pcm_s32le            
 DEAI.S pcm_s32le_planar     
 DEAI.S pcm_s64be            
 DEAI.S pcm_s64le            
 DEAI.S pcm_s8               
 DEAI.S pcm_s8_planar        
 D.AI.S pcm_sga              
 DEAI.S pcm_u16be            
 DEAI.S pcm_u16le            
 DEAI.S pcm_u24be            
 DEAI.S pcm_u24le            
 DEAI.S pcm_u32be            
 DEAI.S pcm_u32le            
 DEAI.S pcm_u8               
 DEAIL. pcm_vidc             
 D.AIL. qcelp                
 D.AIL. qdm2                 
 D.AIL. qdmc                 
 DEAIL. ra_144                (decoders: real_144 ) (encoders: real_144 )
 D.AIL. ra_288                (decoders: real_288 )
 D.AI.S ralf                 
 DEAIL. roq_dpcm             
 DEAI.S s302m                
 DEAIL. sbc                  
 D.AIL. sdx2_dpcm            
 D.AI.S shorten              
 D.AIL. sipr                 
 D.AIL. siren                
 D.AIL. smackaudio            (decoders: smackaud )
 ..AIL. smv                  
 D.AIL. sol_dpcm             
 DEAI.. sonic                
 .EAI.. sonicls              
 ..AIL. speex                
 D.A..S tak                  
 DEA..S truehd               
 D.AIL. truespeech           
 DEAI.S tta                  
 D.AIL. twinvq               
 D.AIL. vmdaudio             
 DEAIL. vorbis                (decoders: vorbis libvorbis ) (encoders: vorbis libvorbis )
 D.AI.. wavesynth            
 DEAILS wavpack              
 D.AIL. westwood_snd1         (decoders: ws_snd1 )
 D.AI.S wmalossless          
 D.AIL. wmapro               
 DEAIL. wmav1                
 DEAIL. wmav2                
 D.AIL. wmavoice             
 D.AIL. xan_dpcm             
 D.AIL. xma1                 
 D.AIL. xma2                 
 ..D... bin_data             
 ..D... dvd_nav_packet       
 ..D... epg                  
 ..D... klv                  
 ..D... mpegts               
 ..D... otf                  
 ..D... scte_35              
 ..D... timed_id3            
 ..D... ttf                  
 D.S... arib_caption          (decoders: libaribb24 )
 DES... ass                   (decoders: ssa ass ) (encoders: ssa ass )
 DES... dvb_subtitle          (decoders: dvbsub ) (encoders: dvbsub )
 ..S... dvb_teletext         
 DES... dvd_subtitle          (decoders: dvdsub ) (encoders: dvdsub )
 D.S... eia_608               (decoders: cc_dec )
 D.S... hdmv_pgs_subtitle     (decoders: pgssub )
 ..S... hdmv_text_subtitle   
 D.S... jacosub              
 D.S... microdvd             
 DES... mov_text             
 D.S... mpl2                 
 D.S... pjs                  
 D.S... realtext             
 D.S... sami                 
 ..S... srt                  
 ..S... ssa                  
 D.S... stl                  
 DES... subrip                (decoders: srt subrip ) (encoders: srt subrip )
 D.S... subviewer            
 D.S... subviewer1           
 DES... text                 
 .ES... ttml                 
 D.S... vplayer              
 DES... webvtt               
 DES... xsub                 

sonarr-autoProcess.ini

[Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels = nvenc, cuvid, vaapi, dxva2, qsv, d3d11va
hwaccel-decoders = h264_cuvid, hevc_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, vp8_cuvid, vp9_cuvid, hevc_qsv, h264_qsv
hwdevices = 
hwaccel-output-format =
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 = False
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 = 480
profile =
max-level = 0.0
pix-fmt =
filter =
force-filter = False

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

[Audio]
codec = aac
languages = eng
default-language = eng
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 128
max-bitrate = 0
max-channels = 2
prefer-more-channels = True
default-more-channels = True
filter =
force-filter = False
sample-rates =
copy-original = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False

[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 = 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 =

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

[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =

[Sonarr]
host = localhost
port = 8989
apikey = <removed>
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False

[Plex]
host = localhost
port = 32400
refresh = False
token =

[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 =

[CouchPotato]
host = localhost
port = 5050
username =
password =
apikey =
delay = 65
method = renamer
delete-failed = False
ssl = False
webroot =

[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
couchpotato-category = couchpotato
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory =
path-mapping =

[Deluge]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username =
password =
output-directory =
remove = False
path-mapping =

[qBittorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before =
action-after =
host = localhost
port = 8080
ssl = False
username =
password =
output-directory =
path-mapping =

[uTorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before =
action-after =
host = localhost
ssl = False
port = 8080
username =
password =
output-directory =
path-mapping =

Docker Compose file entry for Sonarr

  sonarr:
    # image: ghcr.io/linuxserver/sonarr:develop
    # image: mdhiggins/sonarr-sma:build
    image: kahooli/sonarr-sma:build
    container_name: sonarr
    restart: unless-stopped
    networks:
      t2_proxy:
        ipv4_address: 192.168.90.167
    devices:
      - /dev/dri:/dev/dri # for GPU video transcoding
    deploy:
      resources:
        reservations:
          devices:
          - capabilities: [gpu, compute, utility, graphics, video, display]
            driver: nvidia
    security_opt:
      - no-new-privileges:true
    # ports:
    #  - "$SONARR_PORT:8989"
    volumes:
      - $DOCKERDIR/appdata/sonarr:/config
      # Optional. See why MediaCover is mounted as volume https://github.com/htpcBeginner/docker-traefik/discussions/147
      - $CONFIGDIR/sonarr/MediaCover:/config/MediaCover
      - $PUBLICDIR/Downloads:/data/downloads
      - $PUBLICDIR/Videos:/data/videos
      - $DOCKERDIR/shared:/shared
      - /etc/localtime:/etc/localtime:ro
      - $DOCKERDIR/appdata/sonarr-sma:/usr/local/sma/config
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
      SMA_UPDATE: "true"
      SMA_CONFIG: /shared/sma/sonarr-autoProcess.ini
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: all
    build:
      context: https://github.com/kahooli/sonarr-sma.git#build
      args:
        - ffmpeg_tag=4.4-nvidia
        - sonarr_tag=develop
    labels:
      - "traefik.enable=true"
      ## HTTP Routers Auth Bypass
      - "traefik.http.routers.sonarr-rtr-bypass.entrypoints=https"
      - "traefik.http.routers.sonarr-rtr-bypass.rule=Host(`sonarr.$DOMAINNAME`) && (Headers(`X-Api-Key`, `$SONARR_API_KEY`) || Query(`apikey`, `$SONARR_API_KEY`))"
      - "traefik.http.routers.sonarr-rtr-bypass.priority=100"
      ## HTTP Routers Auth
      - "traefik.http.routers.sonarr-rtr.entrypoints=https"
      - "traefik.http.routers.sonarr-rtr.rule=Host(`sonarr.$DOMAINNAME`)"
      - "traefik.http.routers.sonarr-rtr.priority=99"
      ## Middlewares
      - "traefik.http.routers.sonarr-rtr-bypass.middlewares=chain-no-auth@file"
      - "traefik.http.routers.sonarr-rtr.middlewares=chain-oauth@file"
      ## HTTP Services
      - "traefik.http.routers.sonarr-rtr.service=sonarr-svc"
      - "traefik.http.routers.sonarr-rtr-bypass.service=sonarr-svc"
      - "traefik.http.services.sonarr-svc.loadbalancer.server.port=8989"
mdhiggins commented 3 years ago

Looks like this is the result of the scale_npp filter failing, I'm guessing if you removed that filter from your command things would work fine. Feel free to test this.

I think you might need to set hwaccels and hwaccel-output-format, try adding cuda to the front of hwaccels and set the hwaccel-output-format to cuda as well and see if that helps, feel free to post the output

KaHooli commented 3 years ago

Updated autoProcess.ini file

[Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels = cuda, nvenc, cuvid, vaapi, dxva2, qsv, d3d11va
hwaccel-decoders = h264_cuvid, hevc_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, vp8_cuvid, vp9_cuvid, hevc_qsv, h264_qsv
hwdevices = 
hwaccel-output-format = cuda
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 = False
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 = 480
profile =
max-level = 0.0
pix-fmt =
filter =
force-filter = False

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

[Audio]
codec = aac
languages = eng
default-language = eng
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 128
max-bitrate = 0
max-channels = 2
prefer-more-channels = True
default-more-channels = True
filter =
force-filter = False
sample-rates =
copy-original = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False

[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 = 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 =

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

[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =

[Sonarr]
host = localhost
port = 8989
apikey = <removed for privacy>
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False

[Plex]
host = localhost
port = 32400
refresh = False
token =

[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 =

[CouchPotato]
host = localhost
port = 5050
username =
password =
apikey =
delay = 65
method = renamer
delete-failed = False
ssl = False
webroot =

[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
couchpotato-category = couchpotato
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory =
path-mapping =

[Deluge]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username =
password =
output-directory =
remove = False
path-mapping =

[qBittorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before =
action-after =
host = localhost
port = 8080
ssl = False
username =
password =
output-directory =
path-mapping =

[uTorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before =
action-after =
host = localhost
ssl = False
port = 8080
username =
password =
output-directory =
path-mapping =

Output of script...

root@f6e858a8c80b:/# ${SMA_PATH}/venv/bin/python3 ${SMA_PATH}/manual.py -i /data/videos/TV\ Shows/Blue\ Bloods/Season\ 11/Blue\ Bloods\ -\ S11E16\ -\ Justifies\ the\ Means\ \(2\).mkv
Manual processor started.
Python 64-bit 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0].
Guessit version: 3.3.1.
/usr/local/sma/venv/bin/python3
Loading config file /shared/sma/sonarr-autoProcess.ini.
Force-convert is true, so process-same-extensions is being overridden to true as well
Input Data
{
    "format": "matroska,webm",
    "format-fullname": "unknown",
    "video": {
        "index": 0,
        "codec": "h264",
        "pix_fmt": "yuv420p",
        "profile": "100",
        "fps": 24.0,
        "framedata": {
            "pix_fmt": "yuv420p",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "640x480",
        "level": 3.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "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": []
}
Reading video stream.
Video codec detected: h264.
Pix Fmt: yuv420p.
Profile: 100.
Video codec parameters None.
Creating hevc_nvenc video stream from source stream 0.
Reading audio streams.
Audio detected for stream 1 - eac3 eng 6 channel.
Creating aac audio stream source audio stream 1 [universal-audio].
Creating aac audio stream from source stream 1.
Default audio stream set to eng aac 2 channel stream [default-more-channels: True].
Reading subtitle streams.
Text-based subtitle detected for stream 2 - ass eng.
Creating mov_text subtitle stream from source stream 2.
Scanned for external subtitles and found 0 results in your approved languages.
cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels].
Output Data
{
    "source": [
        "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "hevc_nvenc",
        "map": 0,
        "bitrate": 340.8581,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": 480,
        "filter": null,
        "params": null,
        "framedata": null,
        "title": "SD",
        "debug": "video.max-width"
    },
    "audio": [
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "samplerate": null,
            "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",
            "title": "Stereo",
            "debug": "universal-audio"
        },
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "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",
            "samplerate": null,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "Stereo",
            "debug": "audio.max-channels"
        }
    ],
    "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": []
}
Preopts
[
    "-fix_sub_duration",
    "-hwaccel",
    "cuda"
]
Postopts
[
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
Starting conversion.
FFmpeg command:
======================
/usr/local/bin/ffmpeg -fix_sub_duration -hwaccel cuda -i "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv" -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 340k -metadata:s:v BPS=340000 -metadata:s:v BPS-eng=340000 -metadata:s:v title=SD -metadata:s:v handler_name=SD -vf scale_npp=480:360 -tag:v hvc1 -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 -filter:a:0 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:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c: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 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 -y "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4"
======================
[                    ] 0% Error converting file, FFMPEG error.
Traceback (most recent call last):
  File "/usr/local/sma/resources/mediaprocessor.py", line 1613, in convert
    for timecode, debug in conv:
  File "/usr/local/sma/converter/__init__.py", line 317, in convert
    for timecode, debug in self.ffmpeg.convert(outfile,
  File "/usr/local/sma/converter/ffmpeg.py", line 723, in convert
    raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd,
converter.ffmpeg.FFMpegConvertError: <unprintable FFMpegConvertError object>
/usr/local/bin/ffmpeg -fix_sub_duration -hwaccel cuda -i /data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 340k -metadata:s:v BPS=340000 -metadata:s:v BPS-eng=340000 -metadata:s:v title=SD -metadata:s:v handler_name=SD -vf scale_npp=480:360 -tag:v hvc1 -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 -filter:a:0 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:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c: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 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 -y /data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, matroska,webm, from '/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv':
  Metadata:
    ENCODER         : Lavf58.31.101
  Duration: 00:42:11.97, start: 0.000000, bitrate: 998 kb/s
  Stream #0:0: Video: h264, yuv420p(progressive), 640x480 [SAR 4:3 DAR 16:9], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Metadata:
      ENCODER         : Lavc58.55.100 libx264
      DURATION        : 00:42:11.959000000
  Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      DURATION        : 00:42:11.968000000
  Stream #0:2(eng): Subtitle: ass
    Metadata:
      title           : English
      ENCODER         : Lavc58.55.100 ssa
      DURATION        : 00:41:35.928000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
  Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
  Stream #0:1 -> #0:2 (eac3 (native) -> aac (native))
  Stream #0:2 -> #0:3 (ass (ssa) -> mov_text (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[aac @ 0x55b8990e1b00] Qavg: 65536.000
[aac @ 0x55b8990e1b00] 2 frames left in the queue on closing
[aac @ 0x55b8990e27c0] Qavg: 65536.000
[aac @ 0x55b8990e27c0] 2 frames left in the queue on closing
Conversion failed!

/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4 deleted.
There was an error processing file /data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv, no output data received
mdhiggins commented 3 years ago

Sorry was on mobile before

hwaccel-output-format is a dict and should be hwaccel-output-format = cuda:cuda

You could also try adding h264_cuda, hevc_cuda to your decoder list though I'm not sure if that's required, you can see if these are valid decoders for your FFMPEG build by running ffmpeg -decoders

Any decoders you list are checked against your FFMPEG build for availability prior to being applied though so no risk if its not available

KaHooli commented 3 years ago

It looks like that has worked, thank you! :partying_face:

Below is the changes and outputs for review and the record.

ffmpeg -decoders output...

root@f6e858a8c80b:/# ffmpeg -decoders
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Decoders:
 V..... = Video
 A..... = Audio
 S..... = Subtitle
 .F.... = Frame-level multithreading
 ..S... = Slice-level multithreading
 ...X.. = Codec is experimental
 ....B. = Supports draw_horiz_band
 .....D = Supports direct rendering method 1
 ------
 V....D 012v
 V....D 4xm
 V....D 8bps
 V....D aasc
 V....D agm
 VF...D aic
 V....D alias_pix
 V....D amv
 V....D anm
 V....D ansi
 VF...D apng
 V....D arbc
 V....D argo
 V....D asv1
 V....D asv2
 V....D aura
 V....D aura2
 V....D libaom-av1            (codec av1)
 V....D av1
 V....D avrn
 V....D avrp
 V....D avs
 V....D avui
 V....D ayuv
 V....D bethsoftvid
 V....D bfi
 V....D binkvideo
 V....D bintext
 V..X.. bitpacked
 V....D bmp
 V....D bmv_video
 V....D brender_pix
 V....D c93
 V....D cavs
 V....D cdgraphics
 V....D cdtoons
 V....D cdxl
 VF...D cfhd
 V....D cinepak
 V....D clearvideo
 V....D cljr
 VF...D cllc
 V....D eacmv                 (codec cmv)
 V....D cpia
 VF...D cri
 V....D camstudio             (codec cscd)
 V....D cyuv
 V.S..D dds
 V....D dfa
 V.S..D dirac
 VFS..D dnxhd
 V....D dpx
 V....D dsicinvideo
 VFS..D dvvideo
 V....D dxa
 VF...D dxtory
 VFS..D dxv
 V....D escape124
 V....D escape130
 VFS..D exr
 VFS..D ffv1
 VF..BD ffvhuff
 V.S..D fic
 V....D fits
 V....D flashsv
 V....D flashsv2
 V....D flic
 V...BD flv                   (codec flv1)
 V....D fmvc
 VF...D fraps
 V....D frwu
 V....D g2m
 V....D gdv
 V....D gif
 V....D h261
 V...BD h263
 V..... h263_v4l2m2m          (codec h263)
 V...BD h263i
 V...BD h263p
 VFS..D h264
 V..... h264_v4l2m2m          (codec h264)
 V..... h264_cuvid            (codec h264)
 VFS..D hap
 VFS..D hevc
 V..... hevc_v4l2m2m          (codec hevc)
 V..... hevc_cuvid            (codec hevc)
 V....D hnm4video
 V....D hq_hqa
 VFS..D hqx
 VF..BD huffyuv
 VF..BD hymt
 V....D idcinvideo            (codec idcin)
 V....D idf
 V....D iff                   (codec iff_ilbm)
 V....D imm4
 V..... imm5
 V....D indeo2
 V....D indeo3
 V....D indeo4
 V....D indeo5
 V....D interplayvideo
 V....D ipu
 VFS..D jpeg2000
 VF...D libopenjpeg           (codec jpeg2000)
 V....D jpegls
 V....D jv
 V....D kgv1
 V....D kmvc
 VF...D lagarith
 V....D loco
 V....D lscr
 V....D m101
 V....D eamad                 (codec mad)
 VFS..D magicyuv
 VF...D mdec
 VF...D mimic
 V....D mjpeg
 V..... mjpeg_cuvid           (codec mjpeg)
 V....D mjpegb
 V....D mmvideo
 V....D mobiclip
 V....D motionpixels
 V.S.BD mpeg1video
 V..... mpeg1_v4l2m2m         (codec mpeg1video)
 V..... mpeg1_cuvid           (codec mpeg1video)
 V.S.BD mpeg2video
 V.S.BD mpegvideo             (codec mpeg2video)
 V..... mpeg2_v4l2m2m         (codec mpeg2video)
 V..... mpeg2_cuvid           (codec mpeg2video)
 VF..BD mpeg4
 V..... mpeg4_v4l2m2m         (codec mpeg4)
 V..... mpeg4_cuvid           (codec mpeg4)
 V....D msa1
 V....D mscc
 V...BD msmpeg4v1
 V...BD msmpeg4v2
 V...BD msmpeg4               (codec msmpeg4v3)
 V....D msp2
 V....D msrle
 V....D mss1
 V....D mss2
 V....D msvideo1
 VF...D mszh
 V....D mts2
 V....D mv30
 V....D mvc1
 V....D mvc2
 V....D mvdv
 V....D mvha
 V....D mwsc
 V....D mxpeg
 VF...D notchlc
 V....D nuv
 V....D paf_video
 V....D pam
 V....D pbm
 V....D pcx
 V....D pfm
 V....D pgm
 V....D pgmyuv
 V....D pgx
 VF...D photocd
 V....D pictor
 VF...D pixlet
 VF...D png
 V....D ppm
 VFS..D prores
 V....D prosumer
 VF...D psd
 V....D ptx
 V....D qdraw
 V....D qpeg
 V....D qtrle
 V....D r10k
 V....D r210
 V....D rasc
 V..... rawvideo
 V....D rl2
 V....D roqvideo              (codec roq)
 V....D rpza
 V....D rscc
 V....D rv10
 V....D rv20
 VF...D rv30
 VF...D rv40
 V....D sanm
 V....D scpr
 V....D screenpresso
 V....D sga
 V....D sgi
 V....D sgirle
 VF...D sheervideo
 V....D simbiosis_imx
 V....D smackvid              (codec smackvideo)
 V....D smc
 V....D smvjpeg
 V....D snow
 V....D sp5x
 V....D speedhq
 V....D srgc
 V....D sunrast
 V....D svq1
 V...BD svq3
 V....D targa
 V....D targa_y216
 V....D tdsc
 V....D eatgq                 (codec tgq)
 V....D eatgv                 (codec tgv)
 VF..BD theora
 V....D thp
 V....D tiertexseqvideo
 VF...D tiff
 V....D tmv
 V....D eatqi                 (codec tqi)
 V....D truemotion1
 V....D truemotion2
 V....D truemotion2rt
 V....D camtasia              (codec tscc)
 V....D tscc2
 V....D txd
 V....D ultimotion            (codec ulti)
 VF...D utvideo
 VFS..D v210
 V....D v210x
 V....D v308
 V....D v408
 VFS..D v410
 V....D vb
 VF...D vble
 V....D vc1
 V..... vc1_v4l2m2m           (codec vc1)
 V..... vc1_cuvid             (codec vc1)
 V....D vc1image
 V....D vcr1
 V....D xl                    (codec vixl)
 V....D vmdvideo
 V....D vmnc
 VF..BD vp3
 VF..BD vp4
 V....D vp5
 V....D vp6
 V.S..D vp6a
 V....D vp6f
 V....D vp7
 VFS..D vp8
 V..... vp8_v4l2m2m           (codec vp8)
 V....D libvpx                (codec vp8)
 V..... vp8_cuvid             (codec vp8)
 VFS..D vp9
 V..... vp9_v4l2m2m           (codec vp9)
 V..... libvpx-vp9            (codec vp9)
 V..... vp9_cuvid             (codec vp9)
 V....D wcmv
 VF...D webp
 V...BD wmv1
 V...BD wmv2
 V....D wmv3
 V....D wmv3image
 V....D wnv1
 V..... wrapped_avframe
 V....D vqavideo              (codec ws_vqa)
 V....D xan_wc3
 V....D xan_wc4
 V....D xbin
 V....D xbm
 V..... xface
 V....D xpm
 V....D xwd
 V....D y41p
 VF...D ylc
 V..... yop
 V....D yuv4
 V....D zerocodec
 VF...D zlib
 V....D zmbv
 A....D 8svx_exp
 A....D 8svx_fib
 A....D aac
 A....D aac_fixed             (codec aac)
 A....D libfdk_aac            (codec aac)
 A....D aac_latm
 A....D ac3
 A....D ac3_fixed             (codec ac3)
 A....D acelp.kelvin
 A....D adpcm_4xm
 A....D adpcm_adx
 A....D adpcm_afc
 A....D adpcm_agm
 A....D adpcm_aica
 A....D adpcm_argo
 A....D adpcm_ct
 A....D adpcm_dtk
 A....D adpcm_ea
 A....D adpcm_ea_maxis_xa
 A....D adpcm_ea_r1
 A....D adpcm_ea_r2
 A....D adpcm_ea_r3
 A....D adpcm_ea_xas
 A....D g722                  (codec adpcm_g722)
 A....D g726                  (codec adpcm_g726)
 A....D g726le                (codec adpcm_g726le)
 A....D adpcm_ima_alp
 A....D adpcm_ima_amv
 A....D adpcm_ima_apc
 A....D adpcm_ima_apm
 A....D adpcm_ima_cunning
 A....D adpcm_ima_dat4
 A....D adpcm_ima_dk3
 A....D adpcm_ima_dk4
 A....D adpcm_ima_ea_eacs
 A....D adpcm_ima_ea_sead
 A....D adpcm_ima_iss
 A....D adpcm_ima_moflex
 A....D adpcm_ima_mtf
 A....D adpcm_ima_oki
 A....D adpcm_ima_qt
 A....D adpcm_ima_rad
 A....D adpcm_ima_smjpeg
 A....D adpcm_ima_ssi
 A....D adpcm_ima_wav
 A....D adpcm_ima_ws
 A....D adpcm_ms
 A....D adpcm_mtaf
 A....D adpcm_psx
 A....D adpcm_sbpro_2
 A....D adpcm_sbpro_3
 A....D adpcm_sbpro_4
 A....D adpcm_swf
 A....D adpcm_thp
 A....D adpcm_thp_le
 A....D adpcm_vima
 A....D adpcm_xa
 A....D adpcm_yamaha
 A....D adpcm_zork
 AF...D alac
 A....D amrnb                 (codec amr_nb)
 A....D libopencore_amrnb     (codec amr_nb)
 A....D amrwb                 (codec amr_wb)
 A....D libopencore_amrwb     (codec amr_wb)
 A....D ape
 A....D aptx
 A....D aptx_hd
 A....D atrac1
 A....D atrac3
 A....D atrac3al
 A....D atrac3plus            (codec atrac3p)
 A....D atrac3plusal          (codec atrac3pal)
 A....D atrac9
 A....D on2avc                (codec avc)
 A....D binkaudio_dct
 A....D binkaudio_rdft
 A....D bmv_audio
 A....D comfortnoise
 A....D cook
 A....D derf_dpcm
 A....D dolby_e
 A.S..D dsd_lsbf
 A.S..D dsd_lsbf_planar
 A.S..D dsd_msbf
 A.S..D dsd_msbf_planar
 A....D dsicinaudio
 A....D dss_sp
 A....D dst
 A....D dca                   (codec dts)
 A....D dvaudio
 A....D eac3
 A....D evrc
 A....D fastaudio
 AF...D flac
 A....D g723_1
 A....D g729
 A....D gremlin_dpcm
 A....D gsm
 A....D gsm_ms
 A....D hca
 A....D hcom
 A....D iac
 A....D ilbc
 A....D imc
 A....D interplay_dpcm
 A....D interplayacm
 A....D mace3
 A....D mace6
 A....D metasound
 A....D mlp
 A....D mp1
 A....D mp1float              (codec mp1)
 A....D mp2
 A....D mp2float              (codec mp2)
 A....D mp3float              (codec mp3)
 A....D mp3
 A....D mp3adufloat           (codec mp3adu)
 A....D mp3adu
 A....D mp3on4float           (codec mp3on4)
 A....D mp3on4
 A....D als                   (codec mp4als)
 A....D mpc7                  (codec musepack7)
 A....D mpc8                  (codec musepack8)
 A....D nellymoser
 A....D opus
 A....D libopus               (codec opus)
 A....D paf_audio
 A....D pcm_alaw
 A....D pcm_bluray
 A....D pcm_dvd
 A....D pcm_f16le
 A....D pcm_f24le
 A....D pcm_f32be
 A....D pcm_f32le
 A....D pcm_f64be
 A....D pcm_f64le
 A....D pcm_lxf
 A....D pcm_mulaw
 A....D pcm_s16be
 A....D pcm_s16be_planar
 A....D pcm_s16le
 A....D pcm_s16le_planar
 A....D pcm_s24be
 A....D pcm_s24daud
 A....D pcm_s24le
 A....D pcm_s24le_planar
 A....D pcm_s32be
 A....D pcm_s32le
 A....D pcm_s32le_planar
 A....D pcm_s64be
 A....D pcm_s64le
 A....D pcm_s8
 A....D pcm_s8_planar
 A....D pcm_sga
 A....D pcm_u16be
 A....D pcm_u16le
 A....D pcm_u24be
 A....D pcm_u24le
 A....D pcm_u32be
 A....D pcm_u32le
 A....D pcm_u8
 A....D pcm_vidc
 A....D qcelp
 A....D qdm2
 A....D qdmc
 A....D real_144              (codec ra_144)
 A....D real_288              (codec ra_288)
 A....D ralf
 A....D roq_dpcm
 A....D s302m
 A....D sbc
 A....D sdx2_dpcm
 A....D shorten
 A....D sipr
 A....D siren
 A....D smackaud              (codec smackaudio)
 A....D sol_dpcm
 A..X.D sonic
 AF...D tak
 A....D truehd
 A....D truespeech
 AF...D tta
 A....D twinvq
 A....D vmdaudio
 A....D vorbis
 A..... libvorbis             (codec vorbis)
 A....D wavesynth
 AFS..D wavpack
 A....D ws_snd1               (codec westwood_snd1)
 A....D wmalossless
 A....D wmapro
 A....D wmav1
 A....D wmav2
 A....D wmavoice
 A....D xan_dpcm
 A....D xma1
 A....D xma2
 S..... libaribb24            (codec arib_caption)
 S..... ssa                   (codec ass)
 S..... ass
 S..... dvbsub                (codec dvb_subtitle)
 S..... dvdsub                (codec dvd_subtitle)
 S..... cc_dec                (codec eia_608)
 S..... pgssub                (codec hdmv_pgs_subtitle)
 S..... jacosub
 S..... microdvd
 S..... mov_text
 S..... mpl2
 S..... pjs
 S..... realtext
 S..... sami
 S..... stl
 S..... srt                   (codec subrip)
 S..... subrip
 S..... subviewer
 S..... subviewer1
 S..... text
 S..... vplayer
 S..... webvtt
 S..... xsub

sonarr-autoProcess.ini

[Converter]
ffmpeg = /usr/local/bin/ffmpeg
ffprobe = /usr/local/bin/ffprobe
threads = 0
hwaccels = cuda, nvenc, cuvid, vaapi, dxva2, qsv, d3d11va
hwaccel-decoders = h264_cuda, hevc_cuda, h264_cuvid, hevc_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid, vp8_cuvid, vp9_cuvid, hevc_qsv, h264_qsv
hwdevices =
hwaccel-output-format = cuda:cuda
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 = False
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 = 480
profile =
max-level = 0.0
pix-fmt =
filter =
force-filter = False

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

[Audio]
codec = aac
languages = eng
default-language = eng
first-stream-of-language = False
allow-language-relax = True
channel-bitrate = 128
max-bitrate = 0
max-channels = 2
prefer-more-channels = True
default-more-channels = True
filter =
force-filter = False
sample-rates =
copy-original = False
aac-adtstoasc = False
ignore-truehd = mp4, m4v
ignored-dispositions =
unique-dispositions = False

[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 = 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 =

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

[Subtitle.Subliminal.Auth]
opensubtitles =
tvsubtitles =

[Sonarr]
host = localhost
port = 8989
apikey = <removed>
ssl = False
webroot =
force-rename = False
rescan = True
block-reprocess = False

[Plex]
host = localhost
port = 32400
refresh = False
token =

[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 =

[CouchPotato]
host = localhost
port = 5050
username =
password =
apikey =
delay = 65
method = renamer
delete-failed = False
ssl = False
webroot =

[SABNZBD]
convert = True
sickbeard-category = sickbeard
sickrage-category = sickrage
couchpotato-category = couchpotato
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
output-directory =
path-mapping =

[Deluge]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
host = localhost
port = 58846
username =
password =
output-directory =
remove = False
path-mapping =

[qBittorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
action-before =
action-after =
host = localhost
port = 8080
ssl = False
username =
password =
output-directory =
path-mapping =

[uTorrent]
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sickrage-label = sickrage
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
convert = True
webui = False
action-before =
action-after =
host = localhost
ssl = False
port = 8080
username =
password =
output-directory =
path-mapping =

SMA output...

root@f6e858a8c80b:/# ${SMA_PATH}/venv/bin/python3 ${SMA_PATH}/manual.py -i /data/videos/TV\ Shows/Blue\ Bloods/Season\ 11/Blue\ Bloods\ -\ S11E16\ -\ Justifies\ the\ Means\ \(2\).mkv
Manual processor started.
Python 64-bit 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0].
Guessit version: 3.3.1.
/usr/local/sma/venv/bin/python3
Loading config file /shared/sma/sonarr-autoProcess.ini.
Force-convert is true, so process-same-extensions is being overridden to true as well
Input Data
{
    "format": "matroska,webm",
    "format-fullname": "unknown",
    "video": {
        "index": 0,
        "codec": "h264",
        "pix_fmt": "yuv420p",
        "profile": "100",
        "fps": 24.0,
        "framedata": {
            "pix_fmt": "yuv420p",
            "side_data_list": [
                {
                    "side_data_type": "H.26[45] User Data Unregistered SEI message"
                }
            ]
        },
        "dimensions": "640x480",
        "level": 3.0,
        "field_order": "progressive"
    },
    "audio": [
        {
            "index": 1,
            "codec": "eac3",
            "bitrate": 640000,
            "channels": 6,
            "samplerate": 48000,
            "language": "eng",
            "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": []
}
Reading video stream.
Video codec detected: h264.
Pix Fmt: yuv420p.
Profile: 100.
Video codec parameters None.
Creating hevc_nvenc video stream from source stream 0.
Reading audio streams.
Audio detected for stream 1 - eac3 eng 6 channel.
Creating aac audio stream source audio stream 1 [universal-audio].
Creating aac audio stream from source stream 1.
Default audio stream set to eng aac 2 channel stream [default-more-channels: True].
Reading subtitle streams.
Text-based subtitle detected for stream 2 - ass eng.
Creating mov_text subtitle stream from source stream 2.
Scanned for external subtitles and found 0 results in your approved languages.
cuda hwaccel is supported by this ffmpeg build and will be used [hwaccels].
Output Data
{
    "source": [
        "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv"
    ],
    "format": "mp4",
    "video": {
        "codec": "hevc_nvenc",
        "map": 0,
        "bitrate": 340.8581,
        "crf": -1,
        "maxrate": null,
        "bufsize": null,
        "level": 0.0,
        "profile": null,
        "preset": null,
        "pix_fmt": null,
        "field_order": "progressive",
        "width": 480,
        "filter": null,
        "params": null,
        "framedata": null,
        "title": "SD",
        "debug": "video.max-width"
    },
    "audio": [
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "samplerate": null,
            "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",
            "title": "Stereo",
            "debug": "universal-audio"
        },
        {
            "map": 1,
            "codec": "aac",
            "channels": 2,
            "bitrate": 256,
            "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",
            "samplerate": null,
            "language": "eng",
            "disposition": "-default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired",
            "bsf": null,
            "title": "Stereo",
            "debug": "audio.max-channels"
        }
    ],
    "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": []
}
Preopts
[
    "-fix_sub_duration",
    "-hwaccel",
    "cuda",
    "-hwaccel_output_format",
    "cuda"
]
Postopts
[
    "-threads",
    "0",
    "-metadata:g",
    "encoding_tool=SMA"
]
Starting conversion.
FFmpeg command:
======================
/usr/local/bin/ffmpeg -fix_sub_duration -hwaccel cuda -hwaccel_output_format cuda -i "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mkv" -vcodec hevc_nvenc -map 0:0 -field_order progressive -vb 340k -metadata:s:v BPS=340000 -metadata:s:v BPS-eng=340000 -metadata:s:v title=SD -metadata:s:v handler_name=SD -vf scale_npp=480:360 -tag:v hvc1 -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 -filter:a:0 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:0 title=Stereo -metadata:s:a:0 handler_name=Stereo -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -strict experimental -c: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 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 -y "/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4"
======================
[####################] 100%
/data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4 created.
Matched TV episode as Blue Bloods (TMDB ID: 32692) S11E16
Proceed using guessed identification from filename?
# [y/n]: y
Processing Blue Bloods Season 11 Episode 16 - Justifies the Means (2)
Tagging file: /data/videos/TV Shows/Blue Bloods/Season 11/Blue Bloods - S11E16 - Justifies the Means (2).mp4.
Trying to write tags.
Tags written successfully using mutagen.
Relocating MOOV atom to start of file.
root@f6e858a8c80b:/#
mdhiggins commented 3 years ago

Nice, glad its working, going to close this

This is actually optimal as now you're using full hwacceleration as opposed to just at the encoder level so you should see some performance benefits