sinerider icon indicating copy to clipboard operation
sinerider copied to clipboard

[FEATURE] Compress assets to maximize load speed

Open alhardwarehyde opened this issue 2 years ago β€’ 10 comments

Description

To be done during launch week

Screenshots

No response

Additional information

No response

alhardwarehyde avatar Mar 22 '23 20:03 alhardwarehyde

ImgBot is fantastic for this, CC @polytroper

camdan-me avatar Mar 23 '23 03:03 camdan-me

@profsucrose Chris says you have a shell command that can handle this?

alhardwarehyde avatar Apr 10 '23 21:04 alhardwarehyde

for images, we could use ImgBot or squoosh.app to optimize. Audio takes the majority of the client load so we can compress the audio files directly or use Cloudinary to serve the audio files (see optimize audio ). The scoring service uses Cloudinary already to save and serve the video files.

JosiasAurel avatar Apr 12 '23 15:04 JosiasAurel

@polytroper Claire is blocked on this- not sure what action needs to be taken here.

alhardwarehyde avatar May 02 '23 18:05 alhardwarehyde

I think the last time I ran a command like

for f in ./*.mp3; do ffmpeg -i "$f" -c:a libvorbis -q:a 4 "${f/%mp3/ogg}"; done

Needs ffmpeg installed though

JosiasAurel avatar May 02 '23 18:05 JosiasAurel

πŸ‘†this looks correct to me. Asset manifest will also need to be changed to load the .ogg files

polytroper avatar May 02 '23 18:05 polytroper

@ClaireBookworm does that unblock you?

alhardwarehyde avatar May 02 '23 18:05 alhardwarehyde

@JosiasAurel is this something you can work on?

alhardwarehyde avatar May 03 '23 20:05 alhardwarehyde

@JosiasAurel is this something you can work on?

I could definitely help but @ClaireBookworm is giving it a try right now

JosiasAurel avatar May 03 '23 20:05 JosiasAurel

Just sent a PR https://github.com/hackclub/sinerider/pull/482

JosiasAurel avatar May 03 '23 21:05 JosiasAurel