
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (51)
-
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 (10182)
-
Can I know which byte range to read from a remote mp4 file for FFMpeg to decode a keyframe ?
12 octobre 2023, par db9117I need to decode a of keyframe of a video file (mp4, h264 encoded). I know the timestamp of the keyframe I want to extract/decode. I want to minimize amount of data being read in memory. For this, I need to know beforehand exactly the minimal byte range I would require that encompasses this keyframe. How do I know what is the minimal byte range in the whole mp4 byte stream I need to read in order to be able to decode the keyframe ?


I currently find the appropriate keyframe in the
index_entries
contained in the header. I get its byte position (pos
attribute) and timestamp (timestamp
attribute). I calculate the range as follows :

startBytes
: minimum of :

- 

- the
pos
of the keyframe - the
pos
of the nearest index entry in the audio stream happening at or before the keyframe's timestamp.






This way when it's decoding the frame, if it also needs the audio content for demuxing, it would have it.


endBytes
: maximum of :

- 

- the
pos
of the next frame in the video stream's index, after the keyframe - the
pos
of the next frame in the audio stream's index after the timestamp of the wished keyframe.






This way I know that I have everything up until the next frame in the index, which theoretically should be enough to decode the keyframe only.


I then read the appropriate byte range.


When I try to decode the frame, I run in a loop until I succeed :


- 

avcodec_read_frame
avcodec_send_packet
avcodec_receive_frame








I ignore
AVERROR(EAGAIN)
errors.

avcodec_receive_frame
fails multiple times with errorAVERROR(EAGAIN)
which I ignore, until it fails saying that the memory it wants to read isn't available (wants to read afterendBytes
). I explicitly tell it to fail if it wants to read more than it has already read.

Note : for other keyframes at other positions in other videos, it sometimes succeeds (probably because the range is big enough by chance), but it fails more often than not.


My question is : Why is the end of the range not enough to be able to decode only the one keyframe ? Is there any way to more precisely calculate the exact range in bytes I would need in order to decode a particular keyframe ?


- the
-
FFMPEG install on Amazon Cloud9 IDE
27 mai 2021, par Scott TallaridaI am attempting to install FFMPEG on my cloud9 instance. Everything seems to be going peachy until I receive the following :


configure: checking for guile 3.0
configure: found guile 3.0
checking for guile-3.0... no
checking for guile3.0... no
checking for guile-3... no
checking for guile3... no
checking for guile... /home/ubuntu/.linuxbrew/opt/guile@2/bin/guile
configure: error: found development files for Guile 3.0, but 
/home/ubuntu/.linuxbrew/opt/guile@2/bin/guile has effective version 2.2



I am SUPER ubuntu newb but it seems there is some baked-in version conflict that is stopping this process ?


-
The transparent pixels in my Bitmap shown as white
7 mai 2016, par Hassan IbrahemI’m using c code to get
frame
from a gif file and it’s working fine usingffmpeg
libraryav_read_frame
, then I convert the returned image from this formatBGRA to ARGB
format using this methodlibyuv::ABGRToARGB
.In the java part I receive the
bitmap
and when I put it in theImageView
the transparent pixels drawn white.Bitmap bitmap= Bitmap.createBitmap(150, 150, Bitmap.Config.ARGB_8888);
getGifFrame(gifFile,bitmap); //native method which get image frame from gif file.
imageTest.setImageBitmap(backgroundBitmap);//this bitmap in debug mode I can see that it has transparent pixels, but in drawn it appears white!even when I loop on the returned
bitmap pixels
and check for each pixel I find them transparent !for (int x = 0; x < b.getWidth(); x++)
{
for (int y = 0; y < b.getHeight(); y++)
{
int color = b.getPixel(x, y);
if (color == Color.WHITE)//This condition never occurred
{
b.setPixel(x, y, Color.TRANSPARENT);
}
}
}Nothing happened and it’s still white. Then I did convert all transparent pixels to TRANSPARENT !! and guess what, It’s working !
else if (color == Color.TRANSPARENT)
{
b.setPixel(x, y, Color.TRANSPARENT);
}I don’t understand why that happen. Any help would be appreciated.
EDIT 1 :
I get all pixels from the bitmap and set them again without doing anything and it worked also !?bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
bitmap.setPixels(pixels, 0, width, 0, 0, width,height);