#developers

1 messages ยท Page 7 of 1

topaz crown
#

if you're familiar with gql, you can modify the queries as you like

#

you can use a tool like postman or others to play with the schema to make requests

lyric cosmos
topaz crown
#

you'd have to get the paint ID from their user data, then load the paint from the query in the image above to know how to apply the css

lyric cosmos
#

Like is the paint ID stored through 7TV or is the actual ID what contains the patterns

topaz crown
#

paint ID is stored in the user data

#

you would find where "selected": true and "kind": "PAINT"

lyric cosmos
topaz crown
#

yes

#

gql requests are always POST, and the query string/variables go in the body ``` fetch('https://7tv.io/v3/gql', {
method: 'POST',
body: JSON.stringify({
query: query UserByConnection...,
variables: { id: "some id" }
})

lyric cosmos
#

Where can I find more information to fetch the paints through this method?

topaz crown
#

if you use postman it has a gql introspection feature that will let you pick and choose the queries with a GUI

#

im sure theres other better options too

lyric cosmos
topaz crown
#

im pretty sure the rest api doesn't return any paint data

lyric cosmos
#

Lowkey might have just got chat gpt to do it NOWAYING

topaz crown
lyric cosmos
#

I love AI

#
const https = require('https');

// Define the username you want to query
const username = 'f1shk1do';

// Fetch the user's active 7TV paint and subscription badge
function fetch7TVUserDetails(username) {
    // Define the API endpoint URL
    const url = `https://7tv.app/v3/users/${username}`;

    // Make the HTTPS GET request
    https.get(url, (response) => {
        let data = '';

        // A chunk of data has been received
        response.on('data', (chunk) => {
            data += chunk;
        });

        // The whole response has been received
        response.on('end', () => {
            try {
                // Parse the JSON response
                const userData = JSON.parse(data);

                // Fetch active paint and subscription badge
                const activePaint = userData?.paint || 'No active paint';
                const subBadge = userData?.subscriber_badge || 'No subscription badge';

                // Log the results
                console.log(`User: ${username}`);
                console.log(`Active Paint: ${activePaint?.name || activePaint}`);
                console.log(`Subscription Badge: ${subBadge?.name || subBadge}`);
            } catch (error) {
                console.error('Error parsing JSON:', error.message);
            }
        });

    }).on('error', (error) => {
        console.error(`Error fetching details for user ${username}:`, error.message);
    });
}

// Execute the function
fetch7TVUserDetails(username);
#

@topaz crown does this look accurate

topaz crown
#

no lol

vagrant lion
lyric cosmos
#

I tried ๐Ÿ˜ช

topaz crown
plush kayak
#

:comments:

lyric cosmos
#

You've probably already answered my question

topaz crown
lyric cosmos
topaz crown
kindred flower
#

Hey,
Is it okay to use the 7tv api for a rich-text editor extension that would allow users embedding the emotes? I'm not sure I understand the TOS correctly, just want to double check Clueless

Also not sure if this is the right place for such question

lyric cosmos
#

@topaz crown I've tried to use some AI with your messages, it's gotten somewhere I guess.

fetch('https://7tv.io/v3/gql', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    },
    body: JSON.stringify({
        query: `
        query UserByConnection($id: String!) {
          userByConnection(platform: TWITCH, id: $id) {
            cosmetics {
              id
              selected
              kind
            }
          }
        }
        `,
        variables: { id: "1003921362" } // Ensure this is the correct Twitch user ID
    })
})
.then(response => {
    if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
})
.then(data => {
    if (data.errors) {
        console.error('GraphQL errors:', data.errors);
        return;
    }

    const cosmetics = data.data.userByConnection.cosmetics;
    const selectedPaint = cosmetics.find(cosmetic => cosmetic.selected && cosmetic.kind === "PAINT");
    if (!selectedPaint) {
        throw new Error('No selected paint found');
    }

    // Step 2: Fetch the paint details using the paint ID
    fetchPaintDetails(selectedPaint.id);
})
.catch(error => console.error('Error fetching user data:', error));

function fetchPaintDetails(paintId) {
    fetch('https://7tv.io/v3/gql', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Accept': 'application/json'
        },
        body: JSON.stringify({
            query: `
            query GetCosmetic($id: String!) {
              cosmetic(id: $id) {
                id
                name
                function
                color
                image_url
                repeat
              }
            }
            `,
            variables: { id: paintId.toString() } // Ensure the paintId is passed as a String
        })
    })
    .then(response => {
        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }
        return response.json();
    })
    .then(data => {
        if (data.errors) {
            console.error('GraphQL errors:', data.errors);
            return;
        }

        const paint = data.data.cosmetic;
        if (!paint) {
            throw new Error('No paint details found');
        }

        applyPaintToPage(paint);
    })
    .catch(error => console.error('Error fetching paint details:', error));
}

function applyPaintToPage(paint) {
    if (paint.image_url) {
        document.body.style.backgroundImage = `url(${paint.image_url})`;
        document.body.style.backgroundSize = paint.repeat ? 'repeat' : 'cover';
        document.body.style.backgroundRepeat = paint.repeat ? 'repeat' : 'no-repeat';
        document.body.style.color = '#FFF';  // Adjust text color for readability
    } else {
        console.log('No background image found.');
    }
}

It's getting this error below

patent wing
#

AI I love it

lyric cosmos
#
    "data": {
        "cosmetics": {
            "paints": [
                {
                    "id": "65459be4ed8a01cc905ecaf8",
                    "kind": "",
                    "name": "Firebrand",
                    "function": "RADIAL_GRADIENT",
                    "color": 0,
                    "angle": 90,
                    "stops": [
                        {
                            "at": 0.15,
                            "color": -589569,
                            "__typename": "CosmeticPaintStop"
                        },
                        {
                            "at": 0.3,
                            "color": -7012097,
                            "__typename": "CosmeticPaintStop"
                        },
                        {
                            "at": 1,
                            "color": -618852353,
                            "__typename": "CosmeticPaintStop"
                        }
                    ],
                    "__typename": "CosmeticPaint"
                }
            ],
            "badges": [
                {
                    "id": "62f97e19e46eb00e438a696c",
                    "kind": "",
                    "name": "7TV Subscriber - 3 Months",
                    "tooltip": "7TV Subscriber (3 Months)",
                    "tag": "sub3",
                    "__typename": "CosmeticBadge"
                }
            ],
            "__typename": "CosmeticsQuery"
        }
    }
}```
#

Outputting that which is correct

patent wing
#

display what

lyric cosmos
# patent wing display what

I'm trying to make it display the paint that I currently have on, onto a HTML page. Basically going to add to my website

#

Will basically have whatever paint I have on, onto this fishkido text.

patent wing
#

yea just use the paint cosmetic gradient stops and turn it into the gradient of the texts background

patent wing
#

its in the cosmetic data, its the cosmeticpaintstop

#

each one is a gradient stop

lyric cosmos
#

Ohh I see

rigid narwhal
#

you can take a look at the paint tool in the extension settings and just play around with the options in there. This helps to understand how the paints work

lyric cosmos
#

Current Script

#

Scripts showing this

#

Active paint is this

patent wing
#

AI I love it

lyric cosmos
solemn widget
#

i think the color parsing logic is wrong

#

yep

lyric cosmos
dark kite
#

self ddos

#

@south flare

south flare
#

we are busy redoing the entire website

#

we know

dark kite
#

u think that wont exist on redesign?

south flare
#

ah yes, its a feature so we are going to implement it the same way as before

lyric cosmos
#

Appreciate you helping me BOOPS

solemn widget
#

hopefully looks better at a smaller size

lyric cosmos
#

Oh I've seen. It's just not adding the effects or something like that, I think it's a glow or something

#

That's it in bigger form

mortal fossilBOT
#

ryanpotat is no longer AFK: (no message) (23m, 55s ago)

topaz crown
#

use that

lyric cosmos
#

Oh hello Ryan

#

Let me try

lyric cosmos
lyric cosmos
#

Got it working

#

Thanks so much Ryan

lyric cosmos
#

@topaz crown Sorry to bother again, This picture below is the scripts one.

#

This is my one

#

It looks a bit different

#

Some look normal though

topaz crown
#

not sure

lyric cosmos
plush kayak
#

isn't it just because of the size

pearl ore
#

Username change on Twitch doesn't reflect in 7tv until user logs-in on 7tv website (?)
Fun minor bug if true. Affects Chatterino 7.5.1 and ChatIS - namepaint won't show after a Twitch username change until the moment the user logs-in on the 7tv websites. Screenshots show the entitlement.create events in the same session, second is after the user logs-in on the 7tv website (afaik)
I'm too lazy to reproduce, but seems true

mortal fossilBOT
#

is2511, reminder(s) from: neomothdev - make chatis display name paints hehe (10h, 55m ago)

pearl ore
#

@zinc aspen ๐Ÿ–•

vagrant lion
#

yeah if u meant display name

#

need to relog on 7tv to update new twitch name

pearl ore
#

You can see the display_name is mostly cut out on the screenshots, but still changes too, yeah. But the main change is the username

zinc aspen
#

so when i looked at chatis my paint wasnt showing

pearl ore
zinc aspen
#

correction: only loads paint after first message on a browser with 7tv installed

#

not after first message in general

pearl ore
zinc aspen
#

well idk how to explain it then

topaz crown
#

you need to send your presence

#

extension/chatterino sends presence request

pearl ore
topaz crown
#

chatsen doesn't

zinc aspen
#

clearly frosty doesnt either

topaz crown
#

you could use zonian's or my bot to update presence if you're on mobile

pearl ore
#

The problem is not on my end weestHapps

zinc aspen
zinc aspen
topaz crown
zinc aspen
#

yummy potato.....

frosty bronze
#

what about after being baked or fried? OkaygeClap

plush kayak
pulsar iris
#

@plush kayak nice name

sullen edge
#

@lone marsh @topaz crown ryan help pls catAsk

#

i am being asked dev questions and i have no clues

topaz crown
#

the user query can return the paint id

#

but there is a seperate query to get the paint information/stops/shadows/image

#

im not sure the REST api even returns paint id

#

it doesn't

sullen edge
#

@rigid narwhal @rugged perch might have found something on broken gifs

rigid narwhal
rugged perch
#

do I post it here? Pfftt

plush kayak
rugged perch
#

Ok well

#

looking up the webp info and comparing it will be useless

#

Since it's 2 different structures

#

But comparing the " working " gif and the " broken " gif

#

Working gif had a ton of info ( since it has been edited with seems like adobe

#

Old one has less info for sure

#

But what I want to focus on here is

#
  • Has Color Map
  • Transparent Color
  • Bits Per Pixel
  • Frame Count
#

Frame count on the old one is 57, new one is 42 ( don't know if that would be an issue anyway )

#

Color Map on the broken one doesn't exsist, Unlike the Working one

#

and I don't know why would the Transparent Color be 0 on the broken one, and on the new one is 255 ?

#

And I don't know if Bits Per Pixel Matter on your uploading structure on 7TV

#

But so far that's what I got

rigid narwhal
#

forsenHmm damn, ok, that's super useful information

rugged perch
#

It could be the Transparent Color

#

but don't know if frame count matter, Since you can manually cut frames on the broken one yet it works

#

Unless I test it out.

sullen edge
#

i think frame count doesnt matter, we have gifs with more frames than that

rigid narwhal
#

I did use Premiere back then to fix the broken gif, but unfortunately don't remember my settings or anything

#

frame count I also doubt

#

the also working one I created yesterday through EZ Gif I think has same frame count as the broken one

rugged perch
#

so what I'm going to try to do is

  • Edit the 3 vaues i'm sus about, And see if they can be uploadable after
rigid narwhal
#

if it helps here is another working version

#

I put that one through EZ Gif yesterday and let it optimize it with the lowest possible value

rigid narwhal
#

docHmm it would probably be interesting what the original creator used to create that gif

#

Maybe they are still on the server, let me check

#

they are PagMan

rugged perch
#

as expected, It's the transparent color

rigid narwhal
#

docHmm huh, interesting

rugged perch
#

not confirmed yet

#

My code made it a gif but it's in an img

rigid narwhal
#

I guess the transparent color must probably be automatically set by the software, because I don't think there is a setting anywhere to set this value

rugged perch
#

yea sometimes usiong PIL in pythoin gives an error that it has a None Palette, So getting the Palette using PIL again gives a error which means incomplete or corrup[ted gif

rigid narwhal
#

pepeW I unfortunately have to go to bed since it's already 1am here, but I'd appreciate if you just share any findings you get in here. Tomorrow I can assist with finding the problem again as well

#

DonkHug thank you for you help @rugged perch

rugged perch
#

No problem at all, I found the main issue and now trying alternative fixes to see what could be the actual problem

#

Goodnight legend hugsmiley

misty olive
#

ftk pspL

rugged perch
#

@misty olive catKiss

#

Yes I can fully confirm it's one of those 3 values:

  • Has Color Map
  • Transparent Color
  • Bits Per Pixel

and MOST LIKELY

  • Transparent Color
#

yea unscreen fixes it by making the frames overlaps ( draws last frame in the next frame )

#

I think I'm wrong? I uploaded the unscreen version and it worked ( with the overlapping frames ), But checking the meta data, the only value that changed is the Color Resolution Depth
broken was 8 and fixed is 1 which matches with Bits Per Pixel's value

#

yea I think I'm wrong, it seems like fixed ones have the Bits Per Pixel and Color Resolution Depthand Has Color Map different, the Transparent Color remained the same on some gif's.

rugged perch
#

So transparent Color changed there, And the Bits Per Pixel changed

#

So I guess we know where to look now pspHappy

paper token
#

For gifs at least but what about avif?

rugged perch
#

I can try and convert this gif to avif

#

well converting to AVIF works, And the data it spits is simmilar to mp4 basically

#

Meaning it's completly different to GIF's meta data ( Which is the where the issue is )

paper token
#

at least ones created with ffmpeg piped into avifenc

#

@rugged perch

#

uploading this to 7tv doesn't work

rigid narwhal
#

forsenHmm I'm unfortunately barely worked with avif, so I'm no expert there, but I imagine they probably have similar attributes to gifs?

#

Definitely gonna try to play around with the gifs after work today

rugged perch
#

Ok well we at least know the issue in the GIF

rugged perch
rugged perch
#

the Average Bitrate on that is 0 according to it's meta data

#

Avg Bitrate : 0 bps

paper token
#

meta data shouldn't prevent it from being converted though, no?

#

browsers can play it just fine

rugged perch
#

they can play it

#

But 7TV uploader has some set of rules I assume

#

( or whatever package/method you guys use to convert gifs/AVIF's to webp etc... )

#

yea the bitrate being 0 breaks it in the 7TV Uploader

#

Converting the AVIF to AVIF using CloudConvert , It works now

#

Track Duration : 7116799411153 days 9:02:08 Pfftt

#

This is your AVIF duration

paper token
#

how come browsers play it just fine?

rugged perch
#

I don't think browsers care about the meta data

#

Unlike 7TV's uploader

#

Maybe there's some specific structure 7TV Uploader follows

rigid narwhal
#

I guess it must be something in the image processor of 7TV

rugged perch
#

yes

paper token
rugged perch
#

correct

#

Where?

#

how can I find it?

paper token
#

I think this

rugged perch
#

I might look and see what could prevent such issues and why would it give that error into those 2 specific GIF and AVIF

#

the same one? ( even though it's an archive ) ?

paper token
#
 If neither duration nor timescale are set, avifenc will attempt to use the framerate stored in a y4m header, if present.```
#

I'm not specifying either to avifenc

#

it seems to get it from ffmpeg just fine

#

but maybe that's part of the problem

#

avif isn't writing metadata for implicit framerates

#

which could explain the weird duration

paper token
#

and the 0 bitrate as a result

rugged perch
#

can't access files?

#

maybe wrong format

#

yea the documetnation leads to non-exsistant files sorry

paper token
#

Could've moved somewhere else

#

I don't keep up with this side of things

#

let me try making a new avif tho

#

the only reason I'm piping into avifenc to make them is because ffmpeg can't natively make avifs with alpha

#

(or at least couldn't the last time I checked)

rugged perch
#

Well 7TV API just returns null

#

even though it returns the emote ID, but it's not exsistant on the cdn meaning the image processor had an error mid-way

rugged perch
#

lemme compare the data and see what's different ( if it works on image processor first )

#

yea wtf...

#

So I'm guessing for GIF's they use ffprobe to get the GIF's information

#

using that manuially on broken/fixed GIF:

Fixed: 228,128,42
Broken: 228,128,57

#

the last value is the number of packets from that "video" stream or something

#

nmvm it's the frame count basically xdd

#

I still don't know what's the issue inside the image processor of 7TV thinking

rigid narwhal
#

I think at this point we can also inform Troy and Lennart in here about the findings, they should probably have an idea, what the issue inside the image processor could be

rugged perch
#

yea they can check the logs maybe and do a local test and see what goes on

sullen edge
#

ftk chris anson GOAT

rigid narwhal
#

@south flare @sudden gust lots of new insights in here regarding problems with the image upload/processing by @rugged perch. Maybe you have an idea what could be going on with the image processor in these cases

rugged perch
rugged perch
#

I didn't do much

rigid narwhal
# rugged perch I didn't do much

FeelsOkayMan you did. Without you we would have probably just accepted at some point that some images/gifs are broken without analyzing further

south flare
rugged perch
south flare
#

we chnaged the image processor a lot

rugged perch
#

Oh you guys have a new one, Makes sesne

south flare
#

we no longer use ffprobe

sudden gust
rugged perch
#

ok well can you try one of the broken gifs on your side and check the new image processing logs of what it gives? Cuz it fails

south flare
#

can u send a broken image again ill try it rn

rugged perch
#

yes

#

this is a GIF

#

and this is the AVIF

south flare
#

both fail?

rugged perch
#

yes

south flare
#

oka

rugged perch
#

and after exploring, 3 values on the gif itself could interfere with the new image processor

#

Yes I can fully confirm it's one of those 3 values:

  • Has Color Map
  • Transparent Color
  • Bits Per Pixel

and MOST LIKELY

  • Transparent Color
rugged perch
#

oh sorry and:
Color Resolution Depth,

south flare
#

processing the gif u supplied works fine

#

avif failed

#
{"id":"66c7543b995a0b878d43bd5b","timestamp":"1724339260","fail":{"error":{"message":"encoder: avif: encode color failed","code":"ErrorCodeEncode"}}}
rugged perch
south flare
#

the current website does not use the new processor

rugged perch
#

Ohh I see

south flare
#

the avif is interesting i am looking at it

#

whats the bitdepth on that image

rugged perch
#

so the AVIF has come ecnoding color error?

#

AVIF? Lemme check

#

Image Pixel Depth : 8 8 8

#

this?

#

maybe these can help:

Color Primaries                 : BT.709```
south flare
#

can u show the full stats

rugged perch
#

yes

south flare
#

thanks

rugged perch
#

I don't understand the Avr Bitrate being 0 though

south flare
#

sec

rugged perch
#

So Color Primaries is correct...

south flare
#

im trying to see if its an issue with libavif or us

rugged perch
#

it could be libavif though since online websites can process the file and execute it fine...

south flare
#

this is what it made with avif encoding disabled

#

something is wrong with either libavif encoder or our impl

rugged perch
#

want me to check the data of each one of these?

south flare
#

nah just check they look fine

#

and that the timings are correct

#
{"id":"66c7574435b1cfad7f1a37a4","timestamp":"1724340037","success":{"drive":"seventv-cdn","files":[{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/32x10_static.png"},"contentType":"image/png","width":32,"height":10,"frameCount":1,"size":724,"format":"PngStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/64x20_static.png"},"contentType":"image/png","width":64,"height":20,"frameCount":1,"size":1583,"format":"PngStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/96x30_static.png"},"contentType":"image/png","width":96,"height":30,"frameCount":1,"size":2757,"format":"PngStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/128x40_static.png"},"contentType":"image/png","width":128,"height":40,"frameCount":1,"size":4217,"format":"PngStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/32x10_static.webp"},"contentType":"image/webp","width":32,"height":10,"frameCount":1,"size":138,"format":"WebpStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/64x20_static.webp"},"contentType":"image/webp","width":64,"height":20,"frameCount":1,"size":202,"format":"WebpStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/96x30_static.webp"},"contentType":"image/webp","width":96,"height":30,"frameCount":1,"size":206,"format":"WebpStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/128x40_static.webp"},"contentType":"image/webp","width":128,"height":40,"frameCount":1,"size":262,"format":"WebpStatic","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/32x10.webp"},"contentType":"image/webp","width":32,"height":10,"frameCount":150,"durationMs":4918,"size":21416,"loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/64x20.webp"},"contentType":"image/webp","width":64,"height":20,"frameCount":150,"durationMs":4918,"size":37296,"loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/96x30.webp"},"contentType":"image/webp","width":96,"height":30,"frameCount":150,"durationMs":4918,"size":39674,"loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/128x40.webp"},"contentType":"image/webp","width":128,"height":40,"frameCount":150,"durationMs":4918,"size":47820,"loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/32x10.gif"},"contentType":"image/gif","width":32,"height":10,"frameCount":150,"durationMs":4918,"size":57292,"format":"GifAnim","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/64x20.gif"},"contentType":"image/gif","width":64,"height":20,"frameCount":150,"durationMs":4918,"size":178999,"format":"GifAnim","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/96x30.gif"},"contentType":"image/gif","width":96,"height":30,"frameCount":150,"durationMs":4918,"size":244961,"format":"GifAnim","loopCount":-1},{"path":{"drive":"seventv-cdn","path":"66c7574435b1cfad7f1a37a4/128x40.gif"},"contentType":"image/gif","width":128,"height":40,"frameCount":150,"durationMs":4918,"size":320259,"format":"GifAnim","loopCount":-1}],"inputMetadata":{"path":{"drive":"seventv-cdn-private","path":"66c7574435b1cfad7f1a37a4"},"contentType":"image/avif-sequence","width":768,"height":256,"frameCount":150,"durationMs":5000,"size":22220,"loopCount":-1}}}
#

was the payload result

rugged perch
#

So...

#

Something on your end?

south flare
#

still not clear

#

something wrong in the AVIF encoding section

rugged perch
#

Try to local test your AVIF encoder locally

south flare
#

unsure if its our impl or libavif

#

are the images correct?

rugged perch
#

they all work

#

Although animated webp versions have some weird artifact on the colors

#

could be heavy comrpession

#

This one specifically, You can see the compression on that

sullen edge
rugged perch
#

Nice even discord can't process it? Pfftt

sullen edge
#

yea

rugged perch
#

No wayyy

south flare
#

its not embedding

rugged perch
south flare
#

it failed to upload

rugged perch
#

Yea even discord

sullen edge
#

in brwoser also

rugged perch
#

interesting

stuck oasis
rugged perch
#

lemme probe that

south flare
#

i see

rugged perch
#

yep that's what i Mean

south flare
#

we havent tuned it correctly it seems

rugged perch
#

umm

#

Background Color : 0 0 0 0

#

is this normal? since no transparency

south flare
#

r g b a

#

for which one is this

rugged perch
#

yea probing it doesn't give any odd values

south flare
#

is this the webp?

rugged perch
#

yes

#

This is gif

#

works with discord

#

and no artifacts

south flare
#

discord does not work with animated webp

rugged perch
#

oh really?

south flare
#

yes

rugged perch
#

yea you're right

#

ok well the artifacts on that webP is bad regardless of discord issue

paper token
sullen edge
#

@rigid narwhal so the issue with pngs was bit depth right? different from gif/avif?

paper token
#

It doesn't like soft moving edges. Hard edges don't have as much of a problem, because it can detect the color change

#

but yes this is a particularly poignant example of how bad webp can look after going through 7tv

rugged perch
#

But it shouldn't be this bad though

#

usually on the current image processor it should be okay

#

Also why does it fail on the new image processor, that's the real question

paper token
#

ok so

#

omitting the --fps flag for avifenc makes avifs that DO work

#

does the image processor still snap the fps to gif timings?

rugged perch
#

so without passing the --fps flag, What's the default fps

#

;lemme check that

#

send me the AVIF that works

paper token
#

after 7tv takes 2 years to process the emote, it ends up being twice as large

#

which is weird and ick

rugged perch
#

make 2 copies of that AVIF, 1 with the fps flag, And 1 without

#

lemme compare them

paper token
#

way ahead of you

rugged perch
#

amazing

paper token
#

that's what I did

#

the fps one fails

rugged perch
paper token
#

the one with "FPS" in the name is the one that passed the fps flag

#

maybe if I omitted the fps flag from ffmpeg, and ONLY passed it to avifenc, it would also work

#

I can try

rugged perch
paper token
rugged perch
#

ok

paper token
#

possibly because it has 2 fps flags

#

ffmpeg is passing its fps info to avifenc

#

but ideally the avifenc flag should override it

#

(expected behavior)

rugged perch
#

So the MothyFPS one gives this:
Time Scale : 30

#

Unlike the other oine which gives 25

paper token
#

that's weird

#

I used 30 for both

rugged perch
#

apperantly not?

#

MothSanityCheck.avif is longer than MothFPS.avif

paper token
#

so 25 fps is the default fps

rugged perch
#

which one of these that fails?

paper token
#

FPS

#

not sanity check

rugged perch
#

so ther FPS one is shorter, Yet the media scale is 30

#

unlike SanityCheck which has 25

#

and longer by 1 second

#

the other values are pretty much the same

#

so it's fps?

paper token
#

checking a few more things

paper token
#

7tv website being frustrating ๐Ÿ˜‚

rugged perch
#

ExifTool

#

most of the time it's helpful

paper token
#

which one?

#

there appear to be multiple by that name

#

@rugged perch

#

check this one

rugged perch
#

Time Scale : 100

#

100 fps?

#

idk if that's 100 fps

#

but timeScale is 100 so i guess it is ? 4Shrug

rotund pivot
#

no dark colors

paper token
#

apparently no avif was able to be generated for that

#

but gif and webp did

rugged perch
#

interesting . . . I wonder why

#

idk if fps would be the issue 4Shrug

rotund pivot
#

just make all the emotes mp4

#

with a button to play them

paper token
#

oh nevermind the avif did generate, but it just wasn't ready as early as the webp

paper token
#

it can be done properly

rotund pivot
#

nah the button has to stay

#

for comedic effect

paper token
#

but mp4 just means h.264 generally, which is less efficient than avif for this application

#

@rugged perch ok so the "ffmpeg -r only" one was actually still specifying fps to both ffmpeg and avifenc

south flare
#

i dont understand

rugged perch
#

so could it be the fps?

south flare
#
[image-processor/src/worker/process/encoder/libwebp.rs:57:3] &config = WebPConfig {
    lossless: 1,
    quality: 100.0,
    method: 6,
    image_hint: 0,
    target_size: 0,
    target_PSNR: 0.0,
    segments: 4,
    sns_strength: 50,
    filter_strength: 60,
    filter_sharpness: 0,
    filter_type: 1,
    autofilter: 0,
    alpha_compression: 1,
    alpha_filtering: 2,
    alpha_quality: 100,
    pass: 100,
    show_compressed: 0,
    preprocessing: 1,
    partitions: 0,
    partition_limit: 0,
    emulate_jpeg_size: 0,
    thread_level: 1,
    low_memory: 0,
    near_lossless: 100,
    exact: 1,
    use_delta_palette: 0,
    use_sharp_yuv: 0,
    qmin: 0,
    qmax: 100,
}
rugged perch
#

I'm not sure as well

south flare
#

this is the config we use for the webp encoding

rugged perch
#

I see no problem in that

#

but I don't see you guys defining any type of fps

south flare
#

because fps isnt a thing

rugged perch
#

do you detect the fps for the AVIF files? And extract frames?

south flare
#

fps isnt a thing

#

fps is a way we look at images

#

but in reality each frame has a duration

rugged perch
#

Media time then?

south flare
#

its more like a slide show

#

where each frame is shown for a specific duration

#

and fps is the average of that

rugged perch
#

well yea I understand that. But then why does it fail to be processed on your end? no error logs from the libavif at least?

south flare
#

this is webp

#

ill look at avif later

rugged perch
#

oh you're fixing the compression artifact I'm guessing

south flare
#

yes

rugged perch
#

isn't that good?

#

you want a lossy webp?

paper token
#

lossless webps are massive

#

and they don't have any visual artifacts

#

(because they're lossless)

rugged perch
#

well yea even with loseless = 1 config, It get's artifacts still

#

that's the issue I think

paper token
#

it's clearly not lossless

rotund pivot
paper token
#

my guess would be that the lossless setting is being overridden by all the lossy parameters being specified

south flare
#

i set the thing to lossless to test

paper token
#

new information unveiled!

#

so specifying the fps/rate to

  • avif = extremely long duration with exiftool, and 7tv fails to process, but plays at expected speed in browser
  • ffmpeg = defaults to 25 fps
  • both = correct frame rate
south flare
#

i am almost sure this is a libwebp bug

rugged perch
#

static right?

#

expected, Tried it yesterday

south flare
#

discord does not embed

#

open it in the browser

rugged perch
#

oh ok nvm

#

but this is better than the old artifact compression

#

wayy better

#

report it to libwebp then pspHappy

paper token
#

this is a tiny version though

south flare
#

this is lossless

paper token
#

which is less affected by the artifacts in question

south flare
#

and every single frame is a keyframe

#

when i do lossless without every frame being a keyframe we get artifacts

#

this is 100% a libwebp bug

paper token
#

hmm

paper token
#

which value?

south flare
#

the value on the line i linked

#

kmax

paper token
#

ah

#

it didn't take me to a line

#

well yes I would expect that to fix it, but the files will also be much bigger

south flare
#

this is a libwebp issue

paper token
#

I'm not sure about that

#

it might be something that is tuned poorly, but I think it's functioning as intended

#

webp is meant for much larger images

#

emotes are not a good use case for them

#

and paints with moving soft edges are the worst case

#

avif handles them like a champ though

south flare
#

our settings are

anim.allowed_mixed = 1;
anim.kmax = 1; // fixes the bug but makes much bigger files.

picture.use_argb = 1;

config.lossless = 1; // doesnt matter;
config.quality = 100; // doesnt seem to matter with the bug;
config.method = 6; // doesnt seem to matter witht he bug.
config.thread_level = 1; // doesnt seem to matter with the bug.
paper token
#

I assume "method" is "compression level"

south flare
#

actually

paper token
#

since they both max out at 6

zinc aspen
paper token
#

setting kmax to like 5 should also reduce the severity of the artifacts without TOO drastically increasing file size

south flare
#

actually

zinc aspen
south flare
#

setting kmax to 1 in that image

#

causes it to be smaller

#

than if i set it to 5

paper token
#

that's very weird

#

what about 2

zinc aspen
#

set it to 200 this will totally work !
Clueless

paper token
#

maybe it's not working like typical keyframes

south flare
#

infact

#

here

paper token
#

"contains errors" maaaaan

south flare
#

it seems libwebp is making bad images

zinc aspen
#

computer opens it in krita
wires

south flare
#

this is a libwebp bug for sure

zinc aspen
south flare
#

xd

#

there are none

rugged perch
#

PAUSE library makers

zinc aspen
#

oh Dies

rugged perch
#

7WebP

zinc aspen
#

thats unfortunate

paper token
#

chrome plays kmax5 but firefox says it contains errors

south flare
#

this is kmax2

#

doesnt upload either

rugged perch
#

yep

south flare
zinc aspen
#

if i knew literally fucking anything about manipulating image data i'd try to make one but i dont FeelsDankMan

south flare
#

so this is a webp bug

#

we should make an issue reporting it

zinc aspen
#

what causes the bug exactly

south flare
#

this image

zinc aspen
#

oh this one in specific??

#

why the fuck lmao

south flare
#

okay so im going to ignore the artifacts

#

now back to avif

zinc aspen
#

is this for a paint or

south flare
#

i suspect there is something special with this image

#

that causes avif to fail too

zinc aspen
#

so its not just webp that breaks

#

strange..

#

worlds most cursed fucking image ig

rugged perch
#

In the hope they respond with something

south flare
#

they are fast when its a bug with encoding

#

because virtually everything depends on this

rugged perch
zinc aspen
#

Mhmm i'd be SHOCKED if there wasn't a fast response

south flare
#

avif also passes Susge

zinc aspen
south flare
#

Susge perhaps the docker image we have for the image processor is old

#

they might have already fixed the issue with avif

zinc aspen
#

generate a new one..? uuh

#

just to test?

#

(tbh i have zero fucking clue how docker actually works i need to do research cuz every time i have to use docker i'm basically just winging it)

south flare
#

xd

#

i know what it is

#

avif has a width/height multiple requirement

#
2024-08-22T17:01:16.485615995+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76edcfe1bd0ac3bd2f145}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:115: starting job
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.width() = 32
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.height() = 10
2024-08-22T17:01:16.490963040+00:00 ERROR ThreadId(56) ProcessJob::process{job_id=66c76edcfe1bd0ac3bd2f145}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:167: failed to process job: encoder: avif: encode color failed
#

if i had to guess its multiples of 4

#
2024-08-22T17:01:16.452807214+00:00  INFO ThreadId(03) process_image:process_image: scuffle_image_processor::management: image-processor/src/management/mod.rs:33: new process image request
2024-08-22T17:01:16.485615995+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76edcfe1bd0ac3bd2f145}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:115: starting job
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.width() = 32
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.height() = 10
2024-08-22T17:01:16.490963040+00:00 ERROR ThreadId(56) ProcessJob::process{job_id=66c76edcfe1bd0ac3bd2f145}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:167: failed to process job: encoder: avif: encode color failed
2024-08-22T17:01:45.805677064+00:00  INFO ThreadId(03) process_image:process_image: scuffle_image_processor::management: image-processor/src/management/mod.rs:33: new process image request
2024-08-22T17:01:46.561961161+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76ef9fe1bd0ac3bd2f146}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:115: starting job
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.width() = 64
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.height() = 20
2024-08-22T17:01:46.975251092+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76ef9fe1bd0ac3bd2f146}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:163: job completed in 413.24328ms
2024-08-22T17:01:53.776022865+00:00  INFO ThreadId(03) process_image:process_image: scuffle_image_processor::management: image-processor/src/management/mod.rs:33: new process image request
2024-08-22T17:01:54.595982504+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76f01fe1bd0ac3bd2f147}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:115: starting job
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.width() = 96
[image-processor/src/worker/process/encoder/libavif.rs:104:4] frame.image.height() = 30
2024-08-22T17:01:55.023856008+00:00  INFO ThreadId(56) ProcessJob::process{job_id=66c76f01fe1bd0ac3bd2f147}: scuffle_image_processor::worker::process: image-processor/src/worker/process/mod.rs:163: job completed in 427.826163ms

#

it fails to encode the image when its 32x10 but succeeds when its 64x20

zinc aspen
rugged perch
#

So a fix for this would be a resize before process?

south flare
#

no we resize

#

but we resize it to 32x10

#

the input is bigge

rugged perch
#

damn

#

well if that works then why not MUGA

south flare
#

idk why the small image does not work

zinc aspen
south flare
#

also only an issue on the animation encoder

paper token
#

@south flare how is framerate determined?

#

it's still snapped to 25 fps and 33.333 fps right?

#

but is it rounded up/down/nearest?

south flare
#

no

#

frame rate does not exist

#

its per frame timings

paper token
#

I know

#

but I'm using words that make it easy to understand

zinc aspen
paper token
zinc aspen
#

how even

paper token
#

the timing of each frame is how the effective frame rate is determined

#

and vice versa, when encoding

zinc aspen
#

how do you even go about making something like that

zinc aspen
#

fair ig pepla

#

still crazy tho

south flare
#

okay wait what is ur question

#

how do we calculate the frame timings?

#

directly from the input image we do not change them

zinc aspen
#

my question is how the actual animation is made FeelsDankMan

#

like how you go from nothing to cool moving blobs of color like in that file

#

was a question for anson

south flare
#

that image u linked anson

#

took 8s to process

#

this is the result

south flare
zinc aspen
#

fair enough Okay

south flare
#

it seems

#

i got the resize right this time

#

and it results in a smaller file

#

the gif is big

#

but actually looks okay

rugged perch
#

that's wicked

south flare
#

ill investigate why libavif doesnt like files with small width/height

zinc aspen
#

looks sick af

paper token
#

10 ms intervals

south flare
#

we drop frames

#

to make the duration the same

paper token
#

drop frames from the gifs?

south flare
#

yes

paper token
#

so the avif and webp can be 60 fps?

south flare
#

for webp/avif we do not

#

yes

paper token
#

sick

#

could the dropped frames also be responsible for the glitchy rendering in discord?

#

missing frames of changed pixels

#

probably not tbh

#

because discord-encoded gifs have that same problem

south flare
#

no

#

that is the old processor

#

the new processor is not deployed

#

and that is just becasue discord engineers are retards

paper token
#

sick sick

south flare
#

and dont know how to implement gif encoding / decoding correctly

zinc aspen
#

i still hate that webp and avif dont fucking embed on discord

paper token
#

it's dumb

zinc aspen
paper token
#

same for opus files not being able to be previewed in-line

#

and other file types

#

even though voice messages are just opus files

south flare
#

They use electron

zinc aspen
south flare
#

They removed the feature

paper token
#

I know people that have switched to Revolt entirely

#

no more discord

#

it's not perfect, but it's surprisingly good

#

can be self-hosted

#

@south flare so why are 7tv's avifs twice the size of mine?

paper token
#

the ones I uploaded

#

the originals are like 100 kb

#

7tv are 200

south flare
#

I told u the new image processor is not deployed

#

so the old one is very old

#

the encoders have likely improved and thats why when i reencoded it for u just now i got 50kb

paper token
#

I know it's not deployed yet

#

50 kb is good

zinc aspen
#

isnt that like amazing or

paper token
#

well it's probably losing some quality

#

I'm using the latest version of libavif

south flare
#

so do we

zinc aspen
#

well yeah but its at least very small file

paper token
#

yes

zinc aspen
south flare
#

webp is 345kb

paper token
#

ideally paints could have different qualities load based on the needed size, like emotes

zinc aspen
#

but when are names ever large enough for that to matter
even then most of the image is being obscured and is only visible through the letters

#

the only way you'd notice the quality loss in the image is opening the image itself really

paper token
#

right

rotund pivot
#

every paint usually uses the 1x emote size anyway

zinc aspen
paper token
rotund pivot
#

mf watches twitch on 400% zoom

zinc aspen
#

anson with his browser zoomed in to 500x

paper token
#

same joke

zinc aspen
#

the fuck else conclusion do you expect us to make

rotund pivot
#

also chatterino wont even load the paints if the file is too big

zinc aspen
#

really?

#

interesting..

paper token
#

the twitchcon paris paint looks like white noise

rotund pivot
#

same thing happens with emote preview

zinc aspen
#

honestly i never noticed Shrugeg

#

didn't expect chatterino had a limit like that

rotund pivot
#

it just gives you 2x preview at most

south flare
#

okay

#

so the bug with avif

#

is actually a big with rav1e

#

it seems that if i use libaom it works

zinc aspen
rotund pivot
#

the 4x size is 1.2mb

zinc aspen
#

so it'll display the 3x one only?

rotund pivot
#

chatterino just shows the 2x

zinc aspen
#

o

rotund pivot
zinc aspen
#

interesting FeelsDankMan

#

whats the actual file size cap for that

#

1mb?

rotund pivot
#

even less

south flare
#

curious

#

wtf

#

okay

rotund pivot
#

cause the 3x is 887

south flare
#

rav1e is dogshit

#

it seems

#

lule

#

@paper token

zinc aspen
south flare
#

that image

zinc aspen
#

512kb??

south flare
#

the super complex one

paper token
rotund pivot
zinc aspen
# rotund pivot

wait a minute this is the 7tv version of chatterino right? cuz it doesn't show name paints on normal chatterino?

rotund pivot
#

yes

paper token
#

@rotund pivot do you use webp for all paints?

#

or is avif allowed?

zinc aspen
#

i wonder if i can find the file limit in the sorce code pepoNotes

rotund pivot
#

we dont use avifs for anything

paper token
#

L

zinc aspen
#

why render them then

#

if they're virtually useless why make them

rotund pivot
#

ffz has an option to show the avif files now for 7tv

zinc aspen
rotund pivot
paper token
#

but not even 7tv shows avif?

#

my disappointment is immeasurable

rotund pivot
#

the extension probably does? idk

south flare
#

using libaom is faster + doesnt have the issue with the sizing

#
job completed in 2.71011696s
#

the file is bigger tho

#

but it encodes much faster

zinc aspen
#

hmm

#

trying to figure out where in the chatterino7 source it mentions anything about emote/paint sizes to know when to fallback to smaller FeelsDankMan

#

if its even handled there in the first place

rotund pivot
#

why would it be a c7 issue only

#

or maybe nvm

zinc aspen
#

since namepaint is visible

rotund pivot
#

i guess paints are just a side effect

#

i assume it was mostly made for emotes

zinc aspen
#

i wonder if its actually something that happens on the 7tv api when passing the emotes/paints to chatterino or whatever FeelsDankMan

rotund pivot
#

also they dont even show up there

zinc aspen
#

weird considering the fact that from the looks of it, chatterino DOES try to get up to 4x

#

so like what the fuck happens to 4x and 3x

rotund pivot
#

even less

zinc aspen
#

huh

#

odd

rotund pivot
#

okay its completely random

zinc aspen
rotund pivot
#

cause this one displays correctly for example

#

but it never fixes itself

#

if an emote is fucked it just stays at 2x preview

zinc aspen
#

fucking weird

rotund pivot
#

still bigger file size seems to fail more often

zinc aspen
rotund pivot
#

now that i pointed it out i see more of them

zinc aspen
south flare
#

@strange owl @rigid narwhal

sullen edge
#
  1. this aint moving
  2. can I delete it already?
#

actually I'll unlist and you can delete when not needed

#

cause there are multiple

rugged perch
#

OOOO MY BADGE

#

Yes if you see any of these test ones you can delete them MUGA

rigid narwhal
#

PagMan holy shit, you guys found out so much stuff regarding the avif problem while I was away

#

also congrats on contributor ftk FeelsStrongMan

rugged perch
rugged perch
rugged perch
sullen edge
#

did you guys sort out the avif issue only or those broken gifs as well?

#

because I just remembered this exists

paper token
#

1 bit alpha, basically

paper token
# south flare

these appear to have a stutter right as they loop, that wasn't there in the original

rigid narwhal
#

hesBB true, the transparency is a gif limitation in general

sullen edge
#

so those broken gifs were because of variable transparency which we don't support?

paper token
#

"variable transparency" is just a way to try to explain the fact that gifs don't have an alpha channel

#

not a limitation of 7tv's implementation

sullen edge
#

so it's not even that we dont support it, it just doesnt exist?

paper token
#

right

#

gifs can have a maximum of 256 colors in their palette, and one of them can be designated as transparent

#

so it's either a color, or transparent

rigid narwhal
#

LELU and just like that we also have another emote that couldn't be uploaded, this time an animated png https://gachi.gay/BTqUh (sharing through that link, because discord breaks the file)

south flare
paper token
south flare
#

but for each frame

paper token
#

I give it a sequence of images and specify a frame rate

#

because I'm not insane

#

(not THAT insane)

south flare
#

but can u use a probe tool to show what it did

#

i dont have one for avif

paper token
#

I can run it through avifdec

#

it shows duration 0.03 (1 timescales)

#

weirdness discovered

#

your converted versions have 150 frames, each set to 0.04 (40 timescales)

#

except the first frame, which is 1 timescales

#

on MothSanityCheck (assuming that's the one that these came from) it's 150 frames, each at 0.04 duration and 1 timescales

rugged perch
#

here's the data I can find if it helps :

File Name                       : ezgif.com-resize 2 (1).png
Directory                       : .
File Size                       : 1859 kB
Zone Identifier                 : Exists
File Modification Date/Time     : 2024:08:23 01:36:33+03:00
File Access Date/Time           : 2024:08:23 01:37:44+03:00
File Creation Date/Time         : 2024:08:23 01:37:37+03:00
File Permissions                : -rw-rw-rw-
File Type                       : APNG
File Type Extension             : png
MIME Type                       : image/apng
Image Width                     : 127
Image Height                    : 127
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Animation Frames                : 112
Animation Plays                 : inf
Software                        : ezgif.com
Comment                         : PNG edited with https://ezgif.com/resize
Image Size                      : 127x127
Megapixels                      : 0.016
paper token
#

I'm checking other ones

#

because I have one that says it has 180 frames

#

and I can't figure out why

#

I think it's the one that I tried 33.333333 fps

#

which I guess makes sense

#

I guess it's resampling frames to get a specific framerate

#

avifdec -i {file} tells me everything I need, I think

rigid narwhal
rugged perch
#

Pfftt I remember when discord accepted them as the default sticker's file type

rigid narwhal
#

Interestingly enough windows also shows it's bit depth as 32 bit, but I'm not trusting that LELU

paper token
#

encoding with only ffmpeg (no avifenc) does weird things too

#

180 frames

#

man, webp is just such an awful format for this

#

vp8 ahh codec

#

why does exiftool say 150 frames = 5 seconds

#

for a gif

#

that shouldn't be possible

#

the gif plays slightly slower than the avif

#

so it's not being rounded up to 33.3333

rugged perch
#

that's soo weird

#

I didn't even know 7TV accepts aPNG's ngl

paper token
#

I tried avifenc's keyframe feature as well, and it does make larger files

#

which is odd

#

just like the webp one

#

ALTHOUGH it does seem to INCREASE the visual quality

#

by having keyframes enabled

#

I put -k 100

#

which means at least one keyframe every 100 frames

#

so a slight file size increase but also filesize increase

#

ok I made a 25 fps gif and it's WAY slower than the "30 fps" gif

#

I've always wondered if gifski might be swapping between 30 ms and 20 ms frame timings to achieve the given frame rate

#

it looks like it does

#

very cool

#

@south flare you use gifski too right?

#

Do you quantize the framerates or allow it to do this form of "dithering"?

#

because it's kinda based

#

I'm so confused

#

I can't create an avif with normal duration in exiftool anymore

#

they're all many millions of days

paper token
#

Ok so a 30 FPS webp file has a frame duration in the pattern of 33, 33, 34 (repeating), and when uploaded to 7TV, the processor converts them all to a frame duration of 30, which is 33.3333 FPS. This applies to the webp, avif, and gif outputs.

I still can't figure out how I made an avif that uploads, but the working files still work when uploaded. The only difference I can see is that they're 25 FPS. But when I try to make a new 25 FPS avif, they won't upload.

mortal fossilBOT
#

ansonx10 feels rested: ๐Ÿ› ๐Ÿ’ค (7h, 34m ago)

paper token
#

Uploading as a gif preserves the exact frame timings for all 3 converted formats

rugged perch
#

could that work?

#

for the AVIF at least

paper token
#

What else should I try?

rugged perch
#

60?

#

15?

paper token
#

I did try 60 but I forget the result

rugged perch
#

probably a fail if you don't remember

paper token
#

doesn't work

rugged perch
paper token
#

I tried ffmpeg -r, and avifenc --fps, and both

#

nothing worked

rugged perch
#

So AVIF's in general don't work?

#

of just specifically generating it with ffmpeg ?

paper token
#

the sanity check one still works

rugged perch
#

So that's the only way?

#

pretty odd

paper token
#

I don't even know what the "way" is though

#

I do not know the way

rugged perch
#

like

#

what did you do with the sanity check?

rugged perch
paper token
#

leaving only the ffmpeg -r flag

#

but I can't replicate it

rugged perch
#

ok

#

now removing the fos glag

#

fps flag*

#

what fps would be the AVIF at?

paper token
#

it seemed to default to 25 fps

rugged perch
#

but you setting the flag to 25 fps doesn't work

#

tf....

#

@paper token ok send me 2 files

#

Send me the sanity check without the --fps flag, and send me the one where you add the fps to be 25

paper token
rugged perch
#

lemme check them on my side an dsee

paper token
#

well

rugged perch
#

send me the AVIF that has the --fps flag with it beind 25 fps

paper token
#

I made one just now

#

I tried setting it back to what I remembered it was, which was yuva444p

rugged perch
paper token
#

I had been experimenting with yuv444p, because I don't need an alpha channel

rugged perch
#

i wanna compare both

paper token
#

latex25 uploads, latex30 does not

#

actually wait

#

this one uploads

native robin
#

for what is this channel?

stuck oasis
#

for developers

plush kayak
topaz crown
vagrant lion
rancid tulip
#

6Head

open mason
#

does 7tv got some documentation? I would like to integrate 7tv with an account to our site

open mason
astral saddle
tulip atlas
#

Hello, how I display the 7tv colors on my website? I have the color "-5635841" from the api but I don't know how I display this. Can anyone help me?

plush kayak
#

I suggest using this!! Okayge

tulip atlas
#

Thank you!

lyric cosmos
stuck oasis
#

add a way to use twitch id AA_Vanilla_Pray

lyric cosmos
stuck oasis
#

also that's a little mistake others have made before, some radial paints like tie-dye and strawberry creme have the repeat flag enabled which means you have to use repeating-radial-gradient() instead of just radial-gradient() for their gradient.

#

if you dont do that rthe paint gets rendered wrong

#

left is how its currently being rendered with just radial-gradient

#

and right with repeating

#

oh i guess there are also linear paints with it but you have that implemented already

lyric cosmos
#

If you recommend anything else please share and @ me

tulip atlas
#

How I get a 7tv user by the twitch user id?

plush kayak
#

u can just use /users/twitch/<twitch id>

lyric cosmos
plush kayak
tulip atlas
#

work it for every user or just for registered channels?

plush kayak
#

this is so easy to test but I will spoonfeed either way

stuck oasis
#

it works

topaz crown
# tulip atlas How I get a 7tv user by the twitch user id?
const query = {
  operationName: 'GetUserByConnection',
  query: `query GetUserByConnection($platform: ConnectionPlatform! $id: String!) {
    userByConnection (platform: $platform id: $id) {
        id
        type
        username
        style {
          paint { name id }
          badge { name id }
        }
        cosmetics {
          id
          kind
          selected
        }
    }
}`,
  variables: {
    platform,
    id: twitchID
  }
};

gets paint by platform id (twitch) so you dont need to make two requests

iron monolith
#

any updates on the new website / api v4?

sullen edge
#

it's being finalized

#

the API, website will take some more time

rugged perch
#

the new kick site sucks ass

#

They made it so hard to modify elements on that site, I suppose 7TV Will be a pain in the ass to be fixed on their new site

#

Like the devs are just trying so hard to now allow other devs to do whatever, it's so lame

sullen edge
#

or just the preview version

paper token
#

live

#

rolled out yesterday

rugged perch