
Recherche avancée
Autres articles (39)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (5776)
-
Runtime.exec() freezes on execution of ffmpeg Audio-replacing command that works in windows console
17 février 2024, par Finn Andre WormI have been building an application to merge together videos based on data I got from the web. I was lucky enough to find this great tool ffmpeg that has saved me a lot of time and effort, but unfortunately I seem to be stuck on the following issue :


Im attempting to execute a command for merging a video with audio (in the future I will also be adding hardcoded .ASS subtitles and .PNG images).
My application dynamically generates me a command based on the files its suppposed to use which works just as intended, as the command that I get works inside of my windows console (cmd).
But when I try to run it through my Java application, the code seems to "freeze" permanently and while the placeholder file gets created on my desktop with the filename and correct file format, it just has the default windows video icon and cant be opened (as it has not finished being created, duh).
Im also using Eclipse, perhaps thats worth noting.


This is the part of the code where it freezes :


protected void runFFMPEG(Multimap args, String outputFile, String fileFormat) throws IOException
{
 try
 {
 Runtime.getRuntime().exec(setCommand(args, outputFile, fileFormat)).waitFor();
 }
 catch (InterruptedException e)
 {
 e.printStackTrace();
 }
}



as previously said, the command itself is generated correctly, but heres the code nonetheless :


private String[] setCommand(Multimap args, String outputFile, String fileFormat)
{
 String[] command = new String[args.size()*2+2];
 command[0] = ffmpegLocation;
 int[] i = new int[1];
 i[0] = 1;
 args.forEach((key, value) -> { 
 command[i[0]++] = key;
 command[i[0]++] = value;
 });
 command[i[0]] = outputFile + fileFormat;
 return command;
}



Note : I used a normal string previously for command, but I saw another thread saying that using an array instead fixxed their issue (which it didnt for me, else i wouldnt be here...).


This is an example command that gets generated :


ffmpeg.exe -ss 00:00:00 -to 00:00:15 -i C :\Users\Test.mp4 -i C :\Users\FINAL.mp3 -map 0 -map 1:a -c:v copy C :/Users/User/TestVideo.mp4


I also have a different command that concats the audio together into one FINAL.mp3 file, so its not like ffmpeg entirely fails to work in my application.
My guess is that it has something to do with the Runtime i get with Runtime.getRunTime(), but I cant seem to find out what the problem is.
Can someone tell me what I did wrong ? Thanks in advance !


-
lavfi : add ICC profile support via lcms2
9 avril 2022, par Niklas Haaslavfi : add ICC profile support via lcms2
This introduces an optional dependency on lcms2 into FFmpeg. lcms2 is a
widely used library for ICC profile handling, which apart from being
used in almost all major image processing programs and video players,
has also been deployed in browsers. As such, it's both widely available
and well-tested.Add a few helpers to cover our major use cases. This commit merely
introduces the helpers (and configure check), even though nothing uses
them yet.It's worth pointing out that the reason the cmsToneCurves for each
AVCOL_TRC are cached inside the context, is because constructing a
cmsToneCurve requires evaluating the curve at 4096 (by default) grid
points and constructing a LUT. So, we ideally only want to do this once
per curve. This matters for e.g. ff_icc_profile_detect_transfer, which
essentially compares a profile against all of these generated LUTs.
Re-generating the LUTs for every iteration would be unnecessarily
wasteful.The same consideration does not apply to e.g. cmsCreate*Profile, which
is a very lightweight operation just involving struct allocation and
setting a few pointers.The cutoff value of 0.01 was determined by experimentation. The lowest
"false positive" delta I saw in practice was 0.13, and the largest
"false negative" delta was 0.0008. So a value of 0.01 sits comfortaby
almost exactly in the middle.Signed-off-by : Niklas Haas <git@haasn.dev>
-
How to use Visual Studio Compiled libs with MSYS pkg-config
18 août 2017, par maxhapFirst a bit of background.
I’m trying to compile ffmpeg on windows with the libass extensions/configuration option.
Using the visual studio project libass-msvc I built libass using Visual Studio as a static lib.
I then installed MinGW with MSYS and pkg-config. Following the instructions on the ffmpeg MSVC installation guide I configured the environment to build with the MSVC linker and to build in x64.
When I try to configure libass for compilation using ./configure —enable-libass —toolchain=msvc I get the following error in the log file :
File not found ass/ass.h
pkg-config can not find libassI have tried the following to fix this.
-
Create a .pc file for libass and add this to the PKG_CONFIG_PATH environment variable. See file content below. (After doing this pkg-config libass —version prints 0.81, not the right version number but at least something.)
-
Copy libass .h files into a MinGW/include/ass folder and the .lib file into the MinGW/libs folder.
-
Add libass include and bin folders to PATH environment variable
-
Download libass and dependencies source then try to build it using MSYS with MSVC compiler. My aim here was to be able to use "make install" and let MinGW install libass to the correct locations. After hours of trying to fix linker errors, I abandoned this idea as some of the libass dependencies make files only work with the GCC GNU compiler.
-
Compile libass with GCC GNU using MinGW make/make install then try and install libass using the GNU libs. Again this led to linker errors (I know this was a bad idea but was worth a try).
-
Tried using extra lib and include build configuration options —extra-cflags="ffmpeg-dir/extra/include" \
— extra-ldflags="ffmped-dir/extra/ffmpeg_build/lib" then adding the libs and .h files into those locations
.pc file
libass.pc:
prefix=/MinGW
includedir=libass-directory/include
libdir=libass-director/x64/bin/
Name: libass
Description: Libass project
Version: 0.13.7I am now completely stuck and out of ideas if anyone could give any insight or suggestions into what I’m doing wrong that would be fantastic.
Thanks in advanced !
-