Recherche avancée

Médias (91)

Autres articles (104)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (10916)

  • avcodec/jpeg2000 : replace naive pow call with smarter exp2fi

    8 décembre 2015, par Ganesh Ajjanagadde
    avcodec/jpeg2000 : replace naive pow call with smarter exp2fi
    

    pow is a very wasteful function for this purpose. A low hanging fruit
    would be simply to replace with exp2f, and that does yield some speedup.
    However, there are 2 drawbacks of this :
    1. It does not exploit the integer nature of the argument.
    2. (minor) Some platforms lack a proper exp2f routine, making benefits available
    only to non broken libm.
    3. exp2f does not solve the same issue that plagues pow, namely terrible
    worst case performance. This is a fundamental issue known as the
    "table-maker’s dilemma" recognized by Prof. Kahan himself and
    subsequently elaborated and researched by many others. All this is clear from benchmarks below.

    This exploits the IEEE-754 format to get very good performance even in
    the worst case for integer powers of 2. This solves all the issues noted
    above. Function tested with clang usan over [-1000, 1000] (beyond range of
    relevance for this, which is [-255, 255]), patch itself with FATE.

    Benchmarks obtained on x86-64, Haswell, GNU-Linux via 10^5 iterations of
    the pow call, START/STOP, and command ffplay /samples/jpeg2000/chiens_dcinema2K.mxf.
    Low number of runs also given to prove the point about worst case :

    pow :
    216270 decicycles in pow, 1 runs, 0 skips
    110175 decicycles in pow, 2 runs, 0 skips
    56085 decicycles in pow, 4 runs, 0 skips
    29013 decicycles in pow, 8 runs, 0 skips
    15472 decicycles in pow, 16 runs, 0 skips
    8689 decicycles in pow, 32 runs, 0 skips
    5295 decicycles in pow, 64 runs, 0 skips
    3599 decicycles in pow, 128 runs, 0 skips
    2748 decicycles in pow, 256 runs, 0 skips
    2304 decicycles in pow, 511 runs, 1 skips
    2072 decicycles in pow, 1022 runs, 2 skips
    1963 decicycles in pow, 2044 runs, 4 skips
    1894 decicycles in pow, 4091 runs, 5 skips
    1860 decicycles in pow, 8184 runs, 8 skips

    exp2f :
    134140 decicycles in pow, 1 runs, 0 skips
    68110 decicycles in pow, 2 runs, 0 skips
    34530 decicycles in pow, 4 runs, 0 skips
    17677 decicycles in pow, 8 runs, 0 skips
    9175 decicycles in pow, 16 runs, 0 skips
    4931 decicycles in pow, 32 runs, 0 skips
    2808 decicycles in pow, 64 runs, 0 skips
    1747 decicycles in pow, 128 runs, 0 skips
    1208 decicycles in pow, 256 runs, 0 skips
    952 decicycles in pow, 512 runs, 0 skips
    822 decicycles in pow, 1024 runs, 0 skips
    765 decicycles in pow, 2047 runs, 1 skips
    722 decicycles in pow, 4094 runs, 2 skips
    693 decicycles in pow, 8190 runs, 2 skips

    exp2fi :
    2740 decicycles in pow, 1 runs, 0 skips
    1530 decicycles in pow, 2 runs, 0 skips
    955 decicycles in pow, 4 runs, 0 skips
    622 decicycles in pow, 8 runs, 0 skips
    477 decicycles in pow, 16 runs, 0 skips
    368 decicycles in pow, 32 runs, 0 skips
    317 decicycles in pow, 64 runs, 0 skips
    291 decicycles in pow, 128 runs, 0 skips
    277 decicycles in pow, 256 runs, 0 skips
    268 decicycles in pow, 512 runs, 0 skips
    265 decicycles in pow, 1024 runs, 0 skips
    263 decicycles in pow, 2048 runs, 0 skips
    263 decicycles in pow, 4095 runs, 1 skips
    260 decicycles in pow, 8191 runs, 1 skips

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>

    • [DH] libavcodec/jpeg2000.c
  • nginx push rtmp stream to ffmpeg

    1er janvier 2021, par vicmortelmans

    On my Raspberry Pi with camera module, I try to setup a web-based streaming platform. I want to preview the stream in my browser and use CGI scripts to start/stop broadcasting to youtube (,...).

    &#xA;

    This is how I did the streaming setup so far :

    &#xA;

    enter image description here

    &#xA;

    Nginx puts up an RTMP application webcam. This is where I'll send the camera and audio stream usig ffmpeg. It publishes the stream as HLS for the web preview. It's also pushing the stream to another application source. That's where I want to (occasionally) hook up another ffmpeg process for broadcasting to youtube (,...) RTMP end points.

    &#xA;

    I initiate the stream using ffmpeg like this :

    &#xA;

    ffmpeg -loglevel debug -f v4l2 -framerate 15 -video_size 1280x720 -input_format h264 -i /dev/video0 -f alsa -i hw:2 -codec:v copy -g 15 -codec:a aac -b:a 128k -ar 44100 -strict experimental -f flv "rtmp://localhost:1935/webcam/hhart"&#xA;

    &#xA;

    So far everything works fine. I can preview the HLS stream using a video.js viewer on my website (also served by nginx).

    &#xA;

    Now I want to start another ffmpeg process for broadcasting to my youtube channel, hooked up to the source application like this :

    &#xA;

    ffmpeg -loglevel debug -f flv -listen 1 -i rtmp://localhost:1935/source/hhart -c copy &#x27;rtmp://a.rtmp.youtube.com/live2/<key>&#x27;&#xA;</key>

    &#xA;

    (in the final setup, launching and killing this process will be done via CGI scripts)

    &#xA;

    This is what ffmpeg returns :

    &#xA;

    Opening an input file: rtmp://localhost:1935/source/hhart.&#xA;[flv @ 0x2032480] Opening &#x27;rtmp://localhost:1935/source/hhart&#x27; for reading&#xA;[rtmp @ 0x2032a10] No default whitelist set&#xA;[tcp @ 0x20330f0] No default whitelist set&#xA;

    &#xA;

    and then... nothing happens. There's no stream coming in at Youtube studio, but there are no error messages either.

    &#xA;

    Some other tests I did :

    &#xA;

      &#xA;
    1. from the webcam application, push directly to the Youtube RTMP => that works ! (but it's not what I want, because I want the HLS stream to be online always, but the broadcasting only when I'm going live.)

      &#xA;

    2. &#xA;

    3. from VLC display the stream at rtmp://localhost:1935/source/hhart => similar to ffmpeg, there's no error message, the progress bar keeps loading.

      &#xA;

    4. &#xA;

    &#xA;

    So I have the impression that there is something going on, but there's no actual data transmitted.

    &#xA;

    RTMP section in nginx.conf :

    &#xA;

    rtmp {                                                                     &#xA;    server {                                                               &#xA;        listen 1935;                                                       &#xA;        chunk_size 4000;                                                   &#xA;                                                                           &#xA;        application webcam {                                               &#xA;            live on;                                                       &#xA;            hls on;                                                        &#xA;            hls_path /Services/Webcam/HLSStream;                           &#xA;            hls_fragment 3;                                                &#xA;            hls_playlist_length 60;                                        &#xA;            #deny play all;                                                 &#xA;            push rtmp://localhost:1935/source/;                            &#xA;            #push rtmp://a.rtmp.youtube.com/live2/<key>;&#xA;        }                                                                  &#xA;                                                                           &#xA;        application source {                                               &#xA;            live on;                                                       &#xA;            record off;                                                    &#xA;        }                                                                  &#xA;    }                                                                      &#xA;}                                                                          &#xA;</key>

    &#xA;

    Of course, I may be totally on the wrong track, so any suggestions how I can realize my requirements in a better way, are welcome !

    &#xA;

  • Background process that is run on file is still running after the file is deleted

    19 octobre 2015, par Marko Djokic

    So i have a process in Android that is run like this :

      process = Runtime.getRuntime().exec(commandString);
      Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
           public void run() {
                Log.d("ShutDownHook Called");
                process.destroy();
           }
      }));

    Where the command string contains a file path and some other arguments.
    That process is a CPU heavy process and can take last as long as a few hours (Movie transcoding). The file is an ffmpeg static file. The problem is in some cases the process stays in the background even though i killed the app. That situation is on one of my phones when i kill the app with the task manager. That being said, the onDestroy() method is not called, nor is the onTerminate() from the application class, nor the shutdown hook from above.

    Also i have created a background service with a notification, so when exit the app the service should stay in the background. Even with this kind of control, when i kill the application with the task manager, the service is restarted and i lose all the references to my ffmpeg class, Async task, process etc, and i cannot stop the process because i have null pointers.
    Anyway i can ensure that the service will not be tampered with the app kill, so i can kill the process with the notification bar from my service ?

    ServiceConnection mConnection = new ServiceConnection() {

       public void onServiceDisconnected(ComponentName name) {
           Log.d("HelperActivity", "onServiceDisconnected");
           mIsBound = false;
           mServer = null;
       }

       public void onServiceConnected(ComponentName name, IBinder service) {
           Log.d("HelperActivity", "onServiceConnected");
           mIsBound = true;
           NotificationService.LocalBinder mLocalBinder = (NotificationService.LocalBinder)service;
           mServer = mLocalBinder.getServerInstance();
           //mServer.test();
       }
    };
    //This is the onCreate of the application class
    @Override
    public void onCreate() {
       super.onCreate();
       Intent intent = new Intent(this,
               NotificationService.class);

       startService(intent);
       bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
       Log.d("onCreate", "Called");
       singleton = this;

    }

    I have been using http://hiteshsondhi88.github.io/ffmpeg-android-java/ for the ffmpeg support. Of course added new features but the basic concept of running a ffmpeg command is the same.

    One other strange thing is, when i start the app i delete the previous file, and still the process is running in the background, cause my transcoding performances are halved. The file is copied from assets to the internal storage every time the app is started.

     File ffmpegFile = new File(FileUtils.getFFmpeg(context));
     if (ffmpegFile.exists()) {
           Log.d("File exists!");
           ffmpegFile.delete();
     }

    The file is deleted i checked, but my CPU is still used a lot.
    Sorry for any mistakes during the post, it is my first one.