VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 3 of 3
  1. Member jeffshead's Avatar
    Join Date
    Feb 2004
    United States
    Search Comp PM
    I recently replaced an Android TV box with a NVIDIA Shield TV. Kodi 17.6 has issues on the Shield 7.2.2 so I installed Kodi 18. That fixed the original issues but now none of my AVI's will play unless I change the Kodi settings to eliminate HW acceleration. That of course causes issues with other file types.

    I have used a few different "AVI fixer" apps which found no issues with my AVI files and I have even changed the container to MKV. That did not help. The files are old and someone suggested that GMC2 / QPel may be the problem. I have come to the conclusion that the only option is to re-encode them. I believe the older versions of Kodi automatically turned off HW acceleration for files smaller than 800 pixels wide but Kodi 18 does not do this. I went out and bought a GeForce GTX 1060 card and used ffmpeg but the resulting files are almost twice as large as the originals and I see a degrade in quality. Below is the command line I used:

    for /R %%I in (*.avi) do ffmpeg -i "%%I" -c:v hevc_nvenc -preset slow -cq 18 -g 150 -c:a aac -b:a 160k "%%~nI.mkv" & echo del "%%I"
    There must be a happy compromise. Can someone please suggest some other commands or software and settings for me to try? There must be a way to see little to no quality loss converting to h.265 without increasing the file size, isn't there?

    Below is a link to one of the hundreds of files I want to convert:

    AVI file (135 MB):

    Complete name                            : C:\1.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 136 MiB
    Duration                                 : 22 min 26 s
    Overall bit rate                         : 845 kb/s
    Writing application                      : VirtualDubMod (build 1639/release)
    Writing library                          : VirtualDubMod build 1639/release
    ID                                       : 0
    Format                                   : MPEG-4 Visual
    Format profile                           : Advanced Simple@L3
    Format settings                          : GMC2 / QPel
    Format settings, BVOP                    : No
    Format settings, QPel                    : Yes
    Format settings, GMC                     : 2 warppoints
    Format settings, Matrix                  : Default (H.263)
    Codec ID                                 : XVID
    Codec ID/Hint                            : XviD
    Duration                                 : 22 min 26 s
    Bit rate                                 : 643 kb/s
    Width                                    : 640 pixels
    Height                                   : 480 pixels
    Display aspect ratio                     : 4:3
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.087
    Stream size                              : 103 MiB (76%)
    Writing library                          : XviD 0.0.09 (UTC 2003-03-25)
    ID                                       : 1
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Format settings                          : Joint stereo / MS Stereo
    Codec ID                                 : 55
    Codec ID/Hint                            : MP3
    Duration                                 : 22 min 26 s
    Bit rate mode                            : Constant
    Bit rate                                 : 192 kb/s
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 kHz
    Compression mode                         : Lossy
    Stream size                              : 30.8 MiB (23%)
    Alignment                                : Split accross interleaves
    Interleave, duration                     : 42  ms (1.00 video frame)
    Interleave, preload duration             : 464  ms
    I have many files so I thought using hevc_nvenc would be the best option.
    Last edited by jeffshead; 3rd Feb 2019 at 14:57.
    Quote Quote  
  2. Below something that worked for h.264 - try to match similar for hevc - have no NVidia hardware thus unable to help you more. Consult with latest NVidia NVenc recommendations, also remember to upgrade driver to newest possible version.

    @ffmpeg.exe -hide_banner -v 32 -stats -y -i "%filename%" -vf %vproc% -c:v h264_nvenc -level:v 4.0 -preset:v hq -profile:v high -cq %vq% -qmin:v 8 -qmax:v 29 -bufsize:v 10000k -maxrate:v 20000k -g 250 -bf 3 -refs:v 3 -rc:v vbr_hq -rc-lookahead 32 -b_adapt 1 -temporal-aq 1 -spatial-aq 1 -i_qfactor 0.75 -b_qfactor 1.1 -coder:v cabac -bluray-compat 1 -aud 1 -aq-strength 8 -af %aproc% -c:a ac3 -b:a %ab%k "%~n1_delogdaudnv.mkv"
    Quote Quote  
  3. Member
    Join Date
    Feb 2019
    Search Comp PM
    try testing with only converting the audio to aac, and copy the video track into an mp4 container
    Last edited by cajon; 11th Feb 2019 at 14:51. Reason: missread the question
    Quote Quote  

Similar Threads