r/Infinity_For_Reddit • I am the dev • Sep 02 '22

Redgifs issue

It will be fixed soon. I tested the new API before Aug 31st and it was working fine, so I thought there would be no problem. But apparently I was wrong. I hate this API so much😣.

301 Upvotes

22 comments sorted by

41

u/nicman24 Sep 03 '22

Chill my dude, thanks for your work

22

u/Bermersher Sep 03 '22

We appreciate you

20

u/RedShankyMan Sep 03 '22

Ty for the effort. A suggestion so that issues like this are less an of issue in the future: maybe a button at the top a the post that redirects to redgifs via browser, so we don't have to fully rely on the API

7

u/MateIn69 Sep 05 '22

Yes i thought about that too, that would be probably the easiest and bugproofest solution!

11

u/luthfiaj Sep 03 '22

Aah for some reason I think it just only me, my slow internet speed, but it's not. So, some of the videos is still working for autoplay, and the others is not

9

u/yurilnw234 Sep 04 '22

May I ask for a button to open the Video URL? Currently there is no way to access the url, is there? Maybe I just don't know

2

u/Catnip4Pedos Sep 04 '22

Share the link to your browser and open it from there?

14

u/god_retribution Sep 03 '22

weird normal video workfor me i have problems with MSFW video only

8

u/[deleted] Sep 03 '22

It's maybe 80% that don't work for me correctly

5

u/AJGILL03 Sep 03 '22

Nothing big, chill bruv, work slow and steady on it, no hurry. Thanks for Infinity, again! :-)

1

u/jack27nikkkk Sep 17 '22

Yo plz do something to video player it takes forever to load videos!!! 🥲 Even when im.on strong/fast Wi-Fi

1

u/Hostilenemy I am the dev Sep 18 '22

Could you provide a post link?

1

u/oralskills Oct 06 '22 edited Dec 15 '22

Complete post edit:

I just fixed my local network (Powerline → fiber).

While I cannot confirm there are still issues with the other places I visited (I am not currently there), the issues are gone from my end.

So, I can confirm that a faulty network can make the downloads much slower than they should be (e.g. the download code probably isn't very fault tolerant). With the powerline I was able to reach speeds of 2Mbps sustained on many http clients, while downloading a video via infinity would sometimes take as long as 12-15 minutes (for a 60-70MB video). Meaning it was going at 700 Kbps, i.e. almost 24 × slower than it should have been.

1

u/Hostilenemy I am the dev Oct 12 '22

There is no more deprecated api in infinity right now. So I suspect it's because your ISP is limiting the connection speed when you aceess redgifs.

1

u/oralskills Oct 12 '22

I used infinity across multiple countries, multiple ISPs, multiple type of uplinks, and multiple physical media. There were minor fluctuations, but the rule of thumb "redgifs is orders of magnitude slower than imgur" applied each and every time.

So what I'm saying is: unless there is a limitation with infinity/exoplayer and older devices (I use a phone from 2015 with 2GB RAM and an older snapdragon - but it is IMHO very unlikely, as the speed limitation happens when I download the files too, not only when I view them), I don't think it's on my end. Not saying it's on yours either. It is very possible redgifs throttles their traffic towards the EU.

1

u/oralskills Dec 15 '22

As I mentioned in my edit, you were partially right in the sense that it was the network.

But it is wrong that the ISP is doing anything: I only fixed my LAN and the issues have completely vanished (I can download any video on reddit in a matter of seconds, at most)

What I suspect is that the download code (for both the video caching and the download feature) is very fault sensitive, much more than your average HTTP client (browser, game client, streaming client, etc), and fails at least an order of magnitude more than it should, on bad uplinks.

Edit: also, the difference between reddit and imgur hosted videos was real. It took on average 20 × longer (imgur download was consistent with the speed I was getting elsewhere) to download from reddit than imgur.

1

u/[deleted] Sep 07 '22

Thank you for fixing the issue!

1

u/[deleted] Sep 04 '22 edited Sep 04 '22

[removed] — view removed comment

1

u/oralskills Oct 06 '22

If you wanna save the videos either way, the cache directory in the ml.docileallogator.infinityforreddit data directory contains an exoplayer directory that has your videos.

The way the cache works is: after ensuring the video is entirely downloaded, you will find chunks of it (capped to 5MB) in different subdirectories under exoplayer. They are named according to this pattern: XXX.YYYYY.TTTTTTTT.v#.exo where XXX is the "index" or "key" of the file (in other words, the number you have to select to get all the chunks of the same file), YYYYY is an increasing offset (I suppose the number of bytes or milliseconds this chunk starts at), and TTTTTTTT is a Unix timestamp, very likely used for cache invalidation.

So in order to get your file from the cache, you have to:

  1. Ensure it downloaded

  2. Find what XXX index its chunks have

  3. Select all the files under the exoplayer directory with this index

  4. List them and order the list by YYYYY with an ascending order

  5. Concatenate all the chunks in this order into your new file. You may need to rename it into an mp4 for it to work.