hi all, ive tried using shotcut and kdenlive but the outputted file ends up being huge. i have a single image and want to put audio on top (releasing a song) but these programs end up making video files where they render the same image on each frame and the files end up being huge. what is the best way to achieve my use case of making a single photo music ‘video’ that doesnt degrade the quality of the image and can be posted to youtube?

tl;dr: need a still image video (image is lossless) where rhe imsge isnt reduplicared and has audio

  • NekuSoul@lemmy.nekusoul.de
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    11 months ago

    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.

  • haroldstork@lemm.ee
    link
    fedilink
    English
    arrow-up
    7
    ·
    11 months ago

    This might depend on where you’re uploading/how you’re playing this file, but you could add a thumbnail to the audio file? I know that vlc and mpv will play your audio file and show the thumbnail, but I’m not sure if YouTube would take that. Not sure if this is exactly what you’re looking for but it is pretty efficient.

  • hinterlufer@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    11 months ago

    In kdenlive, the following settings work well for me (you can transfer the options to ffmpeg cli as well if you prefer that):

    f=matroska movflags=+faststart vcodec=libx264 tune=stillimage progressive=1 g=1000 bf=2 crf=%quality acodec=flac ar=48000

    For reference, I get a 3.7 GB video with a duration of over 5 h @4k resolution. The audio itself is already 3.7 GB and it’s just a still image. For CRF, set something around 23, that should do.

  • Bobby Turkalino@lemmy.yachts
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 months ago

    Are you sure your rendering settings are correct? It sounds like the video isn’t being encoded at all. Video encoding works by storing a frame in full quality every couple seconds or so. For the rest of the frames, only their differences from the previous full-quality frame are stored. But from what you describe, it sounds like the latter sentence isn’t happening

    • jackpotOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      11 months ago

      oh i didnt think this is how it worked, i ended up using ffmpeg to make a one frame a second video but it still looks blurry??

  • andrew_bidlaw@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Can you intentionally set various bitrate (VBR) with a big difference, like from 16mbps max to 1mbps min? Constant bitrate can be your problem. Premiere had this on media export menu, I can’t remember where others have this. And, if you want to upload it to youtube, see what size it has on a private upload by downloading it - they reencode every video themselves to their uniform standard, so maybe you don’t even need to bother with that.

    • jackpotOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      probably? would that be able to be sent to people / uploaded? how do i do this? linux mint btw