Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (63)

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

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

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (10143)

  • How do I broadcast live audio in Node.js ?

    20 juin 2020, par Yousef Alaqra

    I'm trying stream live audio to a wide range of clients in a web browser.

    



    My current solution :

    



    Dotnet core 3.1 console application

    



      

    1. receive the audio data over UDP
    2. 


    3. trimming the first 28 bytes of each received packet
    4. 


    5. and send the processed packet over UDP.
    6. 


    



    Node JS

    



      

    1. execute a Ffmepg as a child process to receive audio data packets
over UDP from the console app, and encode each packet to audio WAV
format
    2. 


    3. Pipe out the result of the child process into a GET HTTP endpoint response
    4. 


    



    Browser

    



      

    1. HTML audio element with source value equals to the node js GET
endpoint
    2. 


    



    Problem :

    



    The solution is giving a good result, but only for one device(one to one), which is not what I want to achieve.

    



    I've tried many solutions to make it applicable to a wide range of devices, such as using working threads and forking a child process, but none of them changes the result.

    



    I believe that I've to make some changes to the node js implementation, so here I'll share it with you, hoping to get a clue to solve the problem.

    



    var express = require("express");
var app = express();
var children = require("child_process");

var port = 5001;
var host = "192.168.1.230";

app.listen(port, host, () => {
  console.log("Server running at http://" + host + ":" + port + "/");
});

app.get('/stream', (req, res) => {
  const ffmpegCommand = "ffmpeg";
  var ffmpegOptions =
    "-f s16le -ar 48000 -ac 2 -i udp://192.168.1.230:65535 -f wav -";

  var ffm = children.spawn(ffmpegCommand, ffmpegOptions.split(" "));

  res.writeHead(200, { "Content-Type": "audio/wav; codecs=PCM" });
  ffm.stdout.pipe(res);
});


    



    If someone interested to see the full implementation, please let me know.

    


  • How to broadcast live audio in node js (1 to many)

    19 juin 2020, par Yousef Alaqra

    I'm trying stream live audio to a wide range of clients in a web browser.

    



    My current solution :

    



    Dotnet core 3.1 console application

    



      

    1. receive the audio data over UDP
    2. 


    3. trimming the first 28 bytes of each received packet
    4. 


    5. and send the processed packet over UDP.
    6. 


    



    Node JS

    



      

    1. execute a Ffmepg as a child process to receive audio data packets
over UDP from the console app, and encode each packet to audio WAV
format
    2. 


    3. Pipe out the result of the child process into a GET HTTP endpoint response
    4. 


    



    Browser

    



      

    1. HTML audio element with source value equals to the node js GET
endpoint
    2. 


    



    Problem :

    



    The solution is giving a good result, but only for one device(one to one), which is not what I want to achieve.

    



    I've tried many solutions to make it applicable to a wide range of devices, such as using working threads and forking a child process, but none of them changes the result.

    



    I believe that I've to make some changes to the node js implementation, so here I'll share it with you, hoping to get a clue to solve the problem.

    



    var express = require("express");
var app = express();
var children = require("child_process");

var port = 5001;
var host = "192.168.1.230";

app.listen(port, host, () => {
  console.log("Server running at http://" + host + ":" + port + "/");
});

app.get('/stream', (req, res) => {
  const ffmpegCommand = "ffmpeg";
  var ffmpegOptions =
    "-f s16le -ar 48000 -ac 2 -i udp://192.168.1.230:65535 -f wav -";

  var ffm = children.spawn(ffmpegCommand, ffmpegOptions.split(" "));

  res.writeHead(200, { "Content-Type": "audio/wav; codecs=PCM" });
  ffm.stdout.pipe(res);
});


    



    If someone interested to see the full implementation, please let me know.

    


  • Updating app uses FFMpeg version used in older version of app

    29 juin 2020, par Android Developer

    I was using FFMpeg old version in my app and now i updated my app to new FFMpeg version.But when i update my old app version to new app version it still seems to use old version of FFMpeg until i uninstall old app version and then install new app version.I tried programmatically delete cache data in my new version of app using below code but with that also I face problem in some devices which still uses old FFMpeg version-

    


      private void clearData()
    {
        try {
            PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
            int mCurrentVersion = pInfo.versionCode;
            SharedPreferences mSharedPreferences = getSharedPreferences("xyz",  Context.MODE_PRIVATE);
            SharedPreferences.Editor mEditor = mSharedPreferences.edit();
            mEditor.apply();
            int last_version = mSharedPreferences.getInt("last_version", -1);
            if(last_version != mCurrentVersion)
            {
                deleteCache(this);
            }
            mEditor.putInt("last_version", mCurrentVersion);
            mEditor.commit();
        } catch (Exception e) {
            FirebaseCrashlytics.getInstance().recordException(e);
        }
    }
    private void deleteCache(Context context) {
        try {
            File dir = context.getCacheDir();
            deleteCacheDir(dir);
        } catch (Exception e) { FirebaseCrashlytics.getInstance().recordException(e);
        }
    }
    private boolean deleteCacheDir(File dir) {
        if (dir != null && dir.isDirectory()) {
            String[] children = dir.list();
            for (int i = 0; i < children.length; i++) {
                boolean success = deleteCacheDir(new File(dir, children[i]));
                if (!success) {
                    return false;
                }
            }
            return dir.delete();
        } else if(dir!= null && dir.isFile()) {
            return dir.delete();
        } else {
            return false;
        }
    }