Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (109)

  • 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 (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (31303)

  • Why does not work audio element currentTime on ffmpeg encoded mp3 file in Chrome browser

    25 juillet 2013, par Peter

    I have an HTML5 audio element :

    <audio preload="auto">
       <source src="./Sound/recording.mp3" type="audio/mpeg">
    </source></audio>

    and I need to be able to play last 4 seconds from mp3 recording. My javaScript is :

    audio.currentTime = audio.duration-4;
    audio.play();

    Works ok in IE10 and Firefox, but Chrome starts playing from a wrong place. The difference between reported audio.currentTime and actual playback position is about 20s. The recording.mp3 is created with ffmpeg :

    ffmpeg -i recording.wav -ab 32k recording.mp3

    It works, when I strip the ID3v2 header from the recording.mp3 (deleting the first couple bytes in the file before the audio data).

    It also works when I compress to ogg. Can somebody point me to the right direction (ffmpeg switches, audio element attributes or whatever) to get it work also in chrome ?

    Thanks in advance

  • after restarting the page in the browser, the player stops loading

    28 juillet 2024, par Uximy

    I have a problem which is that when I start icecast server on ubuntu and not only on ubuntu but also on windows regardless of the operating system, when I first go to the radio station in icecast2 http://localhost:8000/radio the music plays but after restarting the page in the browser, the player stops loading, I tried the solution with nocache in the browser in the address bar, nothing helps, I looked at many users configs, they did not encounter such problems, I will leave my config below, I also wrote a code on nodejs I will also leave it below, the problem plays the same that if I go to a direct icecast link, what I will do through the node js code + ffmpeg, also about the logs, nothing outputs even a hint of any error that is related to this problem

    &#xA;

    Config IceCast :

    &#xA;

    <icecast>&#xA;    <location>Earth</location>&#xA;    <admin>icemaster@localhost</admin>&#xA;    <hostname>localhost</hostname>&#xA;&#xA;    <limits>&#xA;        <clients>100</clients>&#xA;        <sources>10</sources>&#xA;        524288&#xA;        60&#xA;        30&#xA;        10&#xA;        1&#xA;        65536&#xA;    </limits>&#xA;&#xA;    <authentication>&#xA;        hackme&#xA;        hackme&#xA;        admin&#xA;        hackme&#xA;    </authentication>&#xA;&#xA;    &#xA;        <port>8000</port>&#xA;        0.0.0.0&#xA;    &#xA;    &#xA;    &#xA;        <port>8443</port>&#xA;        0.0.0.0&#xA;        <ssl>1</ssl>&#xA;    &#xA;&#xA;    &#xA;        <header value="*"></header>&#xA;        <header value="Origin, X-Requested-With, Content-Type, Accept"></header>&#xA;        <header value="GET, POST, OPTIONS"></header>&#xA;        <header value="no-cache, no-store, must-revalidate"></header>&#xA;        <header value="no-cache"></header>&#xA;        <header value="0"></header>&#xA;    &#xA;&#xA;    &#xA;    <mount type="normal">&#xA;        /radio&#xA;        <password>mypassword</password>&#xA;        <public>1</public>&#xA;        100&#xA;        Anime Vibes&#xA;        Anime Vibes&#xA;        <genre>various</genre>&#xA;        audio/ogg&#xA;        65536&#xA;        &#xA;        &#xA;            <header value="*"></header>&#xA;            <header value="Origin, X-Requested-With, Content-Type, Accept"></header>&#xA;            <header value="GET, POST, OPTIONS"></header>&#xA;            <header value="no-cache, no-store, must-revalidate"></header>&#xA;            <header value="no-cache"></header>&#xA;            <header value="0"></header>&#xA;        &#xA;    </mount>&#xA;&#xA;    <fileserve>1</fileserve>&#xA;&#xA;    <paths>&#xA;        <logdir>/var/log/icecast2</logdir>&#xA;        <webroot>/etc/icecast2/web</webroot>&#xA;        <adminroot>/etc/icecast2/admin</adminroot>&#xA;       &#xA;        <alias source="/" destination="/status.xsl"></alias>&#xA;        &#xA;        /etc/icecast2/cert/icecast.pem&#xA;        &#xA;    </paths>&#xA;&#xA;    <logging>&#xA;        <accesslog>access.log</accesslog>&#xA;        <errorlog>error.log</errorlog>&#xA;        <playlistlog>playlist.log</playlistlog>&#xA;        <loglevel>1</loglevel> &#xA;        <logsize>10000</logsize> &#xA;        <logarchive>1</logarchive>&#xA;    </logging>&#xA;</icecast>&#xA;

    &#xA;

    Code Node.js :

    &#xA;

    const express = require(&#x27;express&#x27;);&#xA;const { spawn } = require(&#x27;child_process&#x27;);&#xA;const path = require(&#x27;path&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const https = require(&#x27;https&#x27;);&#xA;const app = express();&#xA;const port = 3000;&#xA;&#xA;const privateKey = fs.readFileSync(&#x27;./cert/privateKey.key&#x27;, &#x27;utf8&#x27;);&#xA;const certificate = fs.readFileSync(&#x27;./cert/certificate.crt&#x27;, &#x27;utf8&#x27;);&#xA;&#xA;const credentials = {&#xA;    key: privateKey,&#xA;    cert: certificate&#xA;};&#xA;&#xA;app.use(express.static(path.join(__dirname)));&#xA;&#xA;// Check if playlist file exists&#xA;const playlistPath = path.join(__dirname, &#x27;playlist.txt&#x27;);&#xA;if (!fs.existsSync(playlistPath)) {&#xA;    console.error(&#x27;Playlist file does not exist&#x27;);&#xA;    process.exit(1);&#xA;}&#xA;&#xA;console.log(`Playlist path: ${playlistPath}`);&#xA;&#xA;// Start FFmpeg process to create continuous stream from playlist&#xA;const ffmpegProcess = spawn(&#x27;ffmpeg&#x27;, [&#xA;    &#x27;-re&#x27;,&#xA;    &#x27;-f&#x27;, &#x27;concat&#x27;,&#xA;    &#x27;-safe&#x27;, &#x27;0&#x27;,&#xA;    &#x27;-protocol_whitelist&#x27;, &#x27;file,http,https,tcp,tls&#x27;,&#xA;    &#x27;-i&#x27;, playlistPath,&#xA;    &#x27;-c:a&#x27;, &#x27;libvorbis&#x27;,&#xA;    &#x27;-f&#x27;, &#x27;ogg&#x27;,&#xA;    &#x27;-tls&#x27;, &#x27;1&#x27;,&#xA;    &#x27;icecast://source:mypassword@localhost:8443/radio&#x27;&#xA;]);&#xA;&#xA;ffmpegProcess.stdout.on(&#x27;data&#x27;, (data) => {&#xA;    console.log(`FFmpeg stdout: ${data}`);&#xA;});&#xA;&#xA;ffmpegProcess.stderr.on(&#x27;data&#x27;, (data) => {&#xA;    console.error(`FFmpeg stderr: ${data}`);&#xA;});&#xA;&#xA;ffmpegProcess.on(&#x27;close&#x27;, (code) => {&#xA;    console.log(`FFmpeg process exited with code ${code}`);&#xA;});&#xA;&#xA;app.get(&#x27;/radio&#x27;, (req, res) => {&#xA;    res.setHeader(&#x27;Content-Type&#x27;, &#x27;audio/ogg&#x27;);&#xA;    res.setHeader(&#x27;Transfer-Encoding&#x27;, &#x27;chunked&#x27;);&#xA;&#xA;    const requestOptions = {&#xA;        hostname: &#x27;localhost&#x27;,&#xA;        port: 8443,&#xA;        path: &#x27;/radio&#x27;,&#xA;        method: &#x27;GET&#x27;,&#xA;        headers: {&#xA;            &#x27;Accept&#x27;: &#x27;audio/ogg&#x27;&#xA;        },&#xA;        rejectUnauthorized: false&#xA;    };&#xA;&#xA;    const request = https.request(requestOptions, (response) => {&#xA;        response.pipe(res);&#xA;&#xA;        response.on(&#x27;end&#x27;, () => {&#xA;            res.end();&#xA;        });&#xA;    });&#xA;&#xA;    request.on(&#x27;error&#x27;, (err) => {&#xA;        console.error(`Request error: ${err.message}`);&#xA;        res.status(500).send(&#x27;Internal Server Error&#x27;);&#xA;    });&#xA;&#xA;    request.end();&#xA;});&#xA;https.globalAgent.options.ca = [certificate];&#xA;// Create HTTPS server&#xA;const httpsServer = https.createServer(credentials, app);&#xA;&#xA;httpsServer.listen(port, () => {&#xA;    console.log(`Server is running at https://localhost:${port}`);&#xA;});&#xA;

    &#xA;

    I hope for your help and any advice, thanks in advance

    &#xA;

  • Is there any way to change file FPS in javascript browser or prepare wav conventer to 60FPS videos ?

    16 novembre 2020, par SZtyro

    I'm making web application which stores short audio files that have been cut from large video files. User uploads .mp4 file, chooses sound length and here's a little trick. Cutting audio can only be done in backend (correct me if I'm wrong) and sending 700MB data is not good option, so I use code below to decode audio data from .mp4 and then I send it with start and stop params. Backend (Node.js) use's FFMPEG to cut audio and save's it.

    &#xA;

    This part works, but i realised that decoded audio from 60FPS video doesn't sound good (not terrible but totally useless in my app). My goal is to avoid third party, especially desktop, apps (like audacity) and allow user to cut revelant part of audio from any mp4 video. Is there any way to convert 60FPS video to 30FPS video (ArrayBuffer) in browser and then decode audio ?

    &#xA;

          fileInput.onchange = event => {&#xA;      this.file = event.target["files"][0];&#xA;      //.mp4 file&#xA;      this.fileURL = URL.createObjectURL(this.file)&#xA;&#xA;      let baseAudioContext = new AudioContext();&#xA;      this.file.arrayBuffer().then(buff => {&#xA;&#xA;        baseAudioContext.decodeAudioData(buff,&#xA;          success => {&#xA;            console.log(success)&#xA;            this.bufferToWave(success, 0, success.length);&#xA;          },&#xA;          err => console.log(err));&#xA;      })&#xA;    }&#xA;&#xA;  bufferToWave(abuffer, offset, len) {&#xA;&#xA;    var numOfChan = abuffer.numberOfChannels,&#xA;      length = len * numOfChan * 2 &#x2B; 44,&#xA;      buffer = new ArrayBuffer(length),&#xA;      view = new DataView(buffer),&#xA;      channels = [], i, sample,&#xA;      pos = 0;&#xA;&#xA;    // write WAVE header&#xA;    setUint32(0x46464952);                         // "RIFF"&#xA;    setUint32(length - 8);                         // file length - 8&#xA;    setUint32(0x45564157);                         // "WAVE"&#xA;&#xA;    setUint32(0x20746d66);                         // "fmt " chunk&#xA;    setUint32(16);                                 // length = 16&#xA;    setUint16(1);                                  // PCM (uncompressed)&#xA;    setUint16(numOfChan);&#xA;    setUint32(abuffer.sampleRate);&#xA;    setUint32(abuffer.sampleRate * 2 * numOfChan); // avg. bytes/sec&#xA;    setUint16(numOfChan * 2);                      // block-align&#xA;    setUint16(16);                                 // 16-bit (hardcoded in this demo)&#xA;&#xA;    setUint32(0x61746164);                         // "data" - chunk&#xA;    setUint32(length - pos - 4);                   // chunk length&#xA;&#xA;    // write interleaved data&#xA;    for (i = 0; i &lt; abuffer.numberOfChannels; i&#x2B;&#x2B;)&#xA;      channels.push(abuffer.getChannelData(i));&#xA;&#xA;    while (pos &lt; length) {&#xA;      for (i = 0; i &lt; numOfChan; i&#x2B;&#x2B;) {             // interleave channels&#xA;        sample = Math.max(-1, Math.min(1, channels[i][offset])); // clamp&#xA;        sample = (0.5 &#x2B; sample &lt; 0 ? sample * 32768 : sample * 32767) | 0; // scale to 16-bit signed int&#xA;        view.setInt16(pos, sample, true);          // update data chunk&#xA;        pos &#x2B;= 2;&#xA;      }&#xA;      offset&#x2B;&#x2B;                                     // next source sample&#xA;    }&#xA;&#xA;    // create Blob&#xA;    //return (URL || webkitURL).createObjectURL(new Blob([buffer], { type: "audio/wav" }));&#xA;    var u = (URL || webkitURL).createObjectURL(new Blob([buffer], { type: "audio/wav" }));&#xA;&#xA;    //temporary part&#xA;    //downloading file to check quality&#xA;    //in this part sound is already broken, no need to show backend code&#xA;    const a = document.createElement(&#x27;a&#x27;);&#xA;    a.style.display = &#x27;none&#x27;;&#xA;    a.href = u;&#xA;    a.download = name;&#xA;    document.body.appendChild(a);&#xA;    a.click();&#xA;&#xA;&#xA;&#xA;    function setUint16(data) {&#xA;      view.setUint16(pos, data, true);&#xA;      pos &#x2B;= 2;&#xA;    }&#xA;&#xA;    function setUint32(data) {&#xA;      view.setUint32(pos, data, true);&#xA;      pos &#x2B;= 4;&#xA;    }&#xA;  }&#xA;

    &#xA;