r/Infinity_For_Reddit • u/Hostilenemy 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😣.
22
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
14
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
1
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
cachedirectory in theml.docileallogator.infinityforredditdata directory contains anexoplayerdirectory 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#.exowhereXXXis 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),YYYYYis an increasing offset (I suppose the number of bytes or milliseconds this chunk starts at), andTTTTTTTTis a Unix timestamp, very likely used for cache invalidation.So in order to get your file from the cache, you have to:
Ensure it downloaded
Find what
XXXindex its chunks haveSelect all the files under the
exoplayerdirectory with this indexList them and order the list by
YYYYYwith an ascending orderConcatenate all the chunks in this order into your new file. You may need to rename it into an
mp4for it to work.
41
u/nicman24 Sep 03 '22
Chill my dude, thanks for your work