Recherche avancée

Médias (0)

Mot : - Tags -/masques

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (31)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (3281)

  • Using FFmpeg to detect alpha channel in PR4444 file [closed]

    8 décembre 2023, par Justin Myers

    I wanted to comment on a thread that already exists on this topic in general, but I just signed up to SO and have not earned my contribution credits yet ! If anyone has advice on how to better handle that in the future, I am all ears !!

    


    None-the-less, here is that thread :

    


    A good way to detect alpha channel in a video using ffmpeg/ffprobe

    


    I tried both the answers listed in that post to detect the presence of an alpha channel in a PR4444 video file.

    


    For Gyan's answer, I get the following pixel format from any PR4444 file (regardless if encoded with alpha or no alpha), when running part 1 :

    


    yuva444p12le

    


    As you will see in Gyan's notes, even if a FFprobe returns an "a" in the return string (for the call for pixel format), that does not equate to the presence of an alpha channel. Hence their note for the subsequent (part 2) call...

    


    I then plugged that into the part 2 of Gyan's answer, but that produced an empty from FFmpeg, and a message providing valid arguments to pair with grep. It seems as though -oP is not a valid arg for grep ? Because it wasn't listed in the returned list of options. This is the template I used (pulled verbatim from Gyan's posted solution) :

    


    ffprobe -v 0 -show_entries pixel_format=name:flags=alpha -of compact=p=0 | grep "$PIX_FMT|" | grep -oP "(?<=alpha=)\d"

    &#xA;

    Where $PIX_FMT is to be replaced with yuva444p121e (per Gyan's instructions).

    &#xA;

    I then tried Benji's solution for part 2, but that just returns the following :

    &#xA;

    pix_fmt=yuva444p12le

    &#xA;

    Of course, this isn't any more useful than part 1...

    &#xA;

    I suspect Gyan is on the right track as he mentions part 2 should produce a boolean result for the presence of an alpha channel. However, either I am misunderstanding the syntax of his template, or something has changed in FFprobe since. There is so limited information out there for this specific task. Hoping someone with more experience and knowledge can help shed some light for me ??

    &#xA;

  • MP4Box : Concatenating track ID 1 even though sample descriptions do not match

    29 avril 2021, par Lysander Cox

    Essentially, I wish to concatenate a series of videos using MP4Box. When I attempt to do so, I receive the following error :

    &#xA;

    No suitable destination track found - creating new one (type soun)&#xA;0.500 secs Interleaving &#xA;

    &#xA;

    I can circumvent the issue, at least temporarily, by adding a -force-cat parameter to the MP4Box command. However, this creates issues with the alignment of audio and video and produces the following warning :

    &#xA;

    Concatenating track ID 1 even though sample descriptions do not match&#xA;

    &#xA;

    Now, as far as I can tell, this has to do with differing parameters between video types. I will display the ffprobe output of each video type below in order to hopefully shed some light on the issue.

    &#xA;

    VIDEO TYPE 1 FFPROBE OUTPUT :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;0.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;  Duration: 00:00:02.25, start: 0.000000, bitrate: 851 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 816 kb/s, 4 fps, 4 tbr, 16384 tbn, 8 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 32 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;

    &#xA;

    VIDEO TYPE 2 FFPROBE OUTPUT :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;static.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.78.100&#xA;  Duration: 00:00:01.00, start: 0.000000, bitrate: 662 kb/s&#xA;    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 654 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;&#xA;

    &#xA;

    Can anyone identify what the incongruity between video types is and how I can resolve it ? Thanks.

    &#xA;

  • 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;