
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (86)
-
Installation en mode ferme
4 février 2011, parLe 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, parDans 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, parUtilité
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-policeSo 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 :




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 FarweezBelow 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





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>
#include <cstring>
#include 

using namespace std;

int main()
{
 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";
 system(command.c_str());
 return 0;
}
</cstring></iostream>


same behavior as bat script.


screenshot of the output video.



Here is the additional information for the references


Folder structure


.
|-- Khula-Regular.ttf
|-- cpp_program.exe
|-- command.cpp
|-- ffmpeg.exe
|-- ffplay.exe
|-- ffprobe.exe
|-- output.mp4
|-- run.bat
`-- video.mp4

C:\bin



FFmpeg info


$ ffmpeg
ffmpeg version N-107262-g4454142782-20220628 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
 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
 libavutil 57. 27.100 / 57. 27.100
 libavcodec 59. 34.100 / 59. 34.100
 libavformat 59. 25.100 / 59. 25.100
 libavdevice 59. 6.100 / 59. 6.100
 libavfilter 8. 41.100 / 8. 41.100
 libswscale 6. 6.100 / 6. 6.100
 libswresample 4. 6.100 / 4. 6.100
 libpostproc 56. 5.100 / 56. 5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'



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


-
unable to successfully close ffmpeg stream in node.js
25 septembre 2022, par K. Russell Smithi'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 :


const { createCanvas } = require('canvas');
const { spawn } = require('child_process');
const fs = require('fs');
const canvas = createCanvas(1280, 720);

const ffmpeg = spawn('ffmpeg', [
 '-y',
 '-f', 'rawVideo',
 '-vcodec', 'rawVideo',
 '-pix_fmt', 'rgb24',
 '-s', `${ canvas.width }x${ canvas.height }`,
 '-r', '40',
 '-i', '-', '-f', 'mp4',
 '-q:v', '5',
 '-an', '-vcodec', 'mpeg4', 'output.mp4',
]);

const ctx = canvas.getContext('2d');
ctx.font = '30px Prime';
ctx.fillStyle = 'blue';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText('Hello Canvas', canvas.width / 2, canvas.height / 2);

for (let i = 0; i < 250; ++i)
{
 console.log(i);
 ffmpeg.stdin.write(Buffer.from(ctx.getImageData(0, 0, canvas.width, canvas.height).data));
}
ffmpeg.stdin.end();



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


node:events:368
 throw er; // Unhandled 'error' event
 ^

Error: write EPIPE
 at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16)
Emitted 'error' event on Socket instance at:
 at emitErrorNT (node:internal/streams/destroy:164:8)
 at emitErrorCloseNT (node:internal/streams/destroy:129:3)
 at processTicksAndRejections (node:internal/process/task_queues:83:21) {
 errno: -32,
 code: 'EPIPE',
 syscall: 'write'
}

Node.js v17.1.0



what am i doing wrong ?