I'm trying to get the duration of a gif.
The command ffmpeg -i https://cdn.7tv.app/emote/01F6MZGCNG000255K4X1K7NTHR/4x.gif
gives
Duration: N/A, start: 0.000000, bitrate: N/A
However if i download the file and pass it in
ffmpeg -i 4x.gif
it gives:
Duration: 00:00:07.92, start: 0.000000, bitrate: 1225 kb/s
The issue seems limited only to gifs on 7tv site.
ffmpeg -i https://c.tenor.com/ULCY5B996-oAAAAd/tenor.gif
).ffmpeg -i https://cdn.7tv.app/emote/01F6MZGCNG000255K4X1K7NTHR/4x.avif
)Here is the HTTP response header from 7tv site of that gif:
HTTP/2 200
content-type: image/gif
content-length: 1213725
x-7tv-cache-hits: 37527
x-7tv-cache: hit
age: 228365
cache-control: public, max-age=604800, s-maxage=86400, immutable
alt-svc: h3=":443"; ma=2592000
x-7tv-cdn-pod: cdn-ssprq
x-7tv-cdn-node: cdn-1
server: SevenTV
vary: origin, access-control-request-method, access-control-request-headers
access-control-allow-origin: *
access-control-expose-headers: *
date: Sun, 16 Feb 2025 20:47:28 GMT
Can someone help me understand? Something spcecific to this site is causing ffmpeg to behave differently?
Looks like a seek failed with the GIF on the 7tv site.
Allowing ffmpeg to cache the file will get you the duration.
ffmpeg -i cache:https://cdn.7tv.app/emote/01F6MZGCNG000255K4X1K7NTHR/4x.gif