Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (6061)

  • How can i use ffmpeg to capture the entire desktop but without the console window of the ffmpeg ? [duplicate]

    1er novembre 2017, par Simonicop cooper

    This question already has an answer here :

    This is how i’m doing it in the command prompt :

    ffmpeg -f gdigrab -framerate 24 -i desktop -preset ultrafast -pix_fmt yuv420p out.mp4

    And in csharp code :

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Text;  
    using System.Threading.Tasks;  
    using System.IO;  
    using System.Diagnostics;  

    namespace Ffmpeg_App  
    {  
       class Ffmpeg  
       {  
           Process process;  

           public void Start(string FileName, int Framerate)  
           {  
               process = new System.Diagnostics.Process();  
               process.StartInfo.FileName = @"D:\ffmpegx86\ffmpeg.exe"; // Change the directory where ffmpeg.exe is.  
               process.EnableRaisingEvents = false;  
               process.StartInfo.WorkingDirectory = @"D:\ffmpegx86"; // The output directory  
               process.StartInfo.Arguments = @"-f gdigrab -framerate " + Framerate + " -i desktop -preset ultrafast -                                                                     pix_fmt yuv420p " + FileName;  
               process.Start();  
               process.StartInfo.UseShellExecute = false;  
               process.StartInfo.CreateNoWindow = false;  
               Close();  
           }  

           public void Close()  
           {  
               process.Close();  
           }  
       }  
    }  

    In form1 top :

    Ffmpeg fpeg = new Ffmpeg();

    Start button :

    private void Start_Click(object sender, EventArgs e)  
           {  
               fpeg.Start("test.mp4", 24);  
           }  

    Stop button :

    private void Stop_Click(object sender, EventArgs e)  
           {  
               fpeg.Close();  
           }

    The problem is when i start recording it also recording first few seconds the console window of the ffmpeg too same when i stop the recording.

    How can i make in both cases using only command prompt or using with csharp that it will not show the console window of the ffmpeg ?

    Ffmpeg console window

  • Combine images into a movie

    10 mars 2014, par Maged E William

    My project is to record Desktop as video daily,

    now i get to the point of record the desktop as images in *.jpeg i need to combine them as video, i don't know much about ffmpeg but i have seen this article, and i wonder if i can make all this as press of a button in C#, so i can combine the images then delete them on the form load or something

    EDIT :
    now i got the code : ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi but i don't know where to type that in my project !

  • Split h.264 stream into multiple parts in python

    31 janvier 2023, par BillPlayz

    My objective is to split an h.264 stream into multiple parts, meaning while reading the stream from a pipe i would like to save it into x second long packages (in my case 10).

    


    I am using a libcamera-vid subprocess on my Raspberry Pi that outputs the h.264 stream into stdout.
    
Might be irrelevant, depends : libcamera-vid outputs a message every frame and I am able to locate it at isFrameStopLine
To convert the stream, I use an ffmpeg subprocess, as you can see in the code below.

    


    Imagine it like that :
    
Stream is running...
    
- Start recording to a file
    
- Sleep x seconds
    
- Finish recording to file
    
- Start recording a new file
    
- Sleep x seconds
    
- Finish recording the new file
    
- and so on...

    


    Here is my current code, however upon running the first export succeeds, and after the second or third the ffmpeg-subprocess is terminating with the error :
    
pipe:: Invalid data found when processing input
    &#xA;And shortly after, the python process, because of the ffmpeg termination i believe.&#xA;Traceback (most recent call last):   File "/home/survpi-camera/main.py", line 56, in <module>     processStreamLine(readData)   File "/home/survpi-camera/main.py", line 16, in processStreamLine     streamInfo["process"].stdin.write(data) BrokenPipeError: [Errno 32] Broken pipe</module>

    &#xA;

    recentStreamProcesses = []&#xA;streamInfo = {&#xA;    "lastStreamStart": -1,&#xA;    "process": None&#xA;}&#xA;&#xA;def processStreamLine(data):&#xA;    isInfoLine = ((data.startswith(b"[") and (b"INFO" in data)) or (data == b"Preview window unavailable"))&#xA;    isFrameStopLine = (data.startswith(b"#") and (b" fps) exp" in data))&#xA;    if ((not isInfoLine) and (not isFrameStopLine)):&#xA;        streamInfo["process"].stdin.write(data)&#xA;    &#xA;    if (isFrameStopLine):&#xA;        if (time.time() - streamInfo["lastStreamStart"] >= 10):&#xA;            print("10 seconds passed, exporting...")&#xA;            exportStream()&#xA;            createNewStream()&#xA;&#xA;def createNewStream():&#xA;    streamInfo["lastStreamStart"] = time.time()&#xA;    streamInfo["process"] = subprocess.Popen([&#xA;        "ffmpeg",&#xA;        "-r","30",&#xA;        "-i","-",&#xA;        "-c","copy",("/home/survpi-camera/" &#x2B; str(round(time.time())) &#x2B; ".mp4")&#xA;    ],stdin=subprocess.PIPE,stderr=subprocess.STDOUT)&#xA;    print("Created new streamProcess.")&#xA;&#xA;def exportStream():&#xA;    print("Exporting...")&#xA;    streamInfo["process"].stdin.close()&#xA;    recentStreamProcesses.append(streamInfo["process"])&#xA;&#xA;&#xA;cameraProcess = subprocess.Popen([&#xA;    "libcamera-vid",&#xA;    "-t","0",&#xA;    "--width","1920",&#xA;    "--height","1080",&#xA;    "--codec","h264",&#xA;    "--inline",&#xA;    "--listen",&#xA;    "-o","-"&#xA;],stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.STDOUT)&#xA;&#xA;createNewStream()&#xA;&#xA;while True:&#xA;    readData = cameraProcess.stdout.readline()&#xA;    &#xA;    processStreamLine(readData)&#xA;

    &#xA;

    Thank you in advance !

    &#xA;