
Recherche avancée
Autres articles (75)
-
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 -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (7117)
-
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.


-
Preserving alpha when re-encoding VP8/VP9 WebM in FFmpeg without specifying input codec [closed]
29 août, par mstyuraI'm trying to understand why re-encoding a
VP8
orVP9
WebM
with alpha channel produces black pixels instead of preserving transparency.

I simplified the problem to re-encoding
VP8
with alpha toVP9
with alpha :

ffmpeg -i video-vp8-with-alpha.webm -c:v libvpx-vp9 video-vp8-with-alpha-bad.webm



The output loses the alpha channel.
ffprobe
shows :

Input #0, matroska,webm, from 'video-vp8-with-alpha-bad.webm':
 Metadata:
 ENCODER : Lavf62.1.103
 Duration: 00:00:03.07, start: 0.017000, bitrate: 152 kb/s
 Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv, bt470bg/bt709/bt709, progressive), 720x1560, SAR 1:1 DAR 6:13, 30 fps, 30 tbr, 1k tbn, start 0.067000
 Metadata:
 ENCODER : Lavc62.8.101 libvpx-vp9
 ALPHA_MODE : 1
 DURATION : 00:00:03.066000000
 Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp, start 0.017000
 Metadata:
 ENCODER : Lavc62.8.101 libopus
 DURATION : 00:00:03.049000000



However, if I explicitly force the input codec :


ffmpeg -c:v libvpx -i video-vp8-with-alpha.webm -c:v libvpx-vp9 video-vp8-with-alpha-good.webm



The alpha channel is preserved.
ffprobe
shows :

Input #0, matroska,webm, from 'video-vp8-with-alpha-good.webm':
 Metadata:
 ENCODER : Lavf62.1.103
 Duration: 00:00:03.07, start: 0.017000, bitrate: 400 kb/s
 Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv, unknown/bt709/bt709, progressive), 720x1560, SAR 1:1 DAR 6:13, 30 fps, 30 tbr, 1k tbn, start 0.067000
 Metadata:
 ENCODER : Lavc62.8.101 libvpx-vp9
 ALPHA_MODE : 1
 DURATION : 00:00:03.066000000
 Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp, start 0.017000
 Metadata:
 ENCODER : Lavc62.8.101 libopus
 DURATION : 00:00:03.049000000



I don't know in advance whether the input is VP8 or VP9, and I don't want to run
ffprobe
beforeffmpeg
.

How can I make ffmpeg automatically preserve the alpha channel from the input file without explicitly specifying the decoder ?


The
ffmpeg
from commit 0828a3b636 ;

Build of
ffmpeg
download from BtbN/FFmpeg-Builds

-
ffmpeg : fisheye -> rectilinear conversion with remap_opencl : green tinted output [closed]
4 septembre, par thinkfatI'm having a bit of a problem converting a fisheye video from an Insta360 camera to rectilinear. I know how to do it with the v360 filter but obviously it's slow, just barely realtime. I'm trying to set up a filter chain that uses remap_opencl and vaapi to keep everyhing in hw frames. I did succeed, technically, but the output video has a green tint, which hints that there is some pixel format related issue.


The whole thing is on Linux, (openSUSE Tumbleweed if thats of any interest), a KabyLake platform with Intel HD 620 GPU. Using the NEO OpenCL driver from Intel (24.something, last version that still supported those GPUs). It implements va-opencl media sharing.


This is the chain I came up with :


[0:v]hwmap=derive_device=opencl[vid];
 [1:v]hwupload[xm];
 [2:v]hwupload[ym];
 [vid][xm][ym]remap_opencl[out];
 [out]hwmap=derive_device=vaapi:reverse=1[vout]



The input into the chain are from a vaapi h.264 decoder and two precomputed maps in PGM format. All good here. The chain works and produces an output video that shows the mapping worked and that all the frames make it through the chain. It's fast, too, about 5x realtime. But the output video has a greenish tint which tells me that somewhere in the chain there is a pixel format related hickup. Obviously I want to avoid costly intermediate CPU involvement, so hwdownload,hwupload kind of defeats the purpose.


This is the command line :


ffmpeg -init_hw_device opencl=oc0:0.0 -filter_hw_device oc0
 -init_hw_device" vaapi=va:/dev/dri/renderD128
 -vaapi_device /dev/dri/renderD128
 -hwaccel vaapi
 -hwaccel_output_format vaapi
 -i input.mp4
 -i xmap.pgm
 -i ymap.pgm
 -filter_complex <filter chain="chain">
 -map [vout]
 -c:v h264_vaapi
 -c:a copy
 -y output.mp4
</filter>


I'm looking for a way to do an explicit pixel format conversion before/after mapping the frames between the different hardware contexts. I tried it on the vaapi side by adding a "scale_vaapi=format=
", but whatever I put there, it completely breaks the filter chain because of impossible conversions between formats. 

This is the ffmpeg version :


ffmpeg version N-120955-g6ce02bcc3a Copyright (c) 2000-2025 the FFmpeg developers


I had to compile it manually because nothing I had on the distro supported opencl and va-opencl media sharing.