• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Low bitrate for rare frames during transcoding

     
    • 0 Vote(s) - 0 Average

    Low bitrate for rare frames during transcoding

    vessd
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #1
    2024-03-25, 07:15 PM
    Hello

    I'm using Jellyfin with an AMD Radeon RX 6600 for transcoding on Arch Linux with VAAPI for my Android TV

    jellyfin-ffmpeg 1:6.0.1p1-2
    jellyfin-server 10.8.13-1
    jellyfin-androidtv 0.16.7

    Most of the time the picture quality is good, but sometimes there are low quality frames.
    Rare
       
    Most of the time
       

    It doesn't look like I'm running out of resources for transcoding, the system is almost idle
           

    Are there any settings I could try to change? As I understand it, the CRF parameter does not affect the quality of the VAAPI encoder
    Transcoding settings
       
    FFmpeg log
    .txt   FFmpeg.Transcode-2024-03-25_21-53-30.txt (Size: 91.62 KB / Downloads: 61)
    nyanmisaka
    Offline

    Team Member

    Posts: 231
    Threads: 0
    Joined: 2023 Jun
    Reputation: 8
    #2
    2024-03-25, 07:40 PM (This post was last modified: 2024-03-25, 07:53 PM by nyanmisaka. Edited 1 time in total.)
    AMD's rate control in encoding H264 and HEVC is terrible. I don't think they can encode a decent 1080p HEVC stream at 4000kbps. VA-API is even worse than Windows AMF.
    Especially when the content of the picture changes drastically. We should probably increase the default bitrate multiplier for AMD.

    You can try playing around with these parameters in the ffmpeg command line and give your feedback. -rc_mode VBR -b:v 4359887 -maxrate 4359887 -bufsize 8719774
    Fate
    Offline

    Member

    Posts: 213
    Threads: 3
    Joined: 2023 Jun
    Reputation: 15
    #3
    2024-03-25, 08:50 PM
    (2024-03-25, 07:40 PM)nyanmisaka Wrote: AMD's rate control in encoding H264 and HEVC is terrible. I don't think they can encode a decent 1080p HEVC stream at 4000kbps. VA-API is even worse than Windows AMF.
    Especially when the content of the picture changes drastically. We should probably increase the default bitrate multiplier for AMD.

    You can try playing around with these parameters in the ffmpeg command line and give your feedback. -rc_mode VBR -b:v 4359887 -maxrate 4359887 -bufsize 8719774

    I have to agree here somewhat.
    AMDs ratecontrol is really struggling with ratecontrol in VBR/VBV.
    Increasing bufsize should help a bit.
    vessd
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #4
    2024-03-26, 06:39 AM
    Thanks, I tried increasing the buffer and it fixed this case.
    It looks like right now the buffer size is the bitrate x2, I increased it to x3 (-rc_mode VBR -b:v 4359887 -maxrate 4359887 -bufsize 13079661)

    Before
       
    File size: 970 KiB
    Duration: 2 s 961 ms
    Overall bit rate mode: Variable
    Overall bit rate: 2 616 kb/s

    After
       
    File size: 1.66 MiB
    Duration: 2 s 961 ms
    Overall bit rate mode: Variable
    Overall bit rate: 4 511 kb/s

    In general, I did not notice an increase in resource consumption, only transcoded files began to take up a little more space.

    Before
    Code:
    $ du -sh /media/transcoding
    802M /media/transcoding

    After
    Code:
    $ du -sh /media/transcoding
    838M /media/transcoding

    Should I look for a minimum buffer size that will fix this case? 

    P.S. Code block formatting on this forum is a joke
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode