Recherche avancée

Médias (0)

Mot : - Tags -/tags

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (86)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (5848)

  • How can I simply do color interpolation on this image and then save the image ? With RGBA channels as example

    24 août 2020, par karl-police

    So I got this GIF here :

    


    


    As you can see, it has Red, Green and Blue in it. And it also has a full transparency in it. This was composed together with FFMPEG out of images that looked exactly like that.

    


     

    


    Then, with FFMPEG I "decomposed" the RGB and Alpha channels using the filter "extractplanes".

    


    The gallery of that, in correct order starting from up to down, can be found here :

    


    https://imgur.com/a/WN0aGuW

    


    I am not sure if this actually helps me or if I'm supposed to decompose them. Because apperantly now, after decomposing them, I'm supposed to modify them, but I'm not really sure how. It's like how do I modify the red channel that only has black and white, so all at the end, will match to the specified HEX color that I want it to be to.

    


     

    


    Now, my question is. How do I exactly make the color changing happen ? Can I do this simply with JavaScript ? Is it possible to do with FFMPEG, if possible without ImageMagicks ? Maybe a programming language where not much installation is needed to do that ?

    


    What I understood is that. These channels basically contain values from 0 to 255 with black and white. I think the "brightness" is that what 0 and 255. So something inbetween, would be like grey.

    


    So basically, like we do (255,0,0) for red. In these channels, if I want red somewhere I need to put one fully white pixel on the red channel and on all the other channels, there has to be a fully black pixel.

    


    That's the concept. Now is the question, how can I do this ?

    


     

    


    At the end I want to make it look like this one as example :

    


    


    This is from a game. So basically that's how it looks like in the game. And the game files only use these RGBA template sprites.

    


     

    


    I asked a similar question here : How to change colors of an image using RGBA and more channels independently of their color

    


    But somehow, I might didn't seem to explain it that well.

    


     

    


    I made a thing here to test around with things. I guess that's nearly close, but the lines are kinda weird. jsfiddle.net/qsgazubk

    


  • FFmpeg command to draw text hindi font is working fine in windows command prompt but Batch script and simple CPP program in NOT working

    1er juillet 2022, par Abdullah Farweez

    Below ffmpeg command in working fine in command prompt

    


    ffmpeg -i video.mp4 -filter_complex "drawtext=fontfile=Khula-regular.ttf:fontsize=60:fontcolor=blue:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200" output.mp4


    


    giving expected result
enter image description here

    


    But if we run it as a bat file, it is not giving the expected output

    


        ::bat script start 
    @echo off
    ffmpeg -i video.mp4 -filter_complex "drawtext=fontfile=Khula-Regular.ttf:fontsize=60:fontcolor=blue:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200" output.mp4
:: bat script end


    


    This the CPP program which calling the ffmpeg command via system method

    


    #include <iostream>&#xA;#include <cstring>&#xA;#include &#xA;&#xA;using namespace std;&#xA;&#xA;int main()&#xA;{&#xA;  string command = "ffmpeg.exe -i video.mp4 -filter_complex \"drawtext=fontfile=Khula-Regular.ttf:fontsize=60:fontcolor=yellow:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200\" output.mp4";&#xA;  system(command.c_str());&#xA;  return 0;&#xA;}&#xA;</cstring></iostream>

    &#xA;

    same behavior as bat script.

    &#xA;

    screenshot of the output video.&#xA;enter image description here

    &#xA;

    Here is the additional information for the references

    &#xA;

    Folder structure

    &#xA;

    .&#xA;|-- Khula-Regular.ttf&#xA;|-- cpp_program.exe&#xA;|-- command.cpp&#xA;|-- ffmpeg.exe&#xA;|-- ffplay.exe&#xA;|-- ffprobe.exe&#xA;|-- output.mp4&#xA;|-- run.bat&#xA;`-- video.mp4&#xA;&#xA;C:\bin&#xA;

    &#xA;

    FFmpeg info

    &#xA;

    $ ffmpeg&#xA;ffmpeg version N-107262-g4454142782-20220628 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220628&#xA;  libavutil      57. 27.100 / 57. 27.100&#xA;  libavcodec     59. 34.100 / 59. 34.100&#xA;  libavformat    59. 25.100 / 59. 25.100&#xA;  libavdevice    59.  6.100 / 59.  6.100&#xA;  libavfilter     8. 41.100 /  8. 41.100&#xA;  libswscale      6.  6.100 /  6.  6.100&#xA;  libswresample   4.  6.100 /  4.  6.100&#xA;  libpostproc    56.  5.100 / 56.  5.100&#xA;Hyper fast Audio and Video encoder&#xA;usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&#xA;&#xA;Use -h to get full help or, even better, run &#x27;man ffmpeg&#x27;&#xA;

    &#xA;

    PS : FFmpeg does not showing any error while processing in bat or cpp_program, but output is not giving in the specified font instead giving in random characters in the final output.mp4

    &#xA;

  • unable to successfully close ffmpeg stream in node.js

    25 septembre 2022, par K. Russell Smith

    i'm trying to write a node video app that generates frames using the canvas api (via node-canvas, the project's only npm dependancy right now), and writes it to ffmpeg via a stream to generate a video :

    &#xA;

    const { createCanvas } = require(&#x27;canvas&#x27;);&#xA;const { spawn } = require(&#x27;child_process&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const canvas = createCanvas(1280, 720);&#xA;&#xA;const ffmpeg = spawn(&#x27;ffmpeg&#x27;, [&#xA;    &#x27;-y&#x27;,&#xA;    &#x27;-f&#x27;, &#x27;rawVideo&#x27;,&#xA;    &#x27;-vcodec&#x27;, &#x27;rawVideo&#x27;,&#xA;    &#x27;-pix_fmt&#x27;, &#x27;rgb24&#x27;,&#xA;    &#x27;-s&#x27;, `${ canvas.width }x${ canvas.height }`,&#xA;    &#x27;-r&#x27;, &#x27;40&#x27;,&#xA;    &#x27;-i&#x27;, &#x27;-&#x27;, &#x27;-f&#x27;, &#x27;mp4&#x27;,&#xA;    &#x27;-q:v&#x27;, &#x27;5&#x27;,&#xA;    &#x27;-an&#x27;, &#x27;-vcodec&#x27;, &#x27;mpeg4&#x27;, &#x27;output.mp4&#x27;,&#xA;]);&#xA;&#xA;const ctx = canvas.getContext(&#x27;2d&#x27;);&#xA;ctx.font = &#x27;30px Prime&#x27;;&#xA;ctx.fillStyle = &#x27;blue&#x27;;&#xA;ctx.textAlign = &#x27;center&#x27;;&#xA;ctx.textBaseline = &#x27;middle&#x27;;&#xA;ctx.fillText(&#x27;Hello Canvas&#x27;, canvas.width / 2, canvas.height / 2);&#xA;&#xA;for (let i = 0; i &lt; 250; &#x2B;&#x2B;i)&#xA;{&#xA;    console.log(i);&#xA;    ffmpeg.stdin.write(Buffer.from(ctx.getImageData(0, 0, canvas.width, canvas.height).data));&#xA;}&#xA;ffmpeg.stdin.end();&#xA;

    &#xA;

    unfortunately, when i run it, the program throws this after writing the frames :

    &#xA;

    node:events:368&#xA;      throw er; // Unhandled &#x27;error&#x27; event&#xA;      ^&#xA;&#xA;Error: write EPIPE&#xA;    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16)&#xA;Emitted &#x27;error&#x27; event on Socket instance at:&#xA;    at emitErrorNT (node:internal/streams/destroy:164:8)&#xA;    at emitErrorCloseNT (node:internal/streams/destroy:129:3)&#xA;    at processTicksAndRejections (node:internal/process/task_queues:83:21) {&#xA;  errno: -32,&#xA;  code: &#x27;EPIPE&#x27;,&#xA;  syscall: &#x27;write&#x27;&#xA;}&#xA;&#xA;Node.js v17.1.0&#xA;

    &#xA;

    what am i doing wrong ?

    &#xA;