elringus / imgit Goto Github PK
View Code? Open in Web Editor NEWTransform images, video and YouTube links to HTML optimized for web vitals
Home Page: https://imgit.dev
License: MIT License
Transform images, video and YouTube links to HTML optimized for web vitals
Home Page: https://imgit.dev
License: MIT License
Implement log.tty
for Deno platform.
imgit/src/server/platform/deno.ts
Lines 71 to 72 in f5cda02
Instead of resolving content MIME type via file extension, consider using file --mime-type
utility available by default on Linux and Mac. On Windows similar is available via file utility available on choco.
Find a way to resolve actual codec spec used by ffmpeg for each run. Currently we're sharing a value manually evaluated by following the guide: https://jakearchibald.com/2022/html-codecs-parameter-for-av1 It's valid at the moment, but may change between ffmpeg releases.
I got this on my markdown:
![xkcd about workflow](https://imgs.xkcd.com/comics/workflow.png)
Imgit tries to invoke ffmpeg
and convert it to av1, which throws this error:
21:00:09 [ERROR] [vite] [imgit] Command failed: ffmpeg -y -loglevel error -i "/home/lotus/Workspace/blog/public/imgit/fetched/imgs.xkcd.com-comics-workflow.png" -c:v libaom-av1 -still-picture 1 -crf 23 -cpu-used 5 -an -filter_complex "[0:v]scale=iw*1:-1" "/home/lotus/Workspace/blog/public/imgit/encoded/[email protected]"
Unrecognized option 'still-picture'.
Error splitting the argument list: Option not found
ffmpeg info:
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.3.0 (GCC)
configuration: --disable-static --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0 --target_os=linux --arch=x86_64 --pkg-config=pkg-config --enable-gpl --enable-version3 --disable-nonfree --enable-shared --enable-pic --disable-small --enable-runtime-cpudetect --disable-gray --enable-swscale-alpha --enable-hardcoded-tables --enable-safe-bitstream-reader --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --datadir=/nix/store/5zl2754g2r43yp553634fzbligcvj172-ffmpeg-6.0-data/share/ffmpeg --enable-ffmpeg --disable-ffplay --enable-ffprobe --bindir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0-bin/bin --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avutil --enable-postproc --enable-swresample --enable-swscale --libdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0-lib/lib --incdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0-dev/include --enable-doc --enable-htmlpages --enable-manpages --mandir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0-man/share/man --enable-podpages --enable-txtpages --docdir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ffmpeg-6.0-doc/share/doc/ffmpeg --enable-alsa --enable-bzlib --disable-libcelt --disable-cuda --disable-cuda-llvm --enable-libdav1d --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --disable-frei0r --disable-libfribidi --disable-libgme --enable-gnutls --disable-libgsm --disable-ladspa --enable-libmp3lame --disable-libaom --enable-libass --disable-libbluray --disable-libbs2b --disable-libdc1394 --enable-libdrm --enable-iconv --disable-libjack --disable-libmfx --disable-libmodplug --disable-libmysofa --enable-libopus --disable-librsvg --enable-libsrt --enable-libssh --disable-libtensorflow --enable-libtheora --enable-libv4l2 --enable-v4l2-m2m --enable-vaapi --enable-vdpau --enable-libvorbis --disable-libvmaf --enable-libvpx --disable-libwebp --disable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape --disable-libxml2 --enable-lzma --enable-cuvid --enable-nvdec --enable-nvenc --disable-openal --disable-opencl --disable-libopencore-amrnb --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --enable-libpulse --disable-librav1e --enable-libsvtav1 --disable-librtmp --enable-sdl2 --enable-libsoxr --enable-libspeex --disable-libvidstab --disable-libvo-amrwbenc --enable-libx264 --enable-libx265 --disable-libxavs --enable-libxvid --disable-libzmq --enable-libzimg --enable-zlib --disable-vulkan --disable-libglslang --disable-libsmbclient --disable-debug --enable-optimizations --disable-extra-warnings --disable-stripping
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Hyper fast Audio and Video encoder
Consider when following is resolved:
The type declared for the Astro plugin specifies unknown[]
for Vite's plugin config. This is incompatible with the real AstroIntegration
type from astro.
astro.config.mts:110:5 - error TS2322: Type 'AstroIntegration' is not assignable to type 'false | AstroIntegration | (false | AstroIntegration | null | undefined)[] | null | undefined'.
Type 'AstroIntegration' is not assignable to type 'import("/home/lotus/Workspace/blog/node_modules/.pnpm/[email protected][email protected]/node_modules/astro/dist/@types/astro").AstroIntegration'.
The types of 'hooks['astro:config:setup']' are incompatible between these types.
Type '((options: { injectScript: AstroInjector; updateConfig: (config: { vite: { plugins: unknown[]; }; }) => void; }) => void | Promise<void>) | undefined' is not assignable to type '((options: { config: AstroConfig; command: "build" | "dev" | "preview"; isRestart: boolean; updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig; ... 8 more ...; logger: AstroIntegrationLogger; }) => void | Promise<...>) | undefined'.
Type '(options: { injectScript: AstroInjector; updateConfig: (config: { vite: { plugins: unknown[]; }; }) => void; }) => void | Promise<void>' is not assignable to type '(options: { config: AstroConfig; command: "build" | "dev" | "preview"; isRestart: boolean; updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig; ... 8 more ...; logger: AstroIntegrationLogger; }) => void | Promise<...>'.
Types of parameters 'options' and 'options' are incompatible.
Type '{ config: AstroConfig; command: "build" | "dev" | "preview"; isRestart: boolean; updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig; ... 8 more ...; logger: AstroIntegrationLogger; }' is not assignable to type '{ injectScript: AstroInjector; updateConfig: (config: { vite: { plugins: unknown[]; }; }) => void; }'.
Types of property 'updateConfig' are incompatible.
Type '(newConfig: DeepPartial<AstroConfig>) => AstroConfig' is not assignable to type '(config: { vite: { plugins: unknown[]; }; }) => void'.
Types of parameters 'newConfig' and 'config' are incompatible.
Type '{ vite: { plugins: unknown[]; }; }' is not assignable to type 'DeepPartial<AstroConfig>'.
The types of 'vite.plugins' are incompatible between these types.
Type 'unknown[]' is not assignable to type 'DeepPartial<PluginOption[] | undefined>'.
Type 'unknown' is not assignable to type 'PluginOption'.
110 imgit({}),
Line 11 in e449e6f
That plugins: unknown[]
is inside a function parameter, making the type of updateConfig
contravariant over it. But the updateConfig
field is itself part of a function parameter, meaning that astro:config:setup
and by extension AstroIntegration
contravariant over updateConfig
. Transitively, AstroIntegration
is covariant over the plugins
field.
This means that assigning this AstroIntegration
type over Astro's actual type would require unknown
to be assignable to Vite's PluginOption
, but of course unknown
is not assignable to anything except itself by definition (since it is a top type).
The field should either:
PluginOption
PluginOptions
, possibly with only the used propertiesany
, which is both a top and bottom type and accepts any assignment in both directionsA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.