Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (54)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (8939)

  • How to kill a stale process

    12 avril 2015, par Andy

    I run transcoding on Ubuntu server and sometimes the process goes stale and provides no output but ps aux shows process is still running - but with stale CPU usage

    I can get the CPU usage with the following command(ffmpeg process i was working with has process id 4416 :

    ps aux | grep -v grep | grep 4416 | awk '{print $3}'

    and I could probably create a small script to kill a specific process but how would I create a loop that would check each ffmpeg process and kill it if its stale(runit will restart it afterwards) ?

    I think it would need to execute the command to get CPU usage twice with a minute cron and kill the process if CPU usage is the same. Would would I do this ?

  • ffmpeg process not terminating - stuck in code

    17 juillet 2023, par hello world
    using (Process process = new Process())
{
    process.StartInfo.FileName = "ffmpeg.exe";
    process.StartInfo.Arguments = "-i video.mp4 -loop 1 -i a.jpg -c:v copy -c:a copy -shortest output_temp.mp4";
    process.StartInfo.UseShellExecute = false;
    process.StartInfo.RedirectStandardOutput = true;
    process.StartInfo.RedirectStandardError = true;
    process.StartInfo.CreateNoWindow = true;
    process.Start();
    process.WaitForExit();
}


    


    I have verified that the input files, video.mp4 and a.jpg, exist in the specified paths and are accessible. Additionally, I've tried removing the -shortest option to rule out an infinite loop, but the issue persists.

    


    I've also redirected the standard output and error streams to log files, but there are no error messages reported.

    


    I'm using the last version of ffmpeg on Windows.

    


    What could be causing the ffmpeg process to get stuck and not terminate as expected ? Are there any other potential reasons I should investigate ? Any help or suggestions would be greatly appreciated. Thank you !

    


    Edit : Also in the mean time ffmpeg command is not working.

    


  • C# FFMPEG Process and Multiple files

    23 novembre 2023, par wesman

    I am working on a C# Form tool that will help me convert all of my phone and DSLR video to HEVC, currently, i have a program that uploads the photos and videos to different directories in my home server each time i connect to the WiFi. Once a month or so, i manually convert all the videos, but thought I would automate the process.. I have the Form working perfectly for processing 1 file. but get into trouble when processing a Directory (with possible sub-directories) all at once..

    



    Sorry, this is long, just want to be thorough. here is the button calls

    



    private void processFile_Click(object sender, EventArgs e)
    {
        OpenFileDialog file = new OpenFileDialog();
        file.InitialDirectory = baseMediaDirectory;
        if (file.ShowDialog() == DialogResult.OK)
        {
            ProcessSinlgeFile(file.FileName);
        }
    }


    



    (above)for one file and (below) for a directory

    



    private void processDirectory_Click(object sender, EventArgs e)&#xA;{&#xA;    FolderBrowserDialog file = new FolderBrowserDialog();&#xA;    file.SelectedPath = baseMediaDirectory;&#xA;    if(file.ShowDialog() == DialogResult.OK)&#xA;    {&#xA;       ProcessDirectoryOfFiles(file.SelectedPath);&#xA;    }&#xA;}&#xA;&#xA;private void ProcessDirectoryOfFiles(string selectedPath)&#xA;    {&#xA;        List<string> listOfFiles = GetAllFiles(selectedPath);&#xA;        foreach (string s in listOfFiles)&#xA;        {&#xA;            ProcessSinlgeFile(s);&#xA;        }&#xA;    }&#xA;</string>

    &#xA;&#xA;

    both ultimately call this method, to do some checks and setup

    &#xA;&#xA;

    private void ProcessSinlgeFile(string fileName)&#xA;    {&#xA;&#xA;        if (IsAcceptableMediaFile(fileName))&#xA;        {&#xA;            outputWindow.AppendText("File to Process: " &#x2B; fileName);&#xA;            processMediaFile = &#xA;                new MediaFileWrapper(this.outputWindow, new MediaFile(fileName), new NReco.VideoInfo.FFProbe());&#xA;            if (processMediaFile.OkToProcess)&#xA;            {&#xA;                int initialCRFValue = 15;&#xA;                //ultrafast superfast veryfast faster fast medium slow slower veryslow placebo&#xA;                string intialSpeed = "veryfast";&#xA;                try {&#xA;&#xA;                    ConvertToMPEG(processMediaFile.getFFMPEGCommand(initialCRFValue, intialSpeed), processMediaFile);&#xA;                }&#xA;                catch&#xA;                {&#xA;                    // at somepoint, we&#x27;ll catch a bad file size (or compression)&#xA;                    // then change the CRF value and/or compression speed&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;

    &#xA;&#xA;

    ultimately I get to this Method and run into trouble.

    &#xA;&#xA;

        private async void ConvertToMPEG(string arguments, MediaFileWrapper processMediaFile)&#xA;    {&#xA;        startTime = DateTime.Now;&#xA;        watch = new Stopwatch();&#xA;        watch.Start();&#xA;        progressBar1.Minimum = 0;&#xA;        progressBar1.Maximum = processMediaFile.GetTotalMilliseconds();&#xA;&#xA;        // Start the child process.&#xA;        p = new Process();&#xA;&#xA;        //Setup filename and arguments&#xA;        outputWindow.AppendText("ffmpeg " &#x2B; arguments);&#xA;        p.StartInfo.Arguments = arguments;&#xA;        p.StartInfo.FileName = "ffmpeg.exe";&#xA;        p.StartInfo.UseShellExecute = false;&#xA;&#xA;        // Redirect the output stream of the child process.&#xA;        p.StartInfo.RedirectStandardOutput = true;&#xA;        p.StartInfo.RedirectStandardError = true;&#xA;        p.StartInfo.RedirectStandardInput = true;&#xA;&#xA;        // capture the date for stdout and std error&#xA;        // note FFMPEG uses Stderr exclusively&#xA;        p.ErrorDataReceived &#x2B;= new DataReceivedEventHandler(ErrorDataReceived);&#xA;        p.OutputDataReceived &#x2B;= new DataReceivedEventHandler(OutputDataReceived);&#xA;&#xA;        // Hide Console Window&#xA;        p.StartInfo.CreateNoWindow = true;&#xA;        p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;&#xA;&#xA;        p.Start();&#xA;        p.BeginErrorReadLine();&#xA;        p.BeginOutputReadLine();&#xA;        await p.WaitForExitAsync();&#xA;    }&#xA;

    &#xA;&#xA;

    and WaitForExitAsync is in another class because in can not be in here with a Form

    &#xA;&#xA;

        public static Task WaitForExitAsync(this Process process,&#xA;        CancellationToken cancellationToken = default(CancellationToken))&#xA;    {&#xA;        var tcs = new TaskCompletionSource();&#xA;        process.EnableRaisingEvents = true;&#xA;        process.Exited &#x2B;= (sender, args) => tcs.TrySetResult(null);&#xA;        if (cancellationToken != default(CancellationToken))&#xA;            cancellationToken.Register(tcs.SetCanceled);&#xA;&#xA;        return tcs.Task;&#xA;    }&#xA;

    &#xA;&#xA;

    however, single files work fine, when I call a directory through, it continuously starts processes for each file, trying to run them all at the same time. You can see I tried implementing this &#xA;process.WaitForExit() asynchronously&#xA;with no luck.

    &#xA;