Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (76)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (9125)

  • exe file not executing from deployed ASP.NET MVC app in TAS (Tanzu /PCF)

    24 juin, par Darshan Adakane

    I am facing an issue for my ASP.NET MVC web application on .NET 4 being deployed to TAS.

    &#xA;

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

    &#xA;

    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 in Path.GetTemp() folder for testing.

    &#xA;

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

    &#xA;

    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.

    &#xA;

    This is my code :

    &#xA;

    [HttpPost]&#xA;[Route("uploadimage")]&#xA;public async Task<ihttpactionresult> UploadImage()&#xA;{&#xA;    try&#xA;    {&#xA;        if (!Request.Content.IsMimeMultipartContent())&#xA;            return BadRequest("Unsupported media type.");&#xA;&#xA;        Console.WriteLine("UploadImage method started.");&#xA;&#xA;        var provider = new MultipartMemoryStreamProvider();&#xA;        await Request.Content.ReadAsMultipartAsync(provider);&#xA;&#xA;        Console.WriteLine($"Total Files available: {provider.Contents.Count}, {provider.Contents}");&#xA;&#xA;        foreach (var file in provider.Contents)&#xA;        {&#xA;            try&#xA;            {&#xA;                var imageFile = await file.ReadAsByteArrayAsync();&#xA;                Console.WriteLine($"imageFile, { imageFile.Length }");&#xA;                var rawFileName = file.Headers.ContentDisposition.FileName.Trim(&#x27;"&#x27;);&#xA;                Console.WriteLine($"rawFileName, {rawFileName}");&#xA;                var fileName = Path.GetFileName(rawFileName); // Sanitize filename&#xA;                Console.WriteLine($"fileName, {fileName}");&#xA;&#xA;                // Check file size limit (300MB)&#xA;                if (imageFile.Length > 300 * 1024 * 1024) // 300MB limit&#xA;                {&#xA;                    Console.WriteLine("File size exceeds 300MB limit.");&#xA;                    return BadRequest("File size exceeds 300MB limit.");&#xA;                }&#xA;&#xA;                var inputFilePath = Path.Combine(_uploadFolder, fileName);&#xA;                Console.WriteLine($"inputFilePath, {inputFilePath}");&#xA;&#xA;                var outputFilePath = Path.Combine(_uploadFolder, "compressed_" &#x2B; fileName);&#xA;                Console.WriteLine($"outputFilePath, {outputFilePath}");&#xA;&#xA;                // Save uploaded file to disk&#xA;                File.WriteAllBytes(inputFilePath, imageFile);&#xA;&#xA;                // Check if the input file exists&#xA;                if (!File.Exists(inputFilePath))&#xA;                {&#xA;                    Console.WriteLine($"Input file does not exist: {inputFilePath}");&#xA;                    return InternalServerError(new Exception($"❌ Input file does not exist: {inputFilePath}"));&#xA;                }&#xA;&#xA;                //Console.WriteLine($"✅ FFmpeg found at path: {ffmpegFullPath}");&#xA;&#xA;                await FFMpegArguments&#xA;                .FromFileInput(inputFilePath)&#xA;                .OutputToFile(outputFilePath, overwrite: true, options => options&#xA;                    .WithCustomArgument("-vf scale=800:-1")&#xA;                    .WithCustomArgument("-q:v 10")&#xA;                    )&#xA;                    .ProcessAsynchronously();&#xA;&#xA;                Console.WriteLine($"outputFilePath, {outputFilePath}");&#xA;&#xA;                // Check if the output file was created&#xA;                if (File.Exists(outputFilePath))&#xA;                {&#xA;                    var fileInfo = new FileInfo(outputFilePath); // Get file info&#xA;&#xA;                    Console.WriteLine($"outputFileInfoPropsFullName, {fileInfo.FullName}");&#xA;                    Console.WriteLine($"outputFileInfoPropsLength, {fileInfo.Length}");&#xA;&#xA;                    var compressedFileBytes = File.ReadAllBytes(outputFilePath);&#xA;                    var compressedFileBase64 = Convert.ToBase64String(compressedFileBytes);&#xA;&#xA;                    return Ok(new&#xA;                    {&#xA;                        Message = "Image uploaded and compressed successfully.",&#xA;                        CompressedImagePath = outputFilePath,&#xA;                        CompressedFileSize = fileInfo.Length, // Size in bytes&#xA;                        CompressedFileBase64 = compressedFileBase64&#xA;                    });&#xA;                }&#xA;                else&#xA;                {&#xA;                    Console.WriteLine("OutputFilePath File not exists.");&#xA;                    return InternalServerError(new Exception($"❌ Failed to create compressed file: {outputFilePath}"));&#xA;                });&#xA;            }&#xA;            catch (Exception ex)&#xA;            {&#xA;                Console.WriteLine($"File TRYCATCH:{ex}");&#xA;                return InternalServerError(new Exception("Image compression failed: " &#x2B; ex.Message));&#xA;            }&#xA;        }&#xA;    }&#xA;    catch (Exception ex)&#xA;    {&#xA;        Console.WriteLine($"Method TRYCATCH:{ex}");&#xA;        throw;&#xA;    }&#xA;&#xA;    return BadRequest("No image file uploaded.");&#xA;}&#xA;</ihttpactionresult>

    &#xA;

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

    &#xA;

     await FFMpegArguments&#xA;

    &#xA;

    This is the exception log :

    &#xA;

    FFMpegCore.Exceptions.FFMpegException: ffmpeg was not found on your system&#xA;

    &#xA;

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

    &#xA;

    2025-06-13T16:07:55.878&#x2B;05:30 [APP/PROC/WEB/0] [OUT] PATH of FFmpeg Executable: C:\Users\vcap\app\ffmpeg-bin\ffmpeg.exe&#xA;2025-06-13T16:07:55.878&#x2B;05:30 [APP/PROC/WEB/0] [OUT] PATH of ffmpegPath: C:\Users\vcap\app\ffmpeg-bin&#xA;2025-06-13T16:07:55.878&#x2B;05:30 [APP/PROC/WEB/0] [OUT] PATH of BaseDirectory: C:\Users\vcap\app\&#xA;2025-06-13T16:07:55.881&#x2B;05:30 [APP/PROC/WEB/0] [OUT] TempPath: C:\Users\vcap\AppData\Local\Temp\ &#xA;    2025-06-24T18:39:50.684&#x2B;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&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] --- End of stack trace from previous location where exception was thrown ---&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.FFMpegArgumentProcessor.<processasynchronously>d__24.MoveNext()&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.FFMpegArgumentProcessor.PrepareProcessArguments(FFOptions ffOptions, CancellationTokenSource&amp; cancellationTokenSource)&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] at FFMpegCore.Helpers.FFMpegHelper.VerifyFFMpegExists(FFOptions ffMpegOptions)&#xA;2025-06-24T18:39:50.684&#x2B;05:30 [APP/PROC/WEB/0] [OUT] File TRYCATCH:FFMpegCore.Exceptions.FFMpegException: ffmpeg was not found on your system&#xA;</processasynchronously></uploadimage>

    &#xA;

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

    &#xA;

  • How to make FFmpeg download only the required segments [closed]

    25 juillet, par daniil_

    I'm developing a tool, that create timelapse. For this purpose I use ffmpeg 7.1.1 verion.&#xA;I have a playlist file called index.m3u8 (inside it there are URLs to TS segments—typically around 5,000 of them). Here’s a small excerpt :

    &#xA;

    #EXTM3U&#xA;#EXT-X-TARGETDURATION:12&#xA;#EXT-X-VERSION:6&#xA;#EXT-X-MEDIA-SEQUENCE:0&#xA;#EXT-X-PLAYLIST-TYPE:EVENT&#xA;#EXT-X-START:TIME-OFFSET=8,PRECISE=YES&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-07-22T07:59:51.173Z&#xA;#EXTINF:10.080,&#xA;https://my-storage.io/receiver/archives/3a1b162d-392d-d45a-089a-dc93fb842a35/files/2025-07-22/07/59/1753171191173_aa_00000_00000_10080.ts?exp=1753543086&amp;signature=MEYCIQCx_hDnFVwk7WJyQG5QujV5ZGhLoBqkD5uoQFebha1knQIhAMJm1KA5DLEuqD4_5zS5QlzTGIuj5q9TCUcML7MEPMl7&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-07-22T08:00:01.253Z&#xA;#EXTINF:10.080,&#xA;https://my-storage.io/receiver/archives/3a1b162d-392d-d45a-089a-dc93fb842a35/files/2025-07-22/08/00/1753171201253_aa_00000_00000_10080.ts?exp=1753543086&amp;signature=MEYCIQCx_hDnFVwk7WJyQG5QujV5ZGhLoBqkD5uoQFebha1knQIhAMJm1KA5DLEuqD4_5zS5QlzTGIuj5q9TCUcML7MEPMl7&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-07-22T08:00:11.333Z&#xA;#EXTINF:10.021,&#xA;https://my-storage.io/receiver/archives/3a1b162d-392d-d45a-089a-dc93fb842a35/files/2025-07-22/08/00/1753171211333_aa_00000_00000_10021.ts?exp=1753543086&amp;signature=MEYCIQCx_hDnFVwk7WJyQG5QujV5ZGhLoBqkD5uoQFebha1knQIhAMJm1KA5DLEuqD4_5zS5QlzTGIuj5q9TCUcML7MEPMl7&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-07-22T08:00:21.354Z&#xA;#EXTINF:10.079,&#xA;https://my-storage.io/receiver/archives/3a1b162d-392d-d45a-089a-dc93fb842a35/files/2025-07-22/08/00/1753171221354_aa_00000_00000_10079.ts?exp=1753543086&amp;signature=MEYCIQCx_hDnFVwk7WJyQG5QujV5ZGhLoBqkD5uoQFebha1knQIhAMJm1KA5DLEuqD4_5zS5QlzTGIuj5q9TCUcML7MEPMl7&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-07-22T08:00:31.433Z&#xA;...&#xA;

    &#xA;

    I’m trying to extract still images from the stream at specific moments.

    &#xA;

    When I run a command like :

    &#xA;

    ffmpeg \&#xA;  -analyzeduration 5000000 \&#xA;  -probesize 5000000 \&#xA;  -err_detect ignore_err \&#xA;  -protocol_whitelist file,http,https,tcp,tls \&#xA;  -allowed_extensions ALL \&#xA;  -f hls \&#xA;  -y \&#xA;  -ss 11316.719 \&#xA;  -i /Users/daniil/Desktop/test/exports/.../index.m3u8 \&#xA;  -frames:v 1 \&#xA;  -q:v 2 \&#xA;  /Users/daniil/Desktop/test/exports/.../frames/frame_00100.png&#xA;

    &#xA;

    ffmpeg downloads segments 1 and 2 (presumably to probe the format), and then it downloads two more TS files around the target timestamp.

    &#xA;

    But as soon as I push the -ss value beyond a certain point—in my case -ss 8487.54—it starts downloading every TS segment from the very start of the playlist up to the one I need. That can easily be 1,000 TS files or more. In other words, when -ss is between 0 and 8374.372, everything works fine, but beyond that it exhibits this strange behavior.

    &#xA;

  • Preserving alpha when re-encoding VP8/VP9 WebM in FFmpeg without specifying input codec

    29 août, par mstyura

    I'm trying to understand why re-encoding a VP8 or VP9 WebM with alpha channel produces black pixels instead of preserving transparency.

    &#xA;

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

    &#xA;

    ffmpeg -i video-vp8-with-alpha.webm -c:v libvpx-vp9 video-vp8-with-alpha-bad.webm&#xA;

    &#xA;

    The output loses the alpha channel. ffprobe shows :

    &#xA;

    Input #0, matroska,webm, from &#x27;video-vp8-with-alpha-bad.webm&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf62.1.103&#xA;  Duration: 00:00:03.07, start: 0.017000, bitrate: 152 kb/s&#xA;  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&#xA;    Metadata:&#xA;      ENCODER         : Lavc62.8.101 libvpx-vp9&#xA;      ALPHA_MODE      : 1&#xA;      DURATION        : 00:00:03.066000000&#xA;  Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp, start 0.017000&#xA;    Metadata:&#xA;      ENCODER         : Lavc62.8.101 libopus&#xA;      DURATION        : 00:00:03.049000000&#xA;

    &#xA;

    However, if I explicitly force the input codec :

    &#xA;

    ffmpeg -c:v libvpx -i video-vp8-with-alpha.webm -c:v libvpx-vp9 video-vp8-with-alpha-good.webm&#xA;

    &#xA;

    The alpha channel is preserved. ffprobe shows :

    &#xA;

    Input #0, matroska,webm, from &#x27;video-vp8-with-alpha-good.webm&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf62.1.103&#xA;  Duration: 00:00:03.07, start: 0.017000, bitrate: 400 kb/s&#xA;  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&#xA;    Metadata:&#xA;      ENCODER         : Lavc62.8.101 libvpx-vp9&#xA;      ALPHA_MODE      : 1&#xA;      DURATION        : 00:00:03.066000000&#xA;  Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp, start 0.017000&#xA;    Metadata:&#xA;      ENCODER         : Lavc62.8.101 libopus&#xA;      DURATION        : 00:00:03.049000000&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    The ffmpeg from commit 0828a3b636 ;

    &#xA;

    Build of ffmpeg download from BtbN/FFmpeg-Builds

    &#xA;