Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (45)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (5112)

  • avconv : fix handling attachments in init_output_stream

    23 mai 2016, par Anton Khirnov
    avconv : fix handling attachments in init_output_stream
    

    The current code assumes that encoding_needed is simply an inverse of
    stream_copy, which is not true for manually attached files (for which
    neither of those is true).

    • [DBH] avconv.c
  • How can i make the dashjs player respect the stream window ?

    6 mars 2021, par Octavia Kitsune

    I created the following command to i run on the serverside turn a source url into a cmaf dash stream :

    


    ffmpeg -loglevel error -re -i SOURCEURL -c copy -f dash -dash_segment_type mp4 -remove_at_exit 1 -seg_duration 2 -target_latency 1 -frag_type duration -frag_duration 0.1 -window_size 10 -extra_window_size 3 -streaming 1 -ldash 1 -use_template 1 -use_timeline 0 -index_correction 1 -tune zerolatency -fflags "+nobuffer+flush_packets" -format_options "movflags=cmaf" -adaptation_sets "id=0,streams=0 id=1,streams=1" -utc_timing_url "http://time.akamai.com/?iso&ms" stream/main.mpd


    


    And on the clientside i run a dashjs player with the following configuration :

    


      const video = document.getElementById('video')
  const player = dashjs.MediaPlayer().create()

  player.initialize(video, false, true)
  player.updateSettings({
    streaming: {
      stallThreshold: 0.05,
      lowLatencyEnabled: true,
      liveDelay: 1,
      liveCatchup: {
        minDrift: 1,
        playbackRate: 0.3,
        mode: 'liveCatchupModeDefault'
      },
      abr: {
        useDefaultABRRules: true,
        ABRStrategy: 'abrLoLP',
        fetchThroughputCalculationMode:
          'abrFetchThroughputCalculationMoofParsing'
      }
    }
  })


    


    My problem is, that dashjs loads a few segements and then tries to grab segments that error with a 404. It seems the segments it asks for fall out ot the window the stream defines.

    


    So i wonder how i can align my dashjs with my stream configuration so that it does respect the window defined by the stream, to basically simulate a livestream from any kind of videosource ?

    


  • c# Process data piping : 'The pipe has ended'

    9 août 2024, par user2224583

    There are two process I am handling. Ffmpeg and fpcalc.

    


    I have completed my appplication by encoding a wav file with ffmpeg, and reading it for purposes of chromaprinting with fpcalc.

    


    However, I think the next step is to skip the saving of a wav file, and pipe the data directly into the fpcalc process.

    


    I've been trying to understand how to pipe the stream data from ffpmeg stdout into the fpcalc process stdin.

    


    Some of the code I've been testing and reading (below) has come from other answers, with regards to piping data out of a Process object in c#, specifically with ffmpeg, found here on Stack

    


    private static void ExtractPCMAudio(string input, int duration)
    {
        Process proc = new Process();

        proc.StartInfo.FileName = @"ffmpeg.exe";
        proc.StartInfo.Arguments = $"-t 00:3:00 -i \"{input}\" -f wav -ac 1 -acodec pcm_s16le -ar 16000 -"; //"-" Dash pipes the stream
        proc.StartInfo.UseShellExecute = false;
        proc.StartInfo.RedirectStandardInput = true;
        proc.StartInfo.RedirectStandardOutput = true;

        proc.Start();

        FileStream baseStream = proc.StandardOutput.BaseStream as FileStream;

        byte[] audioBytes = null;
        int lastRead = 0;

        using (MemoryStream ms = new MemoryStream())
        {            
            byte[] buffer = new byte[4096];
            do
            {
                lastRead = baseStream.Read(buffer, 0, buffer.Length);
                ms.Write(buffer, 0, lastRead);
            } while (lastRead > 0);

            audioBytes = ms.ToArray();
        }
        
        proc.StandardInput.BaseStream.Close();
        
        baseStream.Close();
        FingerPrintAudio(audioBytes);
        Console.WriteLine("Done!");
        
    }


private static void FingerPrintAudio(byte[] audioBytes)
    {
        
        var fpcalc = "fpcalc.exe";
        var procStartInfo =
            new ProcessStartInfo(fpcalc, $" -raw -length 600 -json") 
            {
                RedirectStandardOutput = true,
                RedirectStandardInput = true,
                RedirectStandardError  = true,
                UseShellExecute        = false,
                CreateNoWindow         = true,
            };

        var process = new Process {StartInfo = procStartInfo};
        process.Start();            
        
        process.StandardInput.BaseStream.Write(audioBytes, 0, audioBytes.Length); //<--This is where the piping error happens.

        string processOutput = null;
        using (var sr = new StreamWriter("Test.json"))
        {
            while ((processOutput = process.StandardOutput.ReadLine()) != null)
            {
                sr.WriteLine(processOutput);
                Console.WriteLine(processOutput);
            }
            sr.Close();
        }
        
    }


    


    Throughout many variations of the code, posted above, I seem to encounter an error : 'the pipe has ended'.
I think it is a buffering error, where the process handling fpcalc is expecting more byte data, but is cut short ?

    


    Perhaps there is a better way to send stream data from one process and use it in a second process ?