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

30 Second Limit? #13

Open
mobiusscarf opened this issue Sep 25, 2024 · 5 comments
Open

30 Second Limit? #13

mobiusscarf opened this issue Sep 25, 2024 · 5 comments

Comments

@mobiusscarf
Copy link

mobiusscarf commented Sep 25, 2024

I'm just wondering if you could elaborate on the problems that led to the 30-seconds-or-less-only limit? I actually got it to work fine with a 34-second post yesterday, and I know Discord can embed longer videos because they do all the time for Twitter videos, and the BlueSky video limit is 60 seconds, which is half the Twitter limit

Could it at least post the first 30 seconds of the video along with the error?

@Rapougnac
Copy link
Owner

Well, technically it isn't Discord's fault, I know they can embed longer videos.
Though, with Bluesky, they use the hls format, which needs to be converted into something readable by discord, and here lies the problem, other services like vxtwitter, ddinstagram etc just get the video link and that's all. For blueksks, remuxing the video takes time, and discord only fetches the video for approximately ~5 seconds before timing out, if the full video hasn't been sent in this time window, no embed is displayed at all. I guess 35s videos work because they are available within 5s, whereas longer video does not.

@mobiusscarf
Copy link
Author

mobiusscarf commented Sep 25, 2024

Forgive my ignorance, but do the .ts files need to be remuxed? Couldn't they just be concatenated? A .ts file should just be an MPEG, which Discord ought to support.

Relevant ffmpeg documentation

@Rapougnac
Copy link
Owner

They need, yeah, the .ts files are indeed MPEG files, but not MPEG-4 (or commonly called as mp4), they're MPEG-2 Transport Stream, which handle data differently than videos using MPEG-4 and therefore, isn't compatible with Discord.
Trust me, if I could just concatenate the streams, I wouldn't bother remuxing the video.
Hope my explanation makes sense.

@mobiusscarf
Copy link
Author

Would using the copy codec for the audio as well as the video make it process any faster? Or does BlueSky do something weird for the audio as well?

@Invertex
Copy link

Invertex commented Sep 27, 2024

Would using the copy codec for the audio as well as the video make it process any faster?

Remuxing implies "copy" already, it's copying the video and audio streams into a different container layout, TS>MP4.

I wonder if perhaps a more lightweight library than FFMPEG could be used that's purely designed for TS to MP4 remux could be used that may perform a lot faster to fit in that request window... If such a thing exists.
Or is the problem more so the time it takes the server to fetch the streams from BSKY first...
Maybe Discord could be returned a file stream that remains open and Discord has to wait on that to finish, like how downloads from a server can be slowed to 0 but remain connected... But I'm not that versed in networking stuff.

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

No branches or pull requests

3 participants