Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (5394)

  • fluent-ffmpeg mergeToFile always 128kb audio bit-rate no matter what

    12 septembre 2020, par Martin

    I am trying to use fluent-ffmpeg with my electron app to concatenate multiple audio files together with an image in a video. So if i have three files :

    


    song1.mp3 1:00
song2.mp3 0:30
song3.mp3 2:00
front.jpg

    


    I could create output.mp4 which would be 3:30 seconds long, and play each file one after the other in order. With front.jpg set as the background image.

    


    I am trying to create the concatenated audio file first for this video, then I can just render a vid with two inputs ; image and the 3:30second long concatenated audio file. But I'm having difficulty getting my electron app to wait for the ffmpeg job to run and complete.

    


    I know how to do all of these ffmpeg jobs on the command-line, but I've been following this guide for how to package ffmpeg into an electron app that can run on mac/win10/linux environments. I'm developing it on win10 right now.
gur.com/LtykP.png

    


    I have a button :&#xA;<button>FULLALBUM</button>

    &#xA;

    that when I click runs the fullAlbum() function that calls combineMp3FilesOrig to run the actual ffmpeg job :

    &#xA;

    async function fullAlbum(uploadName) {&#xA;    //document.getElementById("buttonId").disabled = true;&#xA;&#xA;    //get table&#xA;    var table = $(`#upload_${uploadNumber}_table`).DataTable()&#xA;    //get all selected rows&#xA;    var selectedRows = table.rows( &#x27;.selected&#x27; ).data()&#xA;    //get outputFile location&#xA;    var path = require(&#x27;path&#x27;);&#xA;    var outputDir = path.dirname(selectedRows[0].audioFilepath)&#xA;    //create outputfile&#xA;    var timestamp = new Date().getUTCMilliseconds();&#xA;    let outputFilepath = `${outputDir}/output-${timestamp}.mp3` &#xA;&#xA;    &#xA;    console.log(&#x27;fullAlbum() button pressed: &#x27;, timestamp)&#xA;&#xA;    await combineMp3FilesOrig(selectedRows, outputFilepath, &#x27;320k&#x27;, timestamp);&#xA;    //document.getElementById("buttonId").disabled = false;&#xA;&#xA;    console.log(`fullAlbum() /output-${timestamp}.mp3 should be created now`)&#xA;}&#xA;&#xA;function combineMp3FilesOrig(selectedRows, outputFilepath, bitrate, timestamp) {&#xA;    console.log(`combineMp3FilesOrig(): ${outputFilepath}`)&#xA;    &#xA;    //begin get ffmpeg info&#xA;    const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;    //Get the paths to the packaged versions of the binaries we want to use&#xA;    const ffmpegPath = require(&#x27;ffmpeg-static&#x27;).replace(&#x27;app.asar&#x27;,&#x27;app.asar.unpacked&#x27;);&#xA;    const ffprobePath = require(&#x27;ffprobe-static&#x27;).path.replace(&#x27;app.asar&#x27;,&#x27;app.asar.unpacked&#x27;);&#xA;    //tell the ffmpeg package where it can find the needed binaries.&#xA;    ffmpeg.setFfmpegPath(ffmpegPath);&#xA;    ffmpeg.setFfprobePath(ffprobePath);&#xA;    //end set ffmpeg info&#xA;&#xA;    //create ffmpeg command&#xA;    console.log(`combineMp3FilesOrig(): create command`)&#xA;    const command = ffmpeg();&#xA;    //set command inputs&#xA;    command.input(&#x27;C:\\Users\\marti\\Documents\\martinradio\\uploads\\CharlyBoyUTurn\\5. Akula (Club Mix).flac&#x27;)&#xA;    command.input(&#x27;C:\\Users\\marti\\Documents\\martinradio\\uploads\\CharlyBoyUTurn\\4. Civilian Barracks.flac&#x27;)&#xA;&#xA;    return new Promise((resolve, reject) => {&#xA;        console.log(`combineMp3FilesOrig(): command status logging`)&#xA;        command.on(&#x27;progress&#x27;, function(progress) {&#xA;            console.info(`Processing : ${progress.percent} % done`);&#xA;        })&#xA;        .on(&#x27;codecData&#x27;, function(data) {&#xA;            console.log(&#x27;codecData=&#x27;,data);&#xA;        })&#xA;        .on(&#x27;end&#x27;, function() {&#xA;            console.log(&#x27;file has been converted succesfully; resolve() promise&#x27;);&#xA;            resolve();&#xA;        })&#xA;        .on(&#x27;error&#x27;, function(err) {&#xA;            console.log(&#x27;an error happened: &#x27; &#x2B; err.message, &#x27;, reject()&#x27;);&#xA;            reject(err);&#xA;        })&#xA;        console.log(`combineMp3FilesOrig(): add audio bitrate to command`)&#xA;        command.audioBitrate(bitrate)&#xA;        console.log(`combineMp3FilesOrig(): tell command to merge inputs to single file`)&#xA;        command.mergeToFile(outputFilepath);&#xA;        console.log(`combineMp3FilesOrig(): end of promise`)&#xA;    });&#xA;    console.log(`combineMp3FilesOrig(): end of function`)&#xA;}&#xA;

    &#xA;

    When I click my button once, my console.logs show the promise is entered, the command is created, but the function just ends without waiting for a resolve() ;&#xA;Waiting a couple minutes doesnt change anything.

    &#xA;

    enter image description here

    &#xA;

    If I press the button again :

    &#xA;

    enter image description here

    &#xA;

    A new command gets created, reaches the end of the promise, but this time actually starts, and triggers the previous command to start. Both jobs then run and their files are rendered at the correct length (12:08) and the correct quality (320k)

    &#xA;

    Is there something with my promise I need to fix involving async functions and promises in an electron app ? I tried editing my ffmpeg command to include

    &#xA;

    command.run()

    &#xA;

    At the end of my promise to ensure it gets triggered ; but that leads to an err in console saying Uncaught (in promise) Error: No output specified because apparently in fluent-ffmpeg command.mergeToFile(outputFilepath); isnt good enough and I need to include .output(outputFilepath) as well. If I change command.run() to command.output(outputFilepath).run(), when i click my button, the ffmpeg job gets triggered and rendered perfectly fine. EXCEPT THAT THE FILE IS ALWAYS 128kbps

    &#xA;

    So I'm trying to figure out why my included code block, my ffmpeg command doesn't run the first time when its created.

    &#xA;

  • ffmpeg options for encoding a video mpeg2video but with .mov extension

    20 septembre 2020, par Selene

    I just finished a project, and need to produce an output in the specific format, should be exactly the same as the format of the video I received.&#xA;The best way for me to identify the source format was to use ffprobe. Here was the output of that :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mov&#x27;:&#xA;  Metadata:&#xA;    creation_time   : 2020-02-27T04:15:23.000000Z&#xA;  Duration: 00:00:22.13, start: 0.000000, bitrate: 111320 kb/s&#xA;    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p(tv, bt709, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 109779 kb/s, 54.94 fps, 54.94 tbr, 5494 tbn, 50 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-02-27T04:15:23.000000Z&#xA;      handler_name    : Gestor de contenido de v?deo Apple&#xA;      encoder         : XDCAM HD422 1080i50 (50 Mb/s)&#xA;    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2020-02-27T04:15:23.000000Z&#xA;      handler_name    : Gestor de contenido de sonido Apple&#xA;

    &#xA;

    I did a lot of video work on the above file, and as part of my pipeline, I converted the file to ProRes4444. Now I need to get this video into the same format as above.

    &#xA;

    Couple of questions on the format, if I understand it correctly, mpeg2video is mpeg2, this would not normally appear as .mov file, but the source is as mov container. Why ?

    &#xA;

    Does the encoder from the input format matter ? specifically the XDCAM ?

    &#xA;

    Alternative to solving my problem would be to use media encoder, but even that application doesn't seem to give me options at mov + mpeg2, and if it is mov, it almost forces to use Apple ProRes to keep high resolution. Also, none of the options allow me to set fps at the source level, which is 54.94, and the closest option I have is 59.94.

    &#xA;

    Please help,

    &#xA;

  • Python and ffmpeg audio sync and screen recording issues

    9 août 2020, par odddollar

    I'm using ffmpeg and python to record my desktop screen. When the program is run, it starts recording, then when I press a key-combo it cuts off the last x amount of seconds and saves it then starts recording again ; similar to the "record that" functionality of windows game bar.

    &#xA;

    I have it working so it records video just fine, but then I change the ffmpeg command to record audio from my desktop and I get an error saying ValueError: could not convert string to float: &#x27;N/A&#x27; occurring when I try to calculate the length of the recorded video. It appears as though the recording isn't being stopped until after I try to calculate the video length, even though this exact same code works fine when not recording audio.

    &#xA;

    Additionally, I also have an issue when recording audio in that the audio is a couple hundred milliseconds in front of the video. It's not a lot but it's enough to be noticeable.

    &#xA;

    What I'm overall asking, is there a way I can modify the ffmpeg command to prevent the audio desync issues, and what might be causing the problems I'm getting when attempting to find the length of the video with audio ?

    &#xA;

    import keyboard, signal&#xA;from os import remove&#xA;from os.path import isfile&#xA;from subprocess import Popen, getoutput&#xA;from datetime import datetime&#xA;import configparser&#xA;&#xA;class Main:&#xA;    def __init__(self, save_location, framerate, duration):&#xA;        self.save_location = save_location&#xA;        self.framerate = int(framerate)&#xA;        self.duration = int(duration)&#xA;        self.working = self.save_location &#x2B; &#x27;\\&#x27; &#x2B; &#x27;working.avi&#x27;&#xA;        self.start_recording()&#xA;&#xA;    def start_recording(self):&#xA;        if isfile(self.working):&#xA;            remove(self.working)&#xA;&#xA;        # start recording to working file at set framerate&#xA;        self.process = Popen(f&#x27;ffmpeg -thread_queue_size 578 -f gdigrab -video_size 1920x1080 -i desktop -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -b:v 7M -minrate 4M -framerate {self.framerate} {self.working}&#x27;)&#xA;        #self.process = Popen(f&#x27;ffmpeg -f gdigrab -framerate {self.framerate} -video_size 1920x1080 -i desktop -b:v 7M -minrate 2M {self.working}&#x27;)&#xA;&#xA;    def trim_video(self):&#xA;        # stop recording working file&#xA;        self.process.send_signal(signal.CTRL_C_EVENT)&#xA;&#xA;        # call &#x27;cause I have to&#xA;        getoutput(f"ffprobe -i {self.working}")&#xA;&#xA;        # get length of working video&#xA;        length = getoutput(f&#x27;ffprobe -i {self.working} -show_entries format=duration -v quiet -of csv="p=0"&#x27;)&#xA;&#xA;        # get time before desired recording time&#xA;        start = float(length) - self.duration&#xA;&#xA;        # get save location and title&#xA;        title = self.save_location&#x2B;&#x27;\\&#x27;&#x2B;self.get_time()&#x2B;&#x27;.avi&#x27;&#xA;&#xA;        # cut to last amount of desired time&#xA;        Popen(f"ffmpeg -ss {start} -i {self.working} -c copy -t {self.duration} {title}")&#xA;        getoutput(f"ffprobe -i {self.working}")&#xA;&#xA;        self.start_recording()&#xA;&#xA;    def get_time(self):&#xA;        now = datetime.now()&#xA;        return now.strftime("%Y_%m_%d#%H-%M-%S")&#xA;&#xA;&#xA;if __name__ == "__main__":&#xA;    config = configparser.ConfigParser()&#xA;    config.read("settings.ini")&#xA;    config = config["DEFAULT"]&#xA;&#xA;    run = Main(config["savelocation"].replace("\\", "\\\\"), config["framerate"], config["recordlast"])&#xA;    keyboard.add_hotkey("ctrl&#x2B;shift&#x2B;alt&#x2B;g", lambda:run.trim_video())&#xA;&#xA;    while True:&#xA;        try:&#xA;            keyboard.wait()&#xA;        except KeyboardInterrupt:&#xA;            pass&#xA;

    &#xA;

    The contents of the settings.ini file are listed below

    &#xA;

    [DEFAULT]&#xA;savelocation = C:\&#xA;framerate = 30&#xA;recordlast = 10&#xA;

    &#xA;

    In the code block, the first line with self.process = Popen is the one that records audio and has the issues, the second line (the commented out one below) is the one that works fine.

    &#xA;