
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (50)
-
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (6890)
-
Anomalie #3332 : Message d’erreur erroné : le nombre d’erreur n’est pas le bon
4 novembre 2014, par Valéry -Pour info il s’est avéré qu’il y avait bien deux erreurs : le login / pass ne correspondaient pas à ce qui étaient en base.
-
Android Exoplayer garbled mp4 video output on imagereader surface while playing fine on SurfaceView (Samsung galaxy tab s7)
29 mars 2023, par OrcunProblem :


I am trying to play an mp4 video file on Samsung Galaxy Tab S7 for video processing purposes. For the purpose, I use Exoplayer(v2.18.4) library to be able to play the video onto an ImageReader surface so that I can grab the frames in
ImageReader.OnImageAvailableListener
.

I do not have any problems in getting the frames. However, the frames I acquire are garbled/corrupted like :




When I saw this frame, it made me think that it is some sort of color format or codec issue for the mp4 file or device I use. In logcat, there are no errors reported.
Device uses
[OMX.qcom.video.decoder.avc]
decoder. Also, same video plays nicely on some other devices that use exactly the same decoder.

What I tried so far :


I tried a lot of things to understand the root cause and also find a solution, so my brain currently is free flowing stream. I will try to summarise, please bear with me.


I use a
CustomMediaCodecVideoRenderer
in my app which overridesMediaCodecVideoRenderer.getMediaFormat
of Exoplayer to set color format like :

setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible)



This step proved itself necessary. Without it I get a crash simply because I cannot access the image planes of an image frame in expected YUV image format.
This unfortunately was not enough for the Samsung Galaxy Tab 7 although it was already enough for another device like Xiaomi to render the image correctly.


Then I decided to use a library like
ffmpeg
to modify the mp4 file itself to maybe use a different profile, color format, resolution that is widely compatible in android devices. No luck so far.
a quickffprobe
on my mp4 file shows :

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'outputyuv169.mp4':
Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.16.100
Duration: 00:03:00.02, start: 0.000000, bitrate: 4823 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 
1280x720 [SAR 1:1 DAR 16:9], 4820 kb/s, 30 fps, 30 tbr, 360k tbn (default)



I tried even recording a simple video on the tablet itself and using that as my input file. Nevertheless, still getting similarly garbled frames.


One thing I keep noticing in logcat is this line :


[OMX.qcom.video.decoder.avc] using color format 0x7fa30c04 in place of 0x7f420888


and


[OMX.qcom.video.decoder.avc] Requested output format 0x7f420888 and got 0x7fa30c04


where
0x7fa30c04
refers toYCbCr_420_SP_VENUS_UBWC
. Not really sure If this has anything to do with it. I did not dive too deep into that because same log is present also on other device that renders the mp4 correctly.

I would be grateful for any clue.


-
Evolution #4427 (En cours) : Permettre (via une constante) de passer de 65 536 à 4096 le nombre ma...
24 janvier 2020, par - EquipementBonjour,
Concernant le cache de second niveau de SPIP, c’est-à-dire celui qui contient le résultat du calcul des squelettes :Jusqu’à la branche 3.0 de SPIP la taille maximum du cache était par défaut de 10 Mo.
A partir de la branche 3.1 de SPIP, le nombre maximal de fichier dans le cache est de 65 536 (et il n’y a plus de limite sur la taille du cache).
Sur un cas réel, le cache a atteint 2 Go (soit une moyenne de 31 Ko par fichier).
Certains hébergeurs ont un quota sur la taille, mais également sur le nombre d’inodes.
Dans un cas réel, des sites ont ainsi atteint le quota d’inodes, ce qui empêchait l’accès à l’espace privé des sites (cf. contrib.spip.net/Plugins-Giseh#comment502510).Remarque : L’expérience montre que le passage d’un robot, qui n’est pas identifié par SPIP, peut suffit à garnir le cache. Or la liste des robots détectés par SPIP ne sera jamais exhaustive. Par ailleurs, pour certains robots (aspirateurs de sites ou autre) il est possible de modifier leur user-agent.
Aussi, je propose que, via l’ajout d’une constante dans le fichier mes_options, il soit possible de fixer le nombre maximal de fichier dans le cache à 4096 (au lieu de 65 536). Cette approche, par constante optionnelle, évite d’impacter les sites qui veulent conserver la limite de 65 536 fichiers.
En pratique, il s’agit d’offrir la possibilité de mettre dans le fichier mes_options la constante suivante :
- <span class="CodeRay"><span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_CACHE_MAX_4096_FILES</span><span class="delimiter">'</span></span>,<span class="predefined-constant">true</span>) ;
- </span>
et de prendre en compte cette constante dans le fichier ecrire/public/cacher.php de la manière suivante :
- <span class="CodeRay"><span class="keyword">function</span> <span class="function">ecrire_cache</span>(<span class="local-variable">$nom_cache</span>, <span class="local-variable">$valeur</span>) {
- <span class="comment">// $d = substr($nom_cache, 0, 2);</span>
- <span class="comment">// $u = substr($nom_cache, 2, 2);</span>
- <span class="local-variable">$longueur_d</span> = <span class="integer">2</span>;
- <span class="keyword">if</span> (<span class="predefined">defined</span>(<span class="string"><span class="delimiter">'</span><span class="content">_CACHE_MAX_4096_FILES</span><span class="delimiter">'</span></span>) <span class="keyword">AND</span> _CACHE_MAX_4096_FILES){
- <span class="local-variable">$longueur_d</span> = <span class="integer">1</span>;
- }
- <span class="local-variable">$d</span> = <span class="predefined">substr</span>(<span class="local-variable">$nom_cache</span>, <span class="integer">0</span>, <span class="local-variable">$longueur_d</span>);
- <span class="local-variable">$u</span> = <span class="predefined">substr</span>(<span class="local-variable">$nom_cache</span>, <span class="local-variable">$longueur_d</span>, <span class="integer">2</span>);
- <span class="local-variable">$rep</span> = _DIR_CACHE;
- <span class="local-variable">$rep</span> = sous_repertoire(<span class="local-variable">$rep</span>, <span class="string"><span class="delimiter">'</span><span class="delimiter">'</span></span>, <span class="predefined-constant">false</span>, <span class="predefined-constant">true</span>);
- <span class="local-variable">$rep</span> = sous_repertoire(<span class="local-variable">$rep</span>, <span class="local-variable">$d</span>, <span class="predefined-constant">false</span>, <span class="predefined-constant">true</span>);
- <span class="keyword">return</span> ecrire_fichier(<span class="local-variable">$rep</span> . <span class="local-variable">$u</span> . <span class="string"><span class="delimiter">"</span><span class="content">.cache</span><span class="delimiter">"</span></span>, <span class="predefined">serialize</span>(<span class="predefined">array</span>(<span class="string"><span class="delimiter">"</span><span class="content">nom_cache</span><span class="delimiter">"</span></span> => <span class="local-variable">$nom_cache</span>, <span class="string"><span class="delimiter">"</span><span class="content">valeur</span><span class="delimiter">"</span></span> => <span class="local-variable">$valeur</span>)));
- }
- <span class="keyword">function</span> <span class="function">lire_cache</span>(<span class="local-variable">$nom_cache</span>) {
- <span class="comment">// $d = substr($nom_cache, 0, 2);</span>
- <span class="comment">// $u = substr($nom_cache, 2, 2);</span>
- <span class="local-variable">$longueur_d</span> = <span class="integer">2</span>;
- <span class="keyword">if</span> (<span class="predefined">defined</span>(<span class="string"><span class="delimiter">'</span><span class="content">_CACHE_MAX_4096_FILES</span><span class="delimiter">'</span></span>) <span class="keyword">AND</span> _CACHE_MAX_4096_FILES){
- <span class="local-variable">$longueur_d</span> = <span class="integer">1</span>;
- }
- <span class="local-variable">$d</span> = <span class="predefined">substr</span>(<span class="local-variable">$nom_cache</span>, <span class="integer">0</span>, <span class="local-variable">$longueur_d</span>);
- <span class="local-variable">$u</span> = <span class="predefined">substr</span>(<span class="local-variable">$nom_cache</span>, <span class="local-variable">$longueur_d</span>, <span class="integer">2</span>);
- <span class="keyword">if</span> (<span class="predefined">file_exists</span>(<span class="local-variable">$f</span> = _DIR_CACHE . <span class="string"><span class="delimiter">"</span><span class="local-variable">$d</span><span class="content">/</span><span class="local-variable">$u</span><span class="content">.cache</span><span class="delimiter">"</span></span>)
- <span class="keyword">and</span> lire_fichier(<span class="local-variable">$f</span>, <span class="local-variable">$tmp</span>)
- <span class="keyword">and</span> <span class="local-variable">$tmp</span> = <span class="predefined">unserialize</span>(<span class="local-variable">$tmp</span>)
- <span class="keyword">and</span> <span class="local-variable">$tmp</span>[<span class="string"><span class="delimiter">'</span><span class="content">nom_cache</span><span class="delimiter">'</span></span>] == <span class="local-variable">$nom_cache</span>
- <span class="keyword">and</span> <span class="predefined">isset</span>(<span class="local-variable">$tmp</span>[<span class="string"><span class="delimiter">'</span><span class="content">valeur</span><span class="delimiter">'</span></span>])
- ) {
- <span class="keyword">return</span> <span class="local-variable">$tmp</span>[<span class="string"><span class="delimiter">'</span><span class="content">valeur</span><span class="delimiter">'</span></span>];
- }
- <span class="keyword">return</span> <span class="predefined-constant">false</span>;
- }
- </span>
Cordialement
Equipement