Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (51)

  • 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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (6941)

  • Fluent-FFMPEG How To Add A Background Audio To A Video Which Has Sound

    17 janvier 2021, par Ilhamzac

    I am using fluent-FFmpeg library to render some videos on my node js Application,

    


    Is there a way to add a background audio to a video that already has sound,
If a video doest have a sound this code works,
can someone help ?

    


      mergeFilesAsync('C:/test/rendered/sample.mp3','C:/test/rendered/a.mp4', 'C:/test/rendered/eee.mp4');


  async function mergeFilesAsync (audio, video, outputVideo) {

    ffmpeg(video)
    .addInput(audio)
    .output('bb.mp4')
    .on('end', function() {
      console.log('Finished processing');
    })
    .run();
    }
    ```
    enter code here


    


  • How to extract these files when using ffmpeg.wasm to output in picture group ?

    24 mai 2023, par Jveshi

    How to extract these files when using ffmpeg.wasm to output in picture group ?

    


    I am working on the video upload function, in which ffmpeg.wasm is used for video encode. The function of video encode has been realized. There is also a function to generate video thumbnails, which needs to be completed.

    


    The video player uses the DPlayer. The player's requirement for thumbnails is to capture sprite images of 100 pictures. So I want to output a picture group, but I can't extract these files, How to solve it ? the relevant code is below.

    



    

    //The length of the test video is 160 seconds
ffmpeg -i ../../test.mp4 -vf fps=1/(160/100) ../../thumbnail/thumbnail%d.png


    


    var in_name = "upload.mp4";
var out_name = "thumbnail%d.png";

(async () => {
    await ffmpeg.load();
    ffmpeg.FS('writeFile', in_name, await fetchFile(original_video_file));
    await ffmpeg.run('-i', in_name, '-vf' , 'fps=1/(160/100)' , out_name);
    var new_file = ffmpeg.FS('readFile', out_name);
    var thumbnail = new Blob([new_file.buffer], { type: 'image/png' });
    console.log(thumbnail);
})();


    


    The error reported by the above code is

    


    Uncaught (in promise) Error : ffmpeg.FS('readFile', 'thumbnail%d.png') error. Check if the path exists

    


    enter image description here

    



    


    If you can understand Chinese, here are some of my previous attempts.

    


    https://segmentfault.com/q/1010000043821339

    


  • Improper use of system() call ?

    28 mai 2013, par Dima1982

    I have a particle system program that generates a .dat file with particle coordinates in every iteration. The end goal is to run the program multiple times via a script with different parameters. So, I am trying to setup my program in a way that, for every run, all relevant data are going to be stored in a folder.

    What I do is to generate PNGs from the .dat files with Gnuplot, call ffmpeg to create a video out of the PNGs, use WinRAR to compress the .dat files and finally clean up, by deleting all the intermediate files. This works, when I do it in the working directory.

    Now I try to create a new directory and do the same stuff in there. My code :

    // Load the proper library to use chdir() function
    #ifdef _WIN32
    #include
    #elif defined __linux__ || defined __APPLE__&&__MACH__
    #include
    #endif

    // Make output directory and change working directory to new directory
       ostringstream dirCommand;
       dirCommand << "mkdir " << folderName_str;
       system(dirCommand.str().c_str());
       const char* test  = folderName_str.c_str();
       #ifdef _WIN32
           if(_chdir(test))
           {
               printf( "Unable to locate the directory: %s\n",test);
               return;
           }
       #elif defined __linux__ || defined __APPLE__&&__MACH__
           if(chdir(test))
           {
               printf( "Unable to locate the directory: %s\n",test);
               return;
           }
       #endif
           else
               printf("Created output directory...\n");

    Already for this part, I know that there are going to be objections. I have looked extensively on SO and many people favor SetCurrentDirectory() for Windows, or they are skeptical about using system(). In my defense, I am a novice programmer and my knowledge is really limited...

    Now, when I try to make the video with FFMpeg and then rar/tar my files :

    // Make video
           std::cout << "Generating Video..." << endl;
           ostringstream command;
           command << "ffmpeg -f image2 -r 1/0.1 -i output_%01d.png -vcodec mpeg4 " << videoName_str << ".avi -loglevel quiet";
           std::system(command.str().c_str());

           // Clean Up!
           std::cout << "Cleaning up!" << endl;
           ostringstream command2;
           #ifdef _WIN32
               command2 << "rar -inul a " << videoName_str << ".rar *.dat settings.gp loadfile.gp";
           #elif defined __linux__ || defined __APPLE__&&__MACH__
               command2 << "tar cf " << videoName_str << ".tar *.dat settings.gp loadfile.gp";
           #endif
           std::system(command2.str().c_str());

    I get very different behaviors in Win/ Linux.

    Win 7 x64, Visual Studio 2010/12

    In windows, the folder is created. The .dat files are generated correctly and gnuplot plots the PNGs as well. When ffmpeg is called, nothing happens. No error message from FFMpeg or anything. The same goes for WinRAR. Maybe, for the last thing, I can use the command line utility of 7z which is free !

    Linux Mint 14 x64, Qt 4.8.1

    Strangely enough, the behavior is inverted from that of Windows. As soon as the dir is changed, only the first .dat file is generated. It is as if every subsequent call I make to fprintf() for my file generation does not work, or gets lost somewhere. Gnuplot works, as do ffmpeg and tar !!

    I am really perplexed. Any help, would be really appreciated.