
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (63)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (12178)
-
Evolution #4742 (Nouveau) : sous_repertoire() devrait savoir faire en cascade
20 avril 2021, par RastaPopoulos ♥au lieu de 1 par 1, et donc être obligé de l’appeler 5 fois si ya 5 sous répertoires, cette fonction devrait savoir faire en cascade : sous_repertoire(’machin/bidule/chouette/truc/final’)
-
JavaFXFrameConverter consuming insane amounts of memory
17 juillet 2023, par iexavThe 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) {
 int fss = this.frame.imageStride;
 if (this.frame.imageChannels != 3) {
 throw new UnsupportedOperationException("We only support frames with imageChannels = 3 (BGR)");
 } else if (!(buffer instanceof ByteBuffer)) {
 throw new UnsupportedOperationException("We only support bytebuffers at the moment");
 } else {
 ByteBuffer bb = (ByteBuffer)buffer;
 ByteBuffer b = (ByteBuffer)this.frame.image[0];

 for(int i = y; i < y + h; ++i) {
 for(int j = x; j < x + w; ++j) {
 int base = 3 * j;
 bb.put(b.get(fss * i + base));
 bb.put(b.get(fss * i + base + 1));
 bb.put(b.get(fss * i + base + 2));
 bb.put((byte)-1);
 }
 }

 }
 }
</t></t>


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.


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.


-
naming dual audio tracks with ffmpeg
22 octobre 2012, par AzevedoI'm using ffmpeg to combine 1 video + 2 audio tracks into a mp4 container.
How do I set the name of each track ? (so in the player it won't be '0' and '1')
ffmpeg -i file1.avi -i extra-audio.mp4 -c copy -map 0:0 -map 0:1 -map 1:0 final.mp4
thanks !