
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (76)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5460)
-
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.


-
avformat/mov : avss box should be AV_CODEC_ID_CAVS
7 juillet 2023, par Zhao Zhiliavformat/mov : avss box should be AV_CODEC_ID_CAVS
I cannot find the spec, but according to the original commit
d4fdba0df71, it's CAVS. e571305a714 changed it to AVS by
accident. Ten years on, nothing happened. We still have the
sample [1], however, since there is no cavs_mp4tofoobar bsf, the
cavs decoder doesn't work. I don't know if there is any use case.[1] https://samples.ffmpeg.org/AVS/AVSFileFormat/AVSFileFormat.mp4
Signed-off-by : Zhao Zhili <zhilizhao@tencent.com>
-
Bash script : Cycle script until ffmpeg command restarts successfully
13 août 2023, par BellacodaI have a IP Camera and the recordings are saved with ffmpeg RTSP into a raspberry pi.


Sometimes, when the electricity shuts off and comes back on, the raspberry boots faster than the IP Camera and the ffmpeg command (saved on a crontab to run every reboot) fails to execute because it can't reach the IP Camera (that is still turning on).


I tried to put a sleep command before the command but that doesn't work either.


It also happened that when the IP Camera reboots, the raspberry closes the command, but when the camera comes back online, I have to manually lauch the command.


Is there a way to make a script that waits to run the ffmpeg command until the camera is fully online (I assume with the $ ? variable for command exit status), and to wait to restart the ffmpeg command when the camera reboots ?


The setup I have now is a crontab :
SHELL=/bin/bash
@reboot sleep 120s ; sudo ffmpeg ...