Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (104)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7417)

  • Additional : Add Brazillian CNH number (Carteira Nacional de Habilitac…

    5 novembre 2018, par joaoissamu
    Additional : Add Brazillian CNH number (Carteira Nacional de Habilitacao) (#2234)
  • How to stop ffmpeg when recording the desktop to save the file to the hard disk ?

    27 juin 2022, par Eliot Shein

    I'm trying to record the desktop with the ffmpeg and save a video file to the hard disk.

    


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

namespace Testings
{
    internal class FFmpeg_Capture
    {
        Process process;

        public FFmpeg_Capture()
        {
            process = new Process();
        }

        public void Start(string FileName, int Framerate)
        {
            process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is.  
            process.EnableRaisingEvents = false;
            process.StartInfo.WorkingDirectory = @"D:\Captured Videos"; // 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;
            Stop();
        }

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


    


    And using it in form1 :

    


    private void btnRecord_Click(object sender, EventArgs e)
        {
            recordToggle = !recordToggle;

            if (recordToggle)
            {
                btnRecord.Text = "Stop";
                record.Start("Testing", 60);
            }
            else
            {
                btnRecord.Text = "Record";
                record.Stop();
            }
        }


    


    but the file Testing never saved to the hard disk. my guess is that

    


    process.Close();


    


    is not like ctrl+ c and ctrl + c is what stopping the ffmpeg and save the file.

    


    This is working but how to remove the black window of the ffmpeg ?

    


    ffmpeg black window

    


    using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Testings
{
    internal class FFmpeg_Capture
    {
        Process process;

        public FFmpeg_Capture()
        {
            process = new Process();
        }

        public void Start(string FileName, int Framerate)
        {
            process.StartInfo.FileName = @"D:\Captured Videos\ffmpeg.exe"; // Change the directory where ffmpeg.exe is.  
            process.EnableRaisingEvents = false;
            process.StartInfo.WorkingDirectory = @"D:\Captured Videos\"; // The output directory  
            process.StartInfo.Arguments = @"-y -f gdigrab -framerate " + Framerate +
                " -i desktop -preset ultrafast -pix_fmt yuv420p " + FileName;
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.CreateNoWindow = false;
            process.StartInfo.RedirectStandardInput = true; //Redirect stdin
            process.Start();
        }

        public void Stop()
        {
            byte[] qKey = Encoding.GetEncoding("gbk").GetBytes("q"); //Get encoding of 'q' key
            process.StandardInput.BaseStream.Write(qKey, 0, 1); //Write 'q' key to stdin of FFmpeg sub-processs
            process.StandardInput.BaseStream.Flush(); //Flush stdin (just in case).
            process.Close();
        }
    }
}


    


  • A blocked external process in a swing GUI

    27 décembre 2012, par user1932255

    I am developing an encoder with java swing and ffmpeg. I created a GUI interface in which I specify my inputs (devices, frame rate, bitrate..). Then I call ffmpeg to encode and stream.

    My problem is that the encoding class is well executed from a main class but it is blocked when called from the swing interface (specifically jButtonactionperformed()).

    Can anyone help me ?

    here is my button action

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
       Encode s = new Encode();
       s.Encode(cmdLine);
    }

    and here is my encoding method

    public void Encode(String cmdLine) {
       try {
           Process p2 = Runtime.getRuntime().exec(cmdLine);
           //logProcessOutputAndErrors(p2);
       }
       catch(Exception ex) {
           ex.printStackTrace();
       }
    }

    Ps : Cmdline is the command i collect from inputs