Recherche avancée

Médias (91)

Autres articles (42)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7589)

  • Issues with adding the current timestamp of a video when using FFPLAY

    28 janvier 2023, par lalelarsen1

    Hi i am trying to add to display the current time of the video as an overlay. i have tried to do follow the answer of this previous post : https://superuser.com/questions/968685/how-to-display-current-time-with-the-ffplay-exe but with no luck.

    


    This is my line of code :

    


    "./ffmpeg-2023-01-25-git-2c3107c3e9-full_build/bin/ffplay.exe" -vf "drawtext=fontfile=./consola.ttf:text='%{pts:hms}':fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20" -i "%shadowplays_folder%\%NEWEST_FOLDER%\%NEWEST_FILE%" -autoexit -x "1000" -alwaysontop


    


    This will display the text "hms}" not the time.

    


    the above code works fine if i replace it with a simple string :

    


    "./ffmpeg-2023-01-25-git-2c3107c3e9-full_build/bin/ffplay.exe" -vf "drawtext=fontfile=./consola.ttf:text='test':fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20" -i "%shadowplays_folder%\%NEWEST_FOLDER%\%NEWEST_FILE%" -autoexit -x "1000" -alwaysontop


    


    This will display the text "test"

    


    what am i missing ?

    


  • Parse dynamic mpd file with Media Source Extensions

    17 février 2023, par FrankC

    I just started learning about adaptive streaming, and currently I'm working on a project that needs showing a live video. In order to control some of the elements in mpd file, I determined to use MSE instead of dash.js. I refer to the code at the following URL :https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/dn551368(v=vs.85)
But I found out that there is no "Initialization" tag or "range" attribute in my mpd file. I don't find any relative attribute as well. By the way I'm use nginx-rtmp + ffmpeg to generate dash file.
So here is my dash file looks like

    


    &lt;?xml version="1.0"?>&#xA; &#xA;  <period start="PT0S">&#xA;    &#xA;      &#xA;        &#xA;          <segmenttimeline>&#xA;             <s t="0" d="10000"></s>&#xA;             <s t="10000" d="10000"></s>&#xA;             <s t="20000" d="5000"></s>&#xA;             <s t="25000" d="10000"></s>&#xA;          </segmenttimeline>&#xA;        &#xA;      &#xA;    &#xA;  </period>&#xA;&#xA;

    &#xA;

    My question is :&#xA;1.Did I have any missing parameters in using ffmpeg or nginx-rtmp resulting in losting tag in mpd file ?&#xA;2.Or there is other way to setup "Initialization"/"range" attribute and let my program work ?&#xA;3.I also curious about why my mpd file doesn't have a baseURL element ?

    &#xA;

    ※My mpd file works fine with dash.js, I can see the video properly

    &#xA;

    THANKS A LOT

    &#xA;

  • How to overlay two mp3 audio files with different bitrates using fluent-ffmpeg

    7 janvier 2023, par Alex P Mnz

    I am trying to overlay one mp3 file (a speech track, the file name for which is passed into the below function) on top of another (a background music track, the url of which is passed into the function), so that they both play simultaneously, using NodeJS and fluent-ffmpeg.

    &#xA;

    What happens when I call the function is that I get an output file which 1) only plays the background audio track, and 2) upon opening the output track, the time seeker skips straight to where the end of the first audio track would have been (around 1 minute 30 seconds).

    &#xA;

    I'd like to in the first instance have them play at the same time as each other in the output file, without this skipping ahead effect (even if I drag the slider back to within the first 1 minute 30, it just jumps straight back to 1 minute 31 seconds - as if somehow there was no data in that first minute and a half).

    &#xA;

    In the second instance, I'd also like to have the background audio track loop until the first track finishes, so any help with that as part of an answer would be very much appreciated. But the immediate problem is just getting the two audios to actually play simultaneously starting from 0 seconds.

    &#xA;

    I have tried the below to get to this point :

    &#xA;

    const fs = require(&#x27;fs&#x27;);&#xA;const ffmpegPath = require(&#x27;@ffmpeg-installer/ffmpeg&#x27;).path;&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;ffmpeg.setFfmpegPath(ffmpegPath);&#xA;var ffprobe = require(&#x27;ffprobe-static&#x27;);&#xA;ffmpeg.setFfprobePath(ffprobe.path);&#xA;const axios = require(&#x27;axios&#x27;);&#xA;const crypto = require(&#x27;crypto&#x27;);&#xA;const path = require(&#x27;path&#x27;);&#xA;&#xA;&#xA;const overlayBackgroundAudio = async (inputFileName, backgroundFileUrl) => {&#xA;&#xA;    const backgroundTrack = await axios({&#xA;        method: &#x27;GET&#x27;,&#xA;        url: backgroundFileUrl,&#xA;        responseType: &#x27;arraybuffer&#x27;&#xA;    });&#xA;&#xA;    // write a file with the retrieved background audio track&#xA;    const backgroundTrackFileName = crypto.randomBytes(12).toString(&#x27;hex&#x27;);&#xA;    fs.writeFileSync(`${backgroundTrackFileName}.mp3`, backgroundTrack.data); //todo - delete after&#xA;&#xA;&#xA;    // set the name of the output file&#xA;    const newFileName = crypto.randomBytes(12).toString(&#x27;hex&#x27;);&#xA;    const outputFileName = `${newFileName}.mp3`;&#xA;&#xA;    // run the relevant ffmpeg commands&#xA;&#xA;    const overlayTracks = async () => {&#xA;    &#xA;        return new Promise((resolve, reject) => {&#xA;            ffmpeg()&#xA;                .input(`${inputFileName}.mp3`)&#xA;                .input(`${backgroundTrackFileName}.mp3`)&#xA;                .complexFilter([&#xA;                    {&#xA;                      filter: &#x27;volume&#x27;,&#xA;                      options: &#x27;1&#x27;,&#xA;                      inputs: &#x27;[0:0]&#x27;,&#xA;                      outputs: &#x27;[a]&#x27;&#xA;                    },&#xA;                    {&#xA;                      filter: &#x27;volume&#x27;,&#xA;                      options: &#x27;1&#x27;,&#xA;                      inputs: &#x27;[1:0]&#x27;,&#xA;                      outputs: &#x27;[b]&#x27;&#xA;                    },&#xA;                    {&#xA;                        filter: &#x27;adelay&#x27;,&#xA;                        options: &#x27;0&#x27;,&#xA;                        inputs: &#x27;[a]&#x27;,&#xA;                        outputs: &#x27;[a1]&#x27;&#xA;                    },&#xA;                    {&#xA;                        filter: &#x27;adelay&#x27;,&#xA;                        options: &#x27;0|0&#x27;,&#xA;                        inputs: &#x27;[b]&#x27;,&#xA;                        outputs: &#x27;[b1]&#x27;&#xA;                    },&#xA;                    {&#xA;                      filter: &#x27;amix&#x27;,&#xA;                      options: &#x27;inputs=2:duration=first&#x27;,&#xA;                      inputs: &#x27;[a1][b1]&#x27;,&#xA;                      outputs: &#x27;[out]&#x27;&#xA;                    }&#xA;                ])&#xA;                .outputOptions([&#x27;-map&#x27;, &#x27;[out]&#x27;, outputFileName])&#xA;                .output(outputFileName)&#xA;                .on(&#x27;end&#x27;, function() {&#xA;                    resolve(outputFileName);&#xA;                })&#xA;                .on(&#x27;stderr&#x27;, console.log) // log ffmpeg output to console&#xA;                .on(&#x27;error&#x27;, function(err) {&#xA;                    console.log(`An error occurred overlaying tracks: ${err.message}`);&#xA;                    reject(err);&#xA;                })&#xA;                .run()&#xA;        })&#xA;    }&#xA;&#xA;    const overlaidTracksFileName = await overlayTracks();&#xA;&#xA;    console.log(&#x27;overlaid file name:&#x27;, overlaidTracksFileName)&#xA;&#xA;    return overlaidTracksFileName;&#xA;   &#xA;}&#xA;&#xA;module.exports = overlayBackgroundAudio;&#xA;

    &#xA;

    Here is what the ffmpeg library is logging to my console (which may help in figuring out why this is not working as intended) :

    &#xA;

    Input #0, mp3, from &#x27;95c8ec8ccbb100d2bfe81ffd.mp3&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.24.101&#xA;  Duration: 00:02:41.42, start: 0.046042, bitrate: 48 kb/s&#xA;    Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s&#xA;[mp3 @ 000002c77978ddc0] Estimating duration from bitrate, this may be inaccurate&#xA;Input #1, mp3, from &#x27;14e70bbd339b612e96f29017.mp3&#x27;:&#xA;  Metadata:&#xA;    date            : 2022-12-30 17:56&#xA;    id3v2_priv.XMP  : &lt;?xpacket begin="\xef\xbb\xbf" id="W5M0MpCehiHzreSzNTczkc9d"?>\x0a\x0a \x0a  s&#xA;    Stream #1:0: Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 (mp3float) -> volume (graph 0)&#xA;  Stream #1:0 (mp3float) -> volume (graph 0)&#xA;  amix (graph 0) -> Stream #0:0 (libmp3lame)&#xA;  Stream #1:0 -> #1:0 (mp3 (mp3float) -> mp3 (libmp3lame))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, mp3, to &#x27;0c0404b793d488bf38e882a0.mp3&#x27;:&#xA;  Metadata:&#xA;    TSSE            : Lavf58.24.101&#xA;    Stream #0:0: Audio: mp3 (libmp3lame), 24000 Hz, mono, fltp (default)&#xA;    Metadata:&#xA;      encoder         : Lavc58.42.102 libmp3lame&#xA;Output #1, mp3, to &#x27;0c0404b793d488bf38e882a0.mp3&#x27;:&#xA;  Metadata:&#xA;    TSSE            : Lavf58.24.101&#xA;    Stream #1:0: Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp&#xA;    Metadata:&#xA;      encoder         : Lavc58.42.102 libmp3lame&#xA;&#xA;&#xA;

    &#xA;

    Thank you very much in advance for any help that you can try to provide !

    &#xA;