• 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 Off Topic General Discussion Encoding Discussion Megathread (ffmpeg, Handbrake, AV1, etc...)

    Pages (12): « Previous 1 … 5 6 7 8 9 … 12 Next »
     

     
    • 0 Vote(s) - 0 Average

    Encoding Discussion Megathread (ffmpeg, Handbrake, AV1, etc...)

    Bring your resources, guides, questions, suggestions, cluelessness. All is welcome.
    bitmap
    Offline

    Community Moderator

    Posts: 781
    Threads: 9
    Joined: 2023 Jul
    Reputation: 24
    #61
    2023-10-09, 06:34 PM
    Quote:I know Rokus ask for H265.

    I've heard this a lot, but every transcode my Rokus receive is H264. I've never seen H265 requested or received. Any idea where this info comes from or is documented @TheDreadPirate? Or how I can make this behavior happen? Not that it matters all that much, but when traveling, H265 over my hotspot would be much higher quality than bloated H264.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #62
    2023-10-09, 06:38 PM
    (2023-10-09, 06:34 PM)bitmap Wrote:
    Quote:I know Rokus ask for H265.

    I've heard this a lot, but every transcode my Rokus receive is H264. I've never seen H265 requested or received. Any idea where this info comes from or is documented @TheDreadPirate? Or how I can make this behavior happen? Not that it matters all that much, but when traveling, H265 over my hotspot would be much higher quality than bloated H264.

    My friend accesses my server with a Roku 4800X and all their transcodes are TO H265.  Even my CCwGTV which plays H265 when direct playing will get H264 transcodes when burning in subs.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #63
    2023-10-27, 02:18 AM
    What ffmpeg options do I use to scale 4K videos to 1080P?  And, of course, how would that handle the HDR side channel?  Working on making 1080P SDR versions of my 4K HDR media so I can keep the 4K media in a separate library.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Deleted User

    Unregistered
     
    #64
    2023-10-27, 02:40 AM
    (2023-10-27, 02:18 AM)TheDreadPirate Wrote: What ffmpeg options do I use to scale 4K videos to 1080P?  And, of course, how would that handle the HDR side channel?  Working on making 1080P SDR versions of my 4K HDR media so I can keep the 4K media in a separate library.

    give this a try, i use a variation of it

    run in the jellyfin server/docker, uses jellyfin's ffmpeg which is already setup for hwaccel

    produces yuv420p10le, VBR min 50M max 60M (very high bitrate, probably lower would be better)

    add -map 0:s if you want to copy subs, audio is already copied

    adding 'setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709' to -vf produces a 709 but looks washed out

    set width 1920, maintain aspect for height

    Code:
    /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,driver=iHD -filter_hw_device va -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 \
    -i <input.mkv> -threads 4 -vf 'scale_vaapi=w=1920:h=-2' \
    -map 0:0 -map 0:a -c:0 hevc_vaapi -c:a copy -c:s copy -tag:v:0 hvc1 -rc_mode VBR -b:v 50M -maxrate 60M -y output.mkv


    any ffmpeg gurus please point out my flaws, its just put together from the documentation
    bitmap
    Offline

    Community Moderator

    Posts: 781
    Threads: 9
    Joined: 2023 Jul
    Reputation: 24
    #65
    2023-10-27, 05:54 PM
    QSV has scale filters as well. Tonemapping is something I haven't gotten into, but I'll run some trials and see what I come up with.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #66
    2023-10-30, 11:16 PM (This post was last modified: 2023-10-31, 12:41 AM by TheDreadPirate. Edited 2 times in total.)
    Got it working.

    Tone mapping is handled with these parameters in the video filters section.

    zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p

    I have not tested if the scaler can be before the tone mapping (fewer pixels to tone map?).

    Code:
    /usr/lib/jellyfin-ffmpeg/ffmpeg
    -init_hw_device vaapi=va:,driver=iHD,kernel_driver=i915
    -init_hw_device qsv=qs@va
    -filter_hw_device qs
    -hwaccel qsv
    -hwaccel_output_format qsv
    -i 'Dungeons and Dragons - Honor Among Thieves.mkv'
    -map 0:v
    -map 0:a
    -map 0:s
    -map_chapters 0
    -c:v hevc_qsv
    -preset slower
    -profile:v main
    -pix_fmt nv12
    -c:a copy
    -c:s copy
    -ss 0.000000
    -to 8048.160000
    -global_quality:v 18
    -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p,scale_qsv=w=1920:h=-1
    'Dungeons and Dragons - Honor Among Thieves-chapter-0-15.mkv'
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #67
    2023-10-31, 01:26 AM
    Also, Arc A380 is in the mail.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    bitmap
    Offline

    Community Moderator

    Posts: 781
    Threads: 9
    Joined: 2023 Jul
    Reputation: 24
    #68
    2023-10-31, 03:23 AM
    Nice work on tone-mapping. I've heard you can get some really good results from down-scaling and tone-mapping 4K > 1080p, though most folks use SDR sources instead, I assume because they're already taking days to encode something. The A380 is a beast when it comes to newer media, but struggles a bit with older material or anything with even a medium amount of grain. Really hoping documentation and features start pouring in for QSV encoding.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #69
    2023-10-31, 07:47 PM
    Thinking ahead a bit, how do I tell ffmpeg which device to use? Will it automatically use the A380? Or will I have to specify that?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #70
    2023-10-31, 07:57 PM
    If I'm reading this document right, I only need to change this line from

    Code:
    -init_hw_device vaapi=va:,driver=iHD,kernel_driver=i915

    To

    Code:
    -init_hw_device vaapi=va:/dev/dr/renderD129,driver=iHD,kernel_driver=i915
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Pages (12): « Previous 1 … 5 6 7 8 9 … 12 Next »
     

    « 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