Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (77)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (5849)

  • Struggling to add subtitles to a video using FFMPEG and C#

    19 mars 2024, par MattHodson

    I'm trying to add subtitles to my videos, 100% with code using FFMPEG and C#.

    


    But I'm getting the following error :

    


    


    ffmpeg version 2024-02-04-git-7375a6ca7b-essentials_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration : —enable-gpl —enable-version3 —enable-static —pkg-config=pkgconf —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-zlib —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-sdl2 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libaom —enable-libopenjpeg —enable-libvpx —enable-mediafoundation —enable-libass —enable-libfreetype —enable-libfribidi —enable-libharfbuzz —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-dxva2 —enable-d3d11va —enable-libvpl —enable-libgme —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libtheora —enable-libvo-amrwbenc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-librubberband
libavutil 58. 36.101 / 58. 36.101
libavcodec 60. 38.100 / 60. 38.100
libavformat 60. 20.100 / 60. 20.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 17.100 / 9. 17.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C :\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\ce31c8ab-4b53-44e8-9e25-d02ba5466144\output.mp4' :
Metadata :
major_brand : isom
minor_version : 512
compatible_brands : isomiso2avc1mp41
encoder : Lavf60.20.100
Duration : 00:03:18.84, start : 0.000000, bitrate : 101 kb/s
Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1792, 26 kb/s, 1 fps, 1 tbr, 16384 tbn (default)
Metadata :
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc60.38.100 libx264
Stream #0:10x2 : Audio : aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 74 kb/s (default)
Metadata :
handler_name : SoundHandler
vendor_id : [0][0][0][0]
[Parsed_subtitles_0 @ 000001a87404e3c0] Unable to parse option value "UsersGamersourcereposXXXXbinDebugnet8.0ce31c8ab-4b53-44e8-9e25-d02ba5466144output.srt" as image size
Error applying option 'original_size' to filter 'subtitles' : Invalid argument
[vost#0:0/libx264 @ 000001a874064a40] Error initializing a simple filtergraph
Error opening output file C :\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\ce31c8ab-4b53-44e8-9e25-d02ba5466144\videoWithSubtitles.mp4.
Error opening output files : Invalid argument

    


    


    It seems to be something related to paths, but I have tried EVERYTHING in my knowledge to fix this, still no luck... spent the majority of the day on it, no luck... so StackOverflow here I come !

    


    My code :

    


       public static async Task AddSubtitlesToVideoAsync(string videoPath, string subtitlesPath, string outputPath)
    {
        if (File.Exists(videoPath) && File.Exists(subtitlesPath))
        {
            //string subtitlesPathForwardSlashes = subtitlesPath.Replace("\\", "/");
            //string ffmpegCommand = $"-i \"{videoPath}\" -filter_complex \"subtitles='{subtitlesPathForwardSlashes}'\" \"{outputPath}\"";
            //string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles={subtitlesPathForwardSlashes} \"{outputPath}\"";
            //string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles=\"{subtitlesPath}\" \"{outputPath}\"";
            string subtitlesPathEscaped = subtitlesPath.Replace("\\", "\\\\");
            string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles=\"{subtitlesPathEscaped}\" \"{outputPath}\"";


            //output    -i C:\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\d745a08d-b932-47ac-a81c-45e9483590a7\output.mp4 -vf subtitles="C:/Users/Gamer/source/repos/XXXX/bin/Debug/net8.0/d745a08d-b932-47ac-a81c-45e9483590a7/generatedSubtitles.srt" C:\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\d745a08d-b932-47ac-a81c-45e9483590a7\videoWithSubtitles.mp4
            await ExecuteSubtitleCommandAsync(ffmpegCommand);
        }
        else
        {
            Console.WriteLine("Files can't be found.");
        }
    }

    public static async Task ExecuteSubtitleCommandAsync(string arguments)
    {
        string ffmpegExecutablePath = ffmpegRoot;
        var startInfo = new ProcessStartInfo(ffmpegExecutablePath, arguments)
        {
            CreateNoWindow = true,
            UseShellExecute = false,
            RedirectStandardOutput = true,
            RedirectStandardError = true
        };

        using (var process = new Process { StartInfo = startInfo })
        {
            process.EnableRaisingEvents = true; // Enable the Exited event.
            process.Exited += (sender, e) =>
            {
                Console.WriteLine($"FFmpeg process exited with code {process.ExitCode}.");
            };

            try
            {
                process.Start();
                // Asynchronously read the standard output and standard error of the process
                var outputTask = process.StandardOutput.ReadToEndAsync();
                var errorTask = process.StandardError.ReadToEndAsync();
                // Wait for both asynchronous tasks to complete
                await Task.WhenAll(outputTask, errorTask);

                var output = await outputTask;
                var error = await errorTask;

                if (!string.IsNullOrEmpty(error))
                {
                    Console.WriteLine("FFmpeg error: " + error);
                }
                else
                {
                    Console.WriteLine("FFmpeg process completed successfully.");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message);
            }
            finally
            {
                // Wait for the process to exit if it hasn't already.
                if (!process.HasExited)
                {
                    process.WaitForExit();
                }
            }
        }
    }


    


  • Apache Tika 2.0.9 programm ffmpeg and exiftool not found ?

    6 avril 2024, par mj44

    I use an JavaFX Maven Project to use Apache Tika Version 2.9.0.
The Java Test program will be finished and all methods that I create will done right.
I have in the log file a lot of DEBUG errors and Idon't know why ?
I habe spent many hours to clear the problem.

    


    Here's an excerpt of the logfile

    


    2024-04-03 14:56:12 [main] DEBUG org.apache.tika.parser.external.ExternalParser - exception trying to run  ffmpeg
java.io.IOException: Cannot run program "ffmpeg": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1140) ~[?:?]
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1074) ~[?:?]
...
2024-04-03 14:56:12 [main] DEBUG org.apache.tika.parser.external.ExternalParser - exception trying to run  exiftool
java.io.IOException: Cannot run program "exiftool": CreateProcess error=2, Das System kann die angegebene Datei nicht finden
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1140) ~[?:?]
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1074) ~[?:?]
...



    


    The message says that ffmpeg and exiftool are not found.

    


    This is my tika-config.xml

    


    &lt;?xml version="1.0" encoding="UTF-8"?>&#xA;<properties>&#xA;    <parsers>&#xA;        <parser class="org.apache.tika.parser.DefaultParser"></parser>&#xA;        <parser class="org.apache.tika.parser.pdf.PDFParser"></parser>&#xA;        &#xA;        <parser class="org.apache.tika.parser.external.ExternalParser">&#xA;            <params>&#xA;                true&#xA;                &#xA;                "D:\Tools\ffmpeg-6.1.1\bin\ffmpeg.exe"&#xA;            </params>&#xA;        </parser>&#xA;        &#xA;        <parser class="org.apache.tika.parser.external.ExternalParser">&#xA;            <params>&#xA;                true&#xA;                &#xA;                "D:\Tools\exiftool.exe"&#xA;            </params>&#xA;        </parser>&#xA;    </parsers>&#xA;    <detector>&#xA;        <detector class="org.apache.tika.detect.DefaultDetector"></detector>&#xA;    </detector>&#xA;</properties>&#xA;

    &#xA;

    I tested the path of the programms in a console ant it worked fine ?&#xA;I don't know what I can do now ?

    &#xA;

    Thanks for Help

    &#xA;

    I have downloaded new copies of the ffmpeg and exiftool and installed them.&#xA;I tested it in a console to run and both tools work fine.&#xA;I tested the permissions, no problems with permissions&#xA;I tested that the tika-config.xml will be loaded, it loaded.

    &#xA;

  • Flutter error in Ffmpeg, "Unhandled Exception : ProcessException : No such file or directory" in macOS desktop version

    19 avril 2024, par pratik vekariya

    I'm trying video trim video using ffmpeg, for macOS desktop application.

    &#xA;

    I have downloaded ffmpeg from here for macOS.

    &#xA;

    Here is my code

    &#xA;

        String mainPath = &#x27;Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug/&#x27;;&#xA;        mainPath = mainPath.substring(0, mainPath.lastIndexOf("/"));&#xA;    &#xA;                  Directory directoryExe3 = Directory("$mainPath");&#xA;                  var dbPath = path.join(directoryExe3.path,&#xA;                      "App.framework/Resources/flutter_assets/assets/ffmpeg/ffmpegmacos");&#xA;//here in "Products/Debug/" folder desktop app will generate&#xA;&#xA;//directoryExe3 path will be, Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug&#xA;&#xA;//and dbPath will be, Users/apple/Workspace/User/2024/Project/videoapp/build/macos/Build/Products/Debug/App.framework/Resources/flutter_assets/assets/ffmpeg/ffmpegmacos&#xA;&#xA;//so when app will run it can access it from this path&#xA;&#xA;//executable code, command for ffmpeg&#xA;&#xA;String transpose_str &#x2B;= "crop=" &#x2B;&#xA;              out_w.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              out_h.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              x!.toInt().toString() &#x2B;&#xA;              ":" &#x2B;&#xA;              y!.toInt().toString() &#x2B;&#xA;              ",";&#xA;          transpose_str &#x2B;= "scale=960:192";&#xA;&#xA;Future<processresult> result_ = Process.run(dbPath, [&#xA;                "-ss",&#xA;                timestamp,&#xA;                "-i",&#xA;                inputFilePath,&#xA;                "-t",&#xA;                endTime,&#xA;                "-vf",&#xA;                transpose_str,&#xA;                "-an",&#xA;                "./temp.mp4",&#xA;              ]); &#xA;</processresult>

    &#xA;

    Now when I run this in macOS desktop verison, it gives me error at Process.run that in dbPath, Unhandled Exception : ProcessException : No such file or directory.

    &#xA;

    Any help would be appreciate !

    &#xA;

    when i run this as desktop version it should get file from assets.

    &#xA;