Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail & preview for video and audio files #326

Open
MrOrz opened this issue Dec 5, 2023 · 3 comments
Open

Thumbnail & preview for video and audio files #326

MrOrz opened this issue Dec 5, 2023 · 3 comments

Comments

@MrOrz
Copy link
Member

MrOrz commented Dec 5, 2023

Current media variant settings:

case MediaType.image:
return [
variants.original(contentType),
{
name: IMAGE_THUMBNAIL,
contentType: 'image/jpeg',
transform: sharp()
.resize({ height: 240, withoutEnlargement: true })
.jpeg({ quality: 60 }),
},
{
name: IMAGE_PREVIEW,
contentType: 'image/webp',
transform: sharp()
.resize({ width: 600, withoutEnlargement: true })
.webp({ quality: 30 }),
},
];
default:
return variants.defaultGetVariantSettings(options);
}

  • Current logic only generates variants for images
  • We need to modify the logic to handle video and hopefully audio
  • Need to determine a size for thumbnail (website & LINE bot list page) & preview (website detail before login)
  • ffmpeg is already included, so just use it :)
@MrOrz
Copy link
Member Author

MrOrz commented Mar 11, 2024

ffmpeg is quite CPU intensive.
New proposal is to use Transcoding API + Google cloud function that listens on GCS change.

@ndcroos
Copy link

ndcroos commented Jul 24, 2024

Hi, can you assign this issue to me, please?

@MrOrz
Copy link
Member Author

MrOrz commented Jul 25, 2024

Hi @ndcroos thanks for commenting! Would you share with us your idea on how to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants