nekusoul, (edited )
@nekusoul@lemmy.nekusoul.de avatar

Since the end goal is to post a video to YouTube, you will have to create a video file. Personally I would probably just be lazy and upload the large file, since YouTube is going to reconvert the video anyway.

That said, to optimize the file you need to know how videos work, specifically key frames. Speaking generally, when a video gets encoded, it doesn’t add the whole image for each frame. Instead, it only does that when the current frame is a key frame, and then only stores the difference to the previous frame for every regular frame. There’s a lot of different strategies when placing keyframes, like every X seconds, when the scene changes, or both. This is usually you can change somewhere in the encoding settings of the application you’re using. You will need to use a codec/format that supports interframe compression though, so avoid AVI and MJPEG.

So the TL;DR is: Try to decrease the amount of key frames as much as possible, maybe even down to only one if possible.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • 200 @ entry_comment_voters
    HTTP status 200 OK
    Route name entry_comment_voters
    Has session yes
    Stateless Check no
    Time 268 ms
    Total time 268 ms
    Initialization time 54 ms
    Memory 14.0 MiB
    Peak memory usage 14.0 MiB
    PHP memory limit 128 MiB
    Logger 87
    Errors 0
    Warnings 0
    Deprecations 87
    Cache 29 in 12.55 ms
    Cache Calls 29
    Total time 12.55 ms
    Cache hits 31 / 40 (77.5%)
    Cache writes 3
    3
    Default locale en
    Missing messages 3
    Fallback messages 0
    Defined messages 119
    Security n/a
    Authenticated No
    Firewall name main
    Twig 106 ms
    Render Time 106 ms
    Template Calls 65
    Block Calls 16
    Macro Calls 6
    41 in 52 ms
    settings_row_switch 15
    user_settings_row_switch 4
    date 3
    user_inline 2
    settings_row_enum 2
    entry_comment 1
    date_edited 1
    user_avatar 1
    vote 1
    boost 1
    user_actions 1
    magazine_box 1
    magazine_sub 1
    related_magazines 1
    active_users 1
    related_categories 1
    related_posts 1
    related_entries 1
    support_us_block 1
    featured_magazines 1
    10 in 50.67 ms
    Database Queries 10
    Different statements 9
    Query time 50.67 ms
    Invalid entities 0
    Cache hits 23
    Cache misses 3
    Cache puts 3
    6.4.0
    Profiler token 61d785
    Environment dev
    Debug enabled
    PHP version 8.2.26   View phpinfo()
    PHP Extensions Xdebug ✗ APCu ✓ OPcache ✓
    PHP SAPI apache2handler