• 1 Post
  • 24 Comments
Joined 3 months ago
cake
Cake day: June 23rd, 2024

help-circle














  • I thought the average !programminghumor@lemmy.world user is already FOSSpilled. Of course you don’t have to use the FOSS tools but they are convenient enough to be able to make this in 10 minutes.

    Anyway, the relevant commands are

    yt-dlp -f "bv*[height<=480]+ba" --no-mtime --convert-subs srt --write-sub https://www.youtube.com/watch?v=9SOryJvTAGs
    # aegisub needs srt; we don't need above 480p
    
    aegisub "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].en.srt"
    # now go rewrite appropriate lines in gui, apply style and save as "LoveShack.ass"
    
    ffmpeg -i "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].mp4" -filter_complex "[0:v]subtitles=LoveShack.ass[s];[s]crop=w=640[f]" -map [f] -map 0:a -ss 49 -t 21 -acodec aac -vcodec libx265 -crf 20 crowdstrike.mp4
    # crf 20 for generously high quality because file size is small anyway
    
    # or for Lemmy upload (no sound, WebM to prevent encoding...
    # ...and subsequent ffmpeg timeout errors; my instance limits uploads to 10 MiB)
    ffmpeg -i "The B-52's - Love Shack (Official Music Video) [9SOryJvTAGs].mp4" -filter_complex "[0:v]subtitles=LoveShack.ass[s];[s]crop=w=ih/3*4[f]" -map [f] -ss 49.5 -t 21 -vcodec vp9 crowdstrike.webm
    # note that Lemmy instances limit videos to 900 frames (usually 30 s) by default
    

    I didn’t bother recreating your subtitle and cut timing but I did crop the video to 4:3. The frame rate is doubled and so is the apparent resolution, while the file size is 6x smaller; the Lemmy version is also about 6x smaller but I went for low-bitrate 720p:



  • GIF is really terrible as a video format. You can upload actual video with sound on Lemmy (most instances use a 20MB, 900-frame limit, also server-side ffmpeg often times out) or Pixelfed (15MB, unknown frame limit).

    Yes, I know you didn’t bother to use an AI or commission an artist to sing the new lyrics but you could mux in an instrumental version (or heck, even just leave the original) for me and others who may remember the melody from the radio but don’t associate it with the music video.