Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (52)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • 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 ) (...)

Sur d’autres sites (10428)

  • ffmpeg video conversion problems ?

    22 septembre 2018, par Surya sasidhar

    I am using ffmpeg for video conversion, it is working fine in local.
    But when I upload the site in online it is not converting the videos. It is showing operation failed should I install the ffmpeg in server also.

    public void convertFile()

    {

       lblStatus.Visible = false;
       try
       {

           int i = sFile.LastIndexOf(".");
           thumb = sFile.Remove(i);
           thumb = thumb + ".jpg";
           video = Page.MapPath("../VideoOut/" + sFile);
           Image = Page.MapPath("../VideoSnapShots/" + thumb);
           ffmpeg = new Process();
           ffmpeg.StartInfo.Arguments = " -i \"" + video + "\"    -vframes 1 -ss 00:00:10 -s 150x150 -f image2 -vcodec mjpeg \"" + Image + "\""; // arguments !
           ffmpeg.StartInfo.FileName = Page.MapPath("FFMPEG\\ffmpeg.exe");
           ffmpeg.Start();
           Session["image"] = thumb;
           string mpg;
           string VideoOut;
           int j = sFile.LastIndexOf(".");
           mpg = sFile.Remove(j);
           mpg = mpg + ".flv";
           video = Page.MapPath("../VideoOut/" + sFile);
           VideoOut = Page.MapPath("../Videos/" + mpg);
           ffmpeg.EnableRaisingEvents = true;

           ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -ar 22050 \"" + VideoOut + "\"";
           ffmpeg.StartInfo.FileName = Page.MapPath("FFMPEG\\ffmpeg.exe");
           ffmpeg.Start();
           ffmpeg.StartInfo.UseShellExecute = false;
           ffmpeg.StartInfo.CreateNoWindow = false;
           ffmpeg.StartInfo.RedirectStandardError = true;
           ffmpeg.StartInfo.RedirectStandardOutput = false;
           ffmpeg.WaitForExit();
           ffmpeg.Close();
           Session["videosrc"] = mpg;

           InsertVideo();
           File.Delete(video);

       }
       catch (Exception ex)
       {
           lblStatus.Visible = true;
           lblStatus.Text = ex.Message;
       }

    }
  • Kill child process only after readFile() Node js Electron

    14 mai 2021, par Radespy

    I'm using an imported ffmpeg binary ffmpeg-static-electronin an Electron-React app (on Windows Pro 10) and want to delete a saved cropped video and then kill the child process afterwards from my Main process.

    


    The overall aim is to crop a video of the whole screen following capture and then send the cropped video to a renderer.

    


    const fsPromises = require('fs').promises
const ffmpeg = require('ffmpeg-static-electron')
const { execFile } = require("child_process")


ipcMain.on("windoze_capture_screen:video_buffer", async (event, buffer) => {
    const temp_directory =  await fsPromises.mkdtemp(await fsPromises.realpath(os.tmpdir()) + path.sep)
    const capture_screen_video_path = path.join(temp_directory, "screen_capture_video.mp4")

    child_object = execFile(`${ffmpeg.path}`, 

            ['-i', `${capture_screen_video_path}`, '-vf', `crop=${width}:${height}:${x_pos}:${y_pos}`, `${path.join(temp_directory,'cropped_video.mp4')}`])
            
    child_object.on("exit", async () => {

        // child_object.kill()
        console.log("?Killed -1", child_object.killed)
        
        try { 
            databasePayload.video_buffer = await fsPromises.readFile(path.join(temp_directory, "cropped_video.mp4"), {encoding: 'base64'})
            mainWindow.webContents.send("main_process:video_buffer", databasePayload.video_buffer)
        } catch (error) {
            console.log(error)
        } finally {

            // child_object.kill()
            console.log("?Killed - 2", child_object.killed)
            
            // noASAR required to be set to 'true' in order to remove temp directory in build
            process.noAsar = true 
            fs.rmdir(temp_directory, {recursive: true}, (error) => {if (error) {log(error)}})
            process.noASAR = false
            }

            // 3rd scenario
            // child_object.kill()
            console.log("?Killed -3", child_object.killed)   
        })

        // 4th scenario
        console.log("?Killed-4", child_object.killed)   
    })



    


    When running each of these scenarios, I get the following outputs.

    


    Scenario's 1, 2 and 3 - Successfully sends cropped video to renderer but doesn't kill process.

    


    Output :

    


    ?Killed-4 false
?Killed -1 false
[ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.0 (GCC).... etc. ]
?Killed-2 false
?Killed -3 false


    


    Scenario 4 - Doesn't crop video

    


    ?Killed-4 true
?Killed -1 true
Command failed: C:\Users\XXX\Desktop\windows-electron-forge\node_modules\ffmpeg-static-electron\bin\win\x64\ffmpeg.exe -i C:\Users\XXX\AppData\Local\Temp\4WgnUw\screen_capture_video.mp4 -vf crop=796:763:462:509 C:\Users\XXX\AppData\Local\Temp\4WgnUw\cropped_video.mp4

[Error: ENOENT: no such file or directory, open 'C:\Users\XXX\AppData\Local\Temp\4WgnUw\cropped_video.mp4'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\XXX\\AppData\\Local\\Temp\\4WgnUw\\cropped_video.mp4'
}
?Killed - 2 true
?Killed -3 true


    


    The last scenario has been tried out of desperation.

    


    Question : Where am I going wrong with this ? I suspect it's something to do with ipc between child and parent process but not sure where to place the code.

    


    Any help will be much appreciated !!!

    


  • FFMPEG not saving logs when converting to audio format

    2 février, par PUXIII

    The command does not save or even create a file :

    


    ffmpeg -i "video.mp4" -f mp3 "audio.mp3" -vstats_file "log_file.log"


    


    And if you convert to a video file, everything normally creates and writes :

    


    ffmpeg -i "video.mp4" -f mp3 "video.avi" -vstats_file "log_file.log"


    


    Goal : to pull out the time from the log file and bind it to the process bar.

    


    There are no problems with video, everything works. But with the sound does not work.

    


    I tried the command :

    


    ffmpeg -i "video.mp4" -f mp3 "video.avi" >2 "log_file.txt"


    


    But there are other problems popping out. Since I run it all from the Python using the subprocess module.

    


    ffmpegProc = subprocess.Popen(ffmpegCommand, startupinfo=startupinfo, shell=True)


    


    , I can not kill the running process, because it is started with the attribute shell=True, and only the shell is killed.