
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (10067)
-
exe file not executing from deployed ASP.NET MVC app in TAS (Tanzu /PCF)
24 juin, par Darshan AdakaneI am facing an issue for my ASP.NET MVC web application on .NET 4 being deployed to TAS.


I am trying to do image compression using
ffmpeg.exe
.

While it is working on my local machine, I get an "500 internal server error" when deployed to TAS (tanzu application server). I am using
hwc_buildpack
and storing the file inPath.GetTemp()
folder for testing.

applications:
- name: MyApp-Dev
 memory: 1G
 instances: 1
 stack: windows
 buildpacks:
 - hwc_buildpack
 path: \MyAppnew\obj\Release\Package\PackageTmp
 env:
 services:
 routes:
 - route: myapp-dev.apps.company.com
 - route: myapp-dev.company.com



I also see that the
.exe
is being published when app I deployed. I am assuming if TAS has NO permission to read exe or read exe 'not allowed' policy.

This is my code :


[HttpPost]
[Route("uploadimage")]
public async Task<ihttpactionresult> UploadImage()
{
 try
 {
 if (!Request.Content.IsMimeMultipartContent())
 return BadRequest("Unsupported media type.");

 Console.WriteLine("UploadImage method started.");

 var provider = new MultipartMemoryStreamProvider();
 await Request.Content.ReadAsMultipartAsync(provider);

 Console.WriteLine($"Total Files available: {provider.Contents.Count}, {provider.Contents}");

 foreach (var file in provider.Contents)
 {
 try
 {
 var imageFile = await file.ReadAsByteArrayAsync();
 Console.WriteLine($"imageFile, { imageFile.Length }");
 var rawFileName = file.Headers.ContentDisposition.FileName.Trim('"');
 Console.WriteLine($"rawFileName, {rawFileName}");
 var fileName = Path.GetFileName(rawFileName); // Sanitize filename
 Console.WriteLine($"fileName, {fileName}");

 // Check file size limit (300MB)
 if (imageFile.Length > 300 * 1024 * 1024) // 300MB limit
 {
 Console.WriteLine("File size exceeds 300MB limit.");
 return BadRequest("File size exceeds 300MB limit.");
 }

 var inputFilePath = Path.Combine(_uploadFolder, fileName);
 Console.WriteLine($"inputFilePath, {inputFilePath}");

 var outputFilePath = Path.Combine(_uploadFolder, "compressed_" + fileName);
 Console.WriteLine($"outputFilePath, {outputFilePath}");

 // Save uploaded file to disk
 File.WriteAllBytes(inputFilePath, imageFile);

 // Check if the input file exists
 if (!File.Exists(inputFilePath))
 {
 Console.WriteLine($"Input file does not exist: {inputFilePath}");
 return InternalServerError(new Exception($"❌ Input file does not exist: {inputFilePath}"));
 }

 //Console.WriteLine($"✅ FFmpeg found at path: {ffmpegFullPath}");

 await FFMpegArguments
 .FromFileInput(inputFilePath)
 .OutputToFile(outputFilePath, overwrite: true, options => options
 .WithCustomArgument("-vf scale=800:-1")
 .WithCustomArgument("-q:v 10")
 )
 .ProcessAsynchronously();

 Console.WriteLine($"outputFilePath, {outputFilePath}");

 // Check if the output file was created
 if (File.Exists(outputFilePath))
 {
 var fileInfo = new FileInfo(outputFilePath); // Get file info

 Console.WriteLine($"outputFileInfoPropsFullName, {fileInfo.FullName}");
 Console.WriteLine($"outputFileInfoPropsLength, {fileInfo.Length}");

 var compressedFileBytes = File.ReadAllBytes(outputFilePath);
 var compressedFileBase64 = Convert.ToBase64String(compressedFileBytes);

 return Ok(new
 {
 Message = "Image uploaded and compressed successfully.",
 CompressedImagePath = outputFilePath,
 CompressedFileSize = fileInfo.Length, // Size in bytes
 CompressedFileBase64 = compressedFileBase64
 });
 }
 else
 {
 Console.WriteLine("OutputFilePath File not exists.");
 return InternalServerError(new Exception($"❌ Failed to create compressed file: {outputFilePath}"));
 });
 }
 catch (Exception ex)
 {
 Console.WriteLine($"File TRYCATCH:{ex}");
 return InternalServerError(new Exception("Image compression failed: " + ex.Message));
 }
 }
 }
 catch (Exception ex)
 {
 Console.WriteLine($"Method TRYCATCH:{ex}");
 throw;
 }

 return BadRequest("No image file uploaded.");
}
</ihttpactionresult>


I'm getting this error in my tanzu environment logs from the code when I execute :


await FFMpegArguments



This is the exception log :


FFMpegCore.Exceptions.FFMpegException: ffmpeg was not found on your system



I also see that the
.exe
files do exist in TAS in these logs :

2025-06-13T16:07:55.878+05:30 [APP/PROC/WEB/0] [OUT] PATH of FFmpeg Executable: C:\Users\vcap\app\ffmpeg-bin\ffmpeg.exe
2025-06-13T16:07:55.878+05:30 [APP/PROC/WEB/0] [OUT] PATH of ffmpegPath: C:\Users\vcap\app\ffmpeg-bin
2025-06-13T16:07:55.878+05:30 [APP/PROC/WEB/0] [OUT] PATH of BaseDirectory: C:\Users\vcap\app\
2025-06-13T16:07:55.881+05:30 [APP/PROC/WEB/0] [OUT] TempPath: C:\Users\vcap\AppData\Local\Temp\ 
 2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] at MCANew.Controllers.Api.MessagesController.<uploadimage>d__6.MoveNext() in I:\Agents\Agent-Win-B\_work\3033\s\MCANew\Controllers\Api\MessagesController.cs:line 133
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] --- End of stack trace from previous location where exception was thrown ---
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.FFMpegArgumentProcessor.<processasynchronously>d__24.MoveNext()
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.FFMpegArgumentProcessor.PrepareProcessArguments(FFOptions ffOptions, CancellationTokenSource& cancellationTokenSource)
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.Helpers.FFMpegHelper.VerifyFFMpegExists(FFOptions ffMpegOptions)
2025-06-24T18:39:50.684+05:30 [APP/PROC/WEB/0] [OUT] File TRYCATCH:FFMpegCore.Exceptions.FFMpegException: ffmpeg was not found on your system
</processasynchronously></uploadimage>


My objective is to run successfully exe on TAS and image compression to happen.


-
Reverse Engineering Clue Chronicles Compression
15 janvier 2019, par Multimedia Mike — Game HackingMy last post described my exploration into the 1999 computer game Clue Chronicles : Fatal Illusion. Some readers expressed interest in the details so I thought I would post a bit more about how I have investigated and what I have learned.
It’s frustrating to need to reverse engineer a compression algorithm that is only applied to a total of 8 files (out of a total set of 140), but here we are. Still, I’m glad some others expressed interest in this challenge as it motivated me to author this post, which in turn prompted me to test and challenge some of my assumptions.
Spoiler : Commenter ‘m’ gave me the clue I needed : PKWare Data Compression Library used the implode algorithm rather than deflate. I was able to run this .ini data through an open source explode algorithm found in libmpq and got the correct data out.
Files To Study
I uploaded a selection of files for others to study, should they feel so inclined. These include the main game binary (if anyone has ideas about how to isolate the decompression algorithm from the deadlisting) ; compressed and uncompressed examples from 2 files (newspaper.ini and Drink.ini) ; and the compressed version of Clue.ini, which I suspect is the root of the game’s script.The Story So Far
This ad-hoc scripting language found in the Clue Chronicles game is driven by a series of .ini files that are available in both compressed and uncompressed forms, save for a handful of them which only come in compressed flavor. I have figured out a few obvious details of the compressed file format :bytes 0-3 "COMP" bytes 4-11 unknown bytes 12-15 size of uncompressed data bytes 16-19 size of compressed data (filesize - 20 bytes) bytes 20- compressed payload
The average compression ratio is on the same order as what could be achieved by running ‘gzip’ against the uncompressed files and using one of the lower number settings (i.e., favor speed vs. compression size, e.g., ‘gzip -2’ or ‘gzip -3’). Since the zlib/DEFLATE algorithm is quite widespread on every known computing platform, I thought that this would be a good candidate to test.
Exploration
My thinking was that I could load the bytes in the compressed ini file and feed it into Python’s zlib library, sliding through the first 100 bytes to see if any of them “catch” on the zlib decompression algorithm.Here is the exploration script :
<script src="https://gist.github.com/multimediamike/c95f1a9cc58b959f4d8b2a299927d35e.js"></script>
It didn’t work, i.e., the script did not find any valid zlib data. A commentor on my last post suggested trying bzip2, so I tried the same script but with the bzip2 decompressor library. Still no luck.
Wrong Approach
I realized I had not tested to make sure that this exploratory script would work on known zlib data. So I ran it on a .gz file and it failed to find zlib data. So it looks like my assumptions were wrong. Meanwhile, I can instruct Python to compress data with zlib and dump the data to a file, and then run the script against that raw zlib output and the script recognizes the data.I spent some time examining how zlib and gzip interact at the format level. It looks like the zlib data doesn’t actually begin on byte boundaries within a gzip container. So this approach was doomed to failure.
A Closer Look At The Executable
Installation of Clue Chronicles results in a main Windows executable named Fatal_Illusion.exe. It occurred to me to examine this again, specifically for references to something like zlib.dll. Nothing like that. However, a search for ‘compr’ shows various error messages which imply that there is PNG-related code inside (referencing IHDR and zTXt data types), even though PNG files are not present in the game’s asset mix.But there are also strings like “PKWARE Data Compression Library for Win32”. So I have started going down the rabbit hole of determining whether the compression is part of a ZIP format file. After all, a ZIP local file header data structure has 4-byte compressed and uncompressed sizes, as seen in this format.
Binary Reverse Engineering
At one point, I took the approach of attempting to reverse engineer the binary. When studying a deadlisting of the code, it’s easy to search for the string “COMP” and find some code that cares about these compressed files. Unfortunately, the code quickly follows an indirect jump instruction which makes it intractable to track the algorithm from a simple deadlisting.I also tried installing some old Microsoft dev tools on my old Windows XP box and setting some breakpoints while the game was running and do some old-fashioned step debugging. That was a total non-starter. According to my notes :
Address 0x004A3C32 is the setup to the strncmp(“COMP”, ini_data, 4) function call. Start there.
Problem : The game forces 640x480x256 mode and that makes debugging very difficult.
Just For One Game ?
I keep wondering if this engine was used for any other games. Clue Chronicles was created by EAI Interactive. As I review the list of games they are known to have created (ranging between 1997 and 2000), a few of them jump out at me as possibly being able to leverage the same engine. I have a few of them, so I checked those… nothing. Then I scrubbed some YouTube videos showing gameplay of other suspects. None of those strike me as having similar engine characteristics to Clue Chronicles. So this remains a mystery : did they really craft this engine with its own scripting language just for one game ?The post Reverse Engineering Clue Chronicles Compression first appeared on Breaking Eggs And Making Omelettes.
-
10 Customer Segments Examples and Their Benefits
9 mai 2024, par Erin