Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (86)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

Sur d’autres sites (14948)

  • JavaFXFrameConverter consuming insane amounts of memory

    17 juillet 2023, par iexav

    The JavaFXFrameConverter (from the wrapper of the ffmpeg C library in java) convert() method is consuming an outrageous amount of memory. To elaborate a bit more, it does not happen usually. If I just make an instance of the class in my main method, grab a frame via FFMpegFrameGrabber and give it to the convert() method the memory usage is pretty much none. However, when I attempt to do pretty much the exact same in a class I made using an ExecutorService my memory usage jumps up to 8 gigabytes when convert is called. The converter and executor service are declared as member variables of my class. Namely :

    


        final JavaFXFrameConverter converter = new JavaFXFrameConverter();
    private  ExecutorService           videoExecutor;


    


    (the videoExecutor is instantiated in the constructor of the class :

    


    videoExecutor=Executors.newSingleThreadExecutor();


    


    Now, the method I am using for processing of the video frames is this :

    


        private void processVideo(){
        videoExecutor.submit(() -> {
            processingVideo.set(true);
            try{

                while(processingVideo.get() && (videoQueue.peek())!=null){

                    final Frame cloneFrame = videoQueue.poll();
                    final Image image = converter.convert(cloneFrame);
                    final long timeStampDeltaMicros = cloneFrame.timestamp - timer.elapsedMicros();
                    if (timeStampDeltaMicros > 0) {
                        final long delayMillis = timeStampDeltaMicros / 1000L;
                        try {
                            Thread.sleep(delayMillis);
                        } catch (InterruptedException e) {
                            Thread.currentThread().interrupt();
                        }
                    }

                    cloneFrame.close();
                    System.out.println("submitted image");
                videoListener.submitData(image);
                }
            }catch (NullPointerException e){
                NullPointerException ex = new NullPointerException("Error while processing video frames.");
            videoListener.notifyFailure(ex);
            }

            processingVideo.set(false);

        });
    }


    


    I sent the whole method for a bit more context but realistically speaking the only part that is of real significance is the converter.conver(cloneFrame) ; I used the intelliJ profiler and also the debugger and this is exactly where the problem occurs. When convert is called after doing some stuff it eventually ends up in this method :

    


            public <t extends="extends" buffer="buffer"> void getPixels(int x, int y, int w, int h, WritablePixelFormat<t> pixelformat, T buffer, int scanlineStride) {&#xA;            int fss = this.frame.imageStride;&#xA;            if (this.frame.imageChannels != 3) {&#xA;                throw new UnsupportedOperationException("We only support frames with imageChannels = 3 (BGR)");&#xA;            } else if (!(buffer instanceof ByteBuffer)) {&#xA;                throw new UnsupportedOperationException("We only support bytebuffers at the moment");&#xA;            } else {&#xA;                ByteBuffer bb = (ByteBuffer)buffer;&#xA;                ByteBuffer b = (ByteBuffer)this.frame.image[0];&#xA;&#xA;                for(int i = y; i &lt; y &#x2B; h; &#x2B;&#x2B;i) {&#xA;                    for(int j = x; j &lt; x &#x2B; w; &#x2B;&#x2B;j) {&#xA;                        int base = 3 * j;&#xA;                        bb.put(b.get(fss * i &#x2B; base));&#xA;                        bb.put(b.get(fss * i &#x2B; base &#x2B; 1));&#xA;                        bb.put(b.get(fss * i &#x2B; base &#x2B; 2));&#xA;                        bb.put((byte)-1);&#xA;                    }&#xA;                }&#xA;&#xA;            }&#xA;        }&#xA;</t></t>

    &#xA;

    Now, everything up until this point is fine. The memory usage is at around 130mb but alas, when execution enters in these 2 for loops that's where the downright stupid memory usage occurs. Every single one of these bb.put calls is netting me around 3 more megabytes of memory usage. By the end of it you can probably guess what happens. Also all of these memory allocations do happen on the stack so I'm assuming that's why my memory usage stops at around 8-8.5 gigabytes otherwise the program would crash (that has also happened, out of memory exception thrown, but it doesn't usually happen, it kind of just lingers at those 8 gigabytes.) Frankly speaking I'm at a bit of a loss. I haven't seen virtually anyone anywhere mention this ever and I ran out of things to try to fix this so I am making this post.

    &#xA;

    By the way another thing I tried is make the ExecutorService in the same class as the main method and when I submitted there I also didn't have these memory problems.

    &#xA;

  • Does ffmpeg offer an option to prevent the creation of the Info tag in an MP3 file ?

    8 octobre 2019, par Alexis Wilke

    I have various MP3 files which I need to process.

    The processing includes quite a few steps, but one important one is to remove the Info/Xing tag from the file.

    I successfully do so by running lame -t .... However, there are times when I want to run ffmpeg to do a conversion which will happen after the lame -t ... conversion and I see that ffmpeg re-insert an Info/Xing tag in the MP3 file.

    Is there a command line option I can use so ffmpeg does not re-insert the Info/Xing tag ?

  • lavfi/af_adynamicequalizer : convert to query_func2()

    29 août 2024, par Anton Khirnov
    lavfi/af_adynamicequalizer : convert to query_func2()
    

    Drop redundant ff_set_common_all_channel_counts() /
    ff_set_common_all_samplerates() calls, since those happen implicitly in
    generic code.

    • [DH] libavfilter/af_adynamicequalizer.c