snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
567 stars 30 forks source link

ATProto: detect and handle videos that are over Bluesky's 60s limit #1353

Open snarfed opened 5 days ago

snarfed commented 5 days ago

Related to #1348: Bluesky currently only supports short videos, 60 seconds or less. It'd be nice to detect videos that are too long and include a [Video] text suffix, like we used to do, instead of bridging them anyway and having the client show that they failed:

image

This is technically nontrivial though. I'd need to buffer the entire video in memory, add decoding logic for multiple different formats, who knows what else. I'm unlikely to prioritize this myself, but I'm open to merging a PR if it's reasonable!

qazmlp commented 5 days ago

ffprobe would almost certainly work. It also takes URLs as input and likely doesn't need to download the entire file.

I'm not sure how well that works with your deployment model, though.

snarfed commented 5 days ago

Sadly yeah, I generally need to avoid command line and filesystem-based tools.