
Recherche avancée
Autres articles (51)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (6408)
-
WebRTC Detect Orientation from Peer Video Stream
30 mars 2018, par DarylUsing RecordRTC and WebRTC I am able to save a Peer MediaStream as a webm/video file. The orientation of the file differs based on the peer device. Meaning a 640x480 video is rotated clockwise or counter clockwise.
To re-orient the recorded video, some of the videos need to be rotated "clockwise" and others need to be rotated "counter clockwise". I need a way to determine which direction to rotate the video. Otherwise, some videos will be right side up and others upside down.
I attempted to look up the orientation, using ffprobe. However, the videos created do not have the "rotate" tag in the metadata.
I have also been unable to find the orientation in the Peer video stream of the WebRTC object.
I really thought that since the Video Element has the WebRTC Peer Stream displayed correctly in it, that I should be able to get the orientation from it.
-
Image to MPEG on Linux works, same code on Android = green video
5 avril 2018, par JScoobyCedEDIT
I have check the execution and found that the error is not (yet) at the swscale point. My current issue is that the JPG image is not found :
No such file or directory
when doing theavformat_open_input(&pFormatCtx, imageFileName, NULL, NULL);
Before you tell me I need to register anything, I can tell I already did (I updated the code below).
I also added the Android permission to access the external storage (I don’t think it is related to Android since I can already write to the /mnt/sdcard/ where the image is also located)
END EDITI have been through several tutorials (including the few posted from SO, i.e. http://dranger.com/ffmpeg/, how to compile ffmpeg for Android...,been through dolphin-player source code). Here is what I have :
. Compiled ffmpeg for android
. Ran basic tutorials using NDK to create a dummy video on my android device
. been able to generate a MPEG2 video from images on Ubuntu using a modified version of dummy video code above and a lot of Googling
. running the new code on Android device gives a green screen video (duration 1 sec whatever the number of frames I encode)I saw another post about iPhone in a similar situation that mentioned the ARM processor optimization could be the culprit. I tried a few ldextra-flags (-arch armv7-a and similar) to no success.
I include at the end the code that loads the image. Is there something different to do on Android than on linux ? Is my ffmpeg build not correct for Android video encoding ?
void copyFrame(AVCodecContext *destContext, AVFrame* dest,
AVCodecContext *srcContext, AVFrame* source) {
struct SwsContext *swsContext;
swsContext = sws_getContext(srcContext->width, srcContext->height, srcContext->pix_fmt,
destContext->width, destContext->height, destContext->pix_fmt,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
sws_scale(swsContext, source->data, source->linesize, 0, srcContext->height, dest->data, dest->linesize);
sws_freeContext(swsContext);
}
int loadFromFile(const char* imageFileName, AVFrame* realPicture, AVCodecContext* videoContext) {
AVFormatContext *pFormatCtx = NULL;
avcodec_register_all();
av_register_all();
int ret = avformat_open_input(&pFormatCtx, imageFileName, NULL, NULL);
if (ret != 0) {
// ERROR hapening here
// Can't open image file. Use strerror(AVERROR(ret))) for details
return ERR_CANNOT_OPEN_IMAGE;
}
AVCodecContext *pCodecCtx;
pCodecCtx = pFormatCtx->streams[0]->codec;
pCodecCtx->width = W_VIDEO;
pCodecCtx->height = H_VIDEO;
pCodecCtx->pix_fmt = PIX_FMT_YUV420P;
// Find the decoder for the video stream
AVCodec *pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
if (!pCodec) {
// Codec not found
return ERR_CODEC_NOT_FOUND;
}
// Open codec
if (avcodec_open(pCodecCtx, pCodec) < 0) {
// Could not open codec
return ERR_CANNOT_OPEN_CODEC;
}
//
AVFrame *pFrame;
pFrame = avcodec_alloc_frame();
if (!pFrame) {
// Can't allocate memory for AVFrame
return ERR_CANNOT_ALLOC_MEM;
}
int frameFinished;
int numBytes;
// Determine required buffer size and allocate buffer
numBytes = avpicture_get_size(PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
uint8_t *buffer = (uint8_t *) av_malloc(numBytes * sizeof (uint8_t));
avpicture_fill((AVPicture *) pFrame, buffer, PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
AVPacket packet;
int res = 0;
while (av_read_frame(pFormatCtx, &packet) >= 0) {
if (packet.stream_index != 0)
continue;
ret = avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
if (ret > 0) {
// now, load the useful info into realPicture
copyFrame(videoContext, realPicture, pCodecCtx, pFrame);
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
return 0;
} else {
// Error decoding frame. Use strerror(AVERROR(ret))) for details
res = ERR_DECODE_FRAME;
}
}
av_free(pFrame);
// close codec
avcodec_close(pCodecCtx);
// Close the image file
av_close_input_file(pFormatCtx);
return res;
}Some ./configure options :
--extra-cflags="-O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -mfloat-abi=softfp -mfpu=vfp -marm -march=armv7-a -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
--arch=armv7-a --enable-armv5te --enable-armv6 --enable-armvfp --enable-memalign-hack
-
Anomalie #4128 : Bug de génération de boucle avec les modèles Spip
11 avril 2018, par Julien PORIAUSalut,
parfois le jeu de caractère "binaire" est visible uniquement dans le
code source (ligne 1233). Mais on observe tout de même un soucis dans la
mise en page.view-source:http://spip-dev.nidecker.com/probleme-de-langue.html?lang=ca
Julien.
Le 11.04.2018 à 14:28, redmine@spip.org a écrit :
La demande #4128 a été mise à jour par b b.
- Statut changé de /Nouveau/ à /En cours/
- Priorité changé de /Haut/ à /Bas/
Salut, peux-tu fournir le code du modèle en question ?
De mon côté, je n’ai aucun problème sur la page que tu cites en exemple...
Anomalie #4128 : Bug de génération de boucle avec les modèles Spip
<https://core.spip.net/issues/4128#change-13824>- Auteur : Julien PORIAU
- Statut : En cours
- Priorité : Bas
- Assigné à :
- Catégorie : code généré
- Version cible : 3.2
- Resolution :
- Navigateur : Firefox
Dans les modèles personnalisés Spip, les images (boucle documents ou
logos) sont mal générées et provoque un bug d’encodage visible dans le
front-end lors du passage dans une autre langue (balises multi).
Nous n’avons pas trouvé où était le souci dans Spip, mais les
caractères qui remontent dans le code source, ressemblent aux octets
qui composent le fichier binaire d’une image.
Voir en live ici :
http://spip-dev.nidecker.com/probleme-de-langue.html?lang=ca.Pour essayer d’isoler cette anomalie, nous avons procédé de la sorte
avec l’aide de mon développeur :1. Nous sommes reparti d’un SPIP 3.1.7 entièrement neuf (minimal),
avec deux modèles Spip, rien d’autre.
Le bug se reproduit, ce qui exclus un problème lié aux squelettes ou
autres plugins.Nous n’avons pas réussi a déterminer précisément ce qui génère ce bug,
à part que c’est dans un contexte où on appelle une langue pas définie
dans le multi.
En fonction du contenu de l’article, du nombre de modèles dans
l’article, en fonction des boucles dans les inclure, le bug n’arrive
pas au même endroit...Le problème vient de la génération des logos ou documents : si on
supprime les balises |#LOGO_*| ou si on renomme |IMG| en |IMG_|, plus
d’erreur.
Même sans traitements, avec juste |[(#LOGO_*)]|, rien à faire.2. Nous avons pensé que c’était peut être une image au mauvais format :
On a alors tenté de passer |ImageOptim| sur tout le répertoire |/IMG|,
redimensionné tous les logos en vignettes png de 320x240, rien à faire...3. On a fini par passer ce site de test en 3.2, pas mieux.
4. Nous avons épluché les caches générés dans |/tmp/cache| et
|/tmp/cache/skel|, tout paraît normal de ce côté là..5. On a ensuite un peu avancé en enlevant dans |mes_options.php| la
variable |$GLOBALS[’forcer_lang’] = true|".
Sur la version minimal, plus de bug. Mais sur le site de production,
le problème réside toujours.
Mais en faisant des tests avec et sans (et en supprimant bien
|/tmp/cache/| à chaque fois), ça se confirme pour la version minimal.6. A partir d’une copie de la version production, nous avons désactivé
tout les plugins, passer |ImageOptim| sur |/IMG| et rien a faire..
Impossible de déterminé d’où vient le problème :(7. Nous avons essayé d’écrire comme ceci : |[
src="(#LOGO_MOT|image_reduire50,*|extraire_attributsrc)" alt="">]|
Cela fonctionne sur la version minimal mais pas sur la version production.8. Dans la version minimal, j’ai encore récemment testé une dernière
chose. J’ai supprimé les documents non sollicités sur ma page de teste
(spip.php ?article1441&lang=ca).
Avec la requête SQL suivante : |DELETE FROM jones_documents WHERE
id_document NOT IN
(1948,1949,2534,2535,630,631,1783,1784,1785,1786,1787,1788,1781,1782)|
Le bug n’apparait plus..Je sèche..
Vous trouverez ici en téléchargement une archive de la version minimal
(Spip 3.1.7) :
https://www.dropbox.com/s/dek0zg7jafl8uxe/jones.zip?dl=0] ( 20mo)
Pour reproduire le bug, il suffit de passer la variable "&lang=ca"
dans l’article 1441 (localhost/spip.php ?article1441&lang=ca).Je donne volontiers un accès à la version production si besoin.
Vous recevez ce mail car vous êtes impliqués sur ce projet.
Pour changer les préférences d’envoi de mail, allez sur
http://core.spip.org/my/account---
L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus