Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (29)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (6663)

  • C# How do I set the volume of sound bytes[]

    23 juillet 2016, par McLucario

    Im trying to change the volume of sound bytes[] in C#. Im reading a sound file with FFMPEG and and wanna change the volume on the fly. I found some examples and but I didnt understand them.

    public void SendAudio(string pathOrUrl)
    {
       cancelVid = false;
       isPlaying = true;

       mProcess = Process.Start(new ProcessStartInfo
       { // FFmpeg requireqs us to spawn a process and hook into its stdout, so we will create a Process
           FileName = "ffmpeg",
           Arguments = "-i " + (char)34 + pathOrUrl + (char)34 + // Here we provide a list of arguments to feed into FFmpeg. -i means the location of the file/URL it will read from
           " -f s16le -ar 48000 -ac 2 pipe:1", // Next, we tell it to output 16-bit 48000Hz PCM, over 2 channels, to stdout.
           UseShellExecute = false,
           RedirectStandardOutput = true, // Capture the stdout of the process
           Verb = "runas"
       });

       while (!isRunning(mProcess)) { Task.Delay(1000); }

       int blockSize = 3840; // The size of bytes to read per frame; 1920 for mono
       byte[] buffer = new byte[blockSize];
       byte[] gainBuffer = new byte[blockSize];
       int byteCount;

       while (true && !cancelVid) // Loop forever, so data will always be read
       {
           byteCount = mProcess.StandardOutput.BaseStream // Access the underlying MemoryStream from the stdout of FFmpeg
           .Read(buffer, 0, blockSize); // Read stdout into the buffer

           if (byteCount == 0) // FFmpeg did not output anything
               break; // Break out of the while(true) loop, since there was nothing to read.

           if (cancelVid)
               break;

           disAudioClient.Send(buffer, 0, byteCount); // Send our data to Discord
       }
       disAudioClient.Wait(); // Wait for the Voice Client to finish sending data, as ffMPEG may have already finished buffering out a song, and it is unsafe to return now.
       isPlaying = false;
       Console.Clear();
       Console.WriteLine("Done Playing!");
  • Converting ffmpeg CLI command to ffmpeg-python to get bytes of a MPEG Transport Stream data stream ?

    28 août 2023, par kdeckerr

    I have the following code to get the bytes representing the data stream of a .ts video :

    


    def get_datastream_bytes(mpeg_ts_filepath):
    ffmpeg_command = [
        'ffmpeg', '-hide_banner', '-loglevel', 'quiet',
        '-i', mpeg_ts_filepath,
        '-map', '0:d',
        '-c', 'copy',
        '-copy_unknown',
        '-f', 'data',
        'pipe:1'
    ]

    try:
        output_bytes = subprocess.check_output(ffmpeg_command, stderr=subprocess.STDOUT)
        print("Output bytes length:", len(output_bytes))
        return output_bytes
    except subprocess.CalledProcessError as e:
        print("Error:", e.output)


    


    I can then wrap the returned value in io.BytesIO and parse the resulting bytes using another library (klvdata).

    


    This code was fashioned upon a ffmpeg CLI command I adapted from this SO Answer.

    


    ffmpeg -i "C:\inputfile.ts" -map 0:d -c copy -copy_unknown -f:d data pipe:1


    



    


    What I would really like to do is utilize the Python ffmpeg bindings in ffmpeg-python so that users do not have to install ffmpeg locally. Thus, I have attempted to get a bytes stream from an ffmpeg call like so :

    


    bytestream = (
    ffmpeg.input(input_file)
        .output("pipe:", format="data", codec="copy", copy_unknown=True)
        .run(capture_stdout=True)
)


    


    Though, this and many other, attempts at utilizing ffmpeg-python generally end with the same error :

    


    


    Output #0, data, to 'True' :
[out#0/data @ 00000...] Output file does not contain any stream
Error opening output file True.
Error opening output files : Invalid argument
Traceback (most recent call last) :
...
raise Error('ffmpeg', out, err)
ffmpeg._run.Error : ffmpeg error (see stderr output for detail)

    


    



    


    How do I convert the ffmpeg CLI command

    


    ffmpeg -i "C:\inputfile.ts" -map 0:d -c copy -copy_unknown -f:d data pipe:1


    


    To an ffmpeg-python call ?

    


  • reading ffmpeg output and sending it to a form

    3 juillet 2013, par Aeon2058

    I can run arguments through ffmpeg just fine, but I need to be able to read its output LIVE as it streams (as you may know, ffmpeg can take a while, and it updates its stderr twice a second with current frame, etc).

    I have a form called prog that was declared globally with ProgressForm prog = new ProgressForm(); The user inputs a folder of video files, some data is gathered, and then a button is pushed to start the encoding process with ffmpeg. The button_click event creates a new thread like so :

    runFFMpeg = new Thread(run_ffmpeg);
    runFFMpeg.start();

    runFFMpeg was initialized globally earlier with private Thread runFFMpeg;.

    Now I have the method run_ffmpeg :

    private void run_ffmpeg()
    {
       string program = "C:\\ffmpeg64.exe";
       string args = //some arguments that I know work;

       ProcessStartInfo run = new ProcessStartInfo(program,args);
       run.UseShellExecute = false;
       run.CreateNoWindow = true;
       run.RedirectStandardOutput = true;
       run.RedirectStandardError = true;
       Process runP = new Process();
       runP = Process.Start(run);
       runP.WaitForExit();

       //NOW WHAT?

    }

    I'm not sure what to do now to get the data LIVE, but if I can, I would be updating prog, which has a number of controls, including progress bars, etc. Typical output (that I'm interested in) looks like "frame= 240 fps= 12.8 q=0.0 size= 1273802kB time=00:00:08.008 bitrate=4415.2kbits/s dup=46 drop=0". I know how to parse that to get what I need, I just need that line !