
Recherche avancée
Autres articles (37)
-
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 (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (6973)
-
Can't link FFMPEG dynamically to VS 2019 project
10 février 2021, par Maya SelaI downloaded the source code of FFMPEG 3.4.8 and built with MSVC as such :

After unzipping, open x86_x64 Cross Tools Command Prompt for VS 2019 and runmsys2_shell.cmd
. From there, run

./configure --toolchain=msvc --arch=x86_64 --enable-yasm --enable-asm --enable-shared --disable-static

and
make



I then created a new project in VS 2019.

In Properties > C/C++ > General > Additional Include Directories :

(Where all the headers are)

E:\ffmpeg-3.4.8\libavutil
E:\ffmpeg-3.4.8\libavcodec
E:\ffmpeg-3.4.8\libavdevice
E:\ffmpeg-3.4.8\libavfilter
E:\ffmpeg-3.4.8\libavresample
E:\ffmpeg-3.4.8\libpostproc
E:\ffmpeg-3.4.8\libswscale
E:\ffmpeg-3.4.8\libswresample
E:\ffmpeg-3.4.8\libavformat



In Properties > Linker > General > Additional Library Directories :

(Where the .lib files are)

E:\ffmpeg-3.4.8\libavutil
E:\ffmpeg-3.4.8\libavcodec
E:\ffmpeg-3.4.8\libavdevice
E:\ffmpeg-3.4.8\libavfilter
E:\ffmpeg-3.4.8\libavresample
E:\ffmpeg-3.4.8\libpostproc
E:\ffmpeg-3.4.8\libswscale
E:\ffmpeg-3.4.8\libswresample
E:\ffmpeg-3.4.8\libavformat



In Properties > Linker > Input > Additional Dependencies :


avcodec.lib
avdevice.lib
avfilter.lib
avformat.lib
swresample.lib
swscale.lib



For good measure, I copied the .dll files of each library to the Release folder of the project. There is one source file I am trying to build and run :



extern "C" {
#include <libavformat></libavformat>avformat.h>
}

int main() {
 AVFormatContext* pFormatContext = avformat_alloc_context();
}



The result is as follows :


1>------ Build started: Project: FFMPEG_example, Configuration: Release x64 ------
1>Source.cpp
1>Source.obj : error LNK2001: unresolved external symbol avformat_alloc_context
1>C:\Users\maya.s\source\repos\FFMPEG_example\x64\Release\FFMPEG_example.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "FFMPEG_example.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Does anyone have an idea ?

Thanks !

-
Turn image sequence into video with transparency
5 juillet 2020, par Cody HatchI've got what seems like it should be a really simple problem, but it's proving much harder than I expected. Here's the issue :



I've got a fairly large image sequence consisting of numbered frames (output from Maya, for what its worth). The images are currently in Targa (.tga) format, but I could convert them to PNGs or other arbitrary format if that matters. The important thing is, they've got an alpha channel.



What I want to do is programatically turn them into a video clip. The format doesn't really matter, but it needs to be lossless and have an alpha channel. Uncompressed video in a Quicktime container would probably be ideal.



My initial thought was ffmpeg, but after wasting most of a day on it it seems it's got no support at all for alpha channels. Either I'm missing something, or the underlying libavcodec just doesn't do it.



So, what's the right way here ? A command line tool like ffmpeg would be nice, but any solution that runs on Windows and could be called from a script would be fine.



Note : Having an alpha chanel in your video isn't actually all that uncommon, and it's really useful if you want to composite it on top of another video clip or a still image. As far as I know uncompressed video, the Quicktime Animation codec, and the Sorenson Video 3 codec all support tranparency, and I've heard H.264 does as well. All we're really talking about is 32-bit color depth, and that's pretty widely supported ; both Quicktime .mov files and Windowss .avi files can handle it, and probably a lot more too.



Quicktime Pro is more than happy to turn an image sequence into a 32-bit .mov file. Hit export, change color depth to "Millions of Colors+", select the Animation codec, crank the quality up to 100, and there you are - losslessly compressed video, with an alpha chanel, and it'll play back almost anywhere since the codec has been part of Quicktime since version 1.0. The problem is, Quicktime Pro doesn't have any sort of command-line interface (at least on Windows). ffmpeg supports encoding using the Quicktime Animation codec (which it calls qtrle), but it only supports a bit-depth of 24 bits.



The issue isn't finding a video format that supports an alpha channel. Quicktime Animation would be ideal, but even uncompressed video should work. The problem is finding a tool that supports it.


-
NReco.VideoConverter.ConvertLiveMedia
12 décembre 2022, par PsychosocialI get an exception when trying to write a raw image to
ConvertLiveMedia
:



System.IO.IOException : "Канал был закрыт.


System.IO.IOException : "The channel has been closed."




var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
var frame = Bitmap.FromFile("source.jpg");
var bytes = ImageToByte(frame);

using (var fs = new FileStream("output.mp4", FileMode.Create))
{
 var mediaTask = ffMpeg.ConvertLiveMedia(Format.raw_video, fs, Format.mp4, new ConvertSettings()
 { 
 });
 
 mediaTask.Start();

 for (int f = 0; f < frames; f++)
 {
 mediaTask.Write(bytes, 0, bytes.Length); //exception here channel was closed
 }
 mediaTask.Stop();
}