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

Bluesky video #1317

Closed
snarfed opened this issue Sep 10, 2024 · 6 comments
Closed

Bluesky video #1317

snarfed opened this issue Sep 10, 2024 · 6 comments
Labels

Comments

@snarfed
Copy link
Owner

snarfed commented Sep 10, 2024

Should be straightforward, mostly just need to add translation in granary bluesky.from_as1/to_as1 and enable fetching in ATProto._convert:

bridgy-fed/atproto.py

Lines 739 to 749 in a8b4333

return {}
blobs = {} # maps str URL to dict blob object
if fetch_blobs:
for o in obj.as1, as1.get_object(obj.as1):
for url in util.get_urls(o, 'image'):
if url not in blobs:
try:
blob = AtpRemoteBlob.get_or_create(
url=url, get_fn=util.requests_get)
blobs[url] = blob.as_object()

https://console.cloud.google.com/errors/detail/CLCw_IiuhNOmjAE;time=PT1H;locations=global?project=bridgy-federated

@snarfed
Copy link
Owner Author

snarfed commented Sep 12, 2024

Bluesky shipped video on web and in the apps today! https://bsky.social/about/blog/09-11-2024-video

@snarfed
Copy link
Owner Author

snarfed commented Sep 12, 2024

...and bridging video is alive! Examples: fediverse => Bluesky, Bluesky => fediverse (requires login).

...except the fediverse => Bluesky example isn't quite working. Not sure why yet. The video is < 60s and < 25MB, the record (below) looks ok, atproto.tools says it's valid, and getBlob redirects to it fine, with Content-Type and Content-Length that match the blob's mimeType and size.

I've asked the team in Discord, will see what they say...

{
  "$type": "app.bsky.feed.post",
  "bridgyOriginalText": "<p>we caught the leading edge of the stream after the rain</p>",
  "bridgyOriginalUrl": "https://indieweb.social/@snarfed/113122504087630945",
  "createdAt": "2024-09-12T03:40:28.000Z",
  "embed": {
    "$type": "app.bsky.embed.video",
    "alt": "we caught the leading edge of the stream after the rain",
    "video": {
      "$type": "blob",
      "mimeType": "video/mp4",
      "ref": {"$link": "bafkreigwcifrzgowszprzj3psiv5lwy46ksby6nljnc5twin2ndn4m7nce"},
      "size": 4561151
    }
  },
  "langs": ["en"],
  "text": "we caught the leading edge of the stream after the rain"
}
@snarfed
Copy link
Owner Author

snarfed commented Sep 12, 2024

Evidently this is due to the phased rollout, which includes users on federated PDSes like Bridgy Fed. Hopefully they'll get to BF users soon!

@hybridhavoc
Copy link

Was coming here to ask about this. Noticed with this post that it wasn't working, assumed it was something along those lines. Looking forward to the rollout.

snarfed added a commit that referenced this issue Sep 12, 2024
@mackuba
Copy link

mackuba commented Sep 12, 2024

Wow, that was fast 😳 I was gonna add a ticket for this, but today I saw a bridged post with apparently a video in it, but I was thinking it's impossible that it's already working… 😅

@snarfed
Copy link
Owner Author

snarfed commented Sep 12, 2024

Thanks! All the blob handling was already done for images, so there wasn't a lot more to do for videos, mostly just handling the new embed lexicons.

@snarfed snarfed closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants