
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
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 (73)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (8680)
-
libav sws_scale() fails colorspace conversion on real device, works on emulator
26 août 2020, par chugadieI'm making a movie player with libav. I have decoding video packets working, I have play in reverse working, I have seeking working. All this works no an x86 android emulator, but fails to work on a real android phone (arm64-v8a)


The failure is in
sws_scale()
- it returns 0. The video frames continue to be decoded properly with no errors.

There are no errors, warnings, alerts from libav. I have connected an
avlog_callback


void log_callback(void *ptr, int level, const char *fmt, va_list vargs) {
 if (level<= AV_LOG_WARNING)
 __android_log_print( level, LOG_TAG, fmt, vargs);
}
uint64_t openMovie( char* path, int rotate, float javaDuration )
{
 av_log_set_level(AV_LOG_WARNING);
 av_log_set_callback(log_callback);



The code to do the
sws_scale()
is :

int JVM_getBitmapBuffer( JNIEnv* env, jobject thiz, jlong av, jobject bufferAsInt, jbyte transparent ) { 
 avblock *block = (avblock *) av;
 if (!block) {
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " avblock is null");
 return AVERROR(EINVAL);
 }
 if (!block->pCodecCtx) {
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " codecctx is null");
 return AVERROR(EINVAL);
 }

 int width = block->pCodecCtx->width;
 int height = block->pCodecCtx->height;

 if (NULL == block->sws) {
 __android_log_print( ANDROID_LOG_ERROR, LOG_TAG, "getBitmapBuffer:\n *** invalid sws context ***" );
 }

 int scaleRet = sws_scale( block->sws,
 block->pFrame->data,
 block->pFrame->linesize,
 0,
 height,
 block->pFrameRGB->data,
 block->pFrameRGB->linesize
 );
 if (scaleRet == 0 ) {
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " scale failed");
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " pframe linesize %d", block->pFrame->linesize[0]); 
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " pframergb linesize %d", block->pFrameRGB->linesize[0]); 
 __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, " height %d",
 height);
 return AVERROR(EINVAL);
 }



Setting up the codex and avframes :


//i have tried every combination of 1, 8, 16, and 32 for these values
int alignRGB = 32;
int align = 16; 
int width = block->pCodecCtx->width;
int height = block->pCodecCtx->height;
block->pFrame = av_frame_alloc();
block->pFrameRGB = av_frame_alloc();

block->pFrameRGBBuffer = av_malloc(
 (size_t)av_image_get_buffer_size(AV_PIX_FMT_RGB32, width, height, alignRGB) 
);

av_image_fill_arrays(
 block->pFrameRGB->data,
 block->pFrameRGB->linesize,
 block->pFrameRGBBuffer,
 AV_PIX_FMT_RGB32,
 width,
 height,
 alignRGB
);

block->pFrameBuffer = av_malloc(
 (size_t) av_image_get_buffer_size(block->pCodecCtx->pix_fmt,
 width, height, align
 )
);
av_image_fill_arrays(
 block->pFrame->data,
 block->pFrame->linesize,
 block->pFrameBuffer,
 block->pCodecCtx->pix_fmt,
 width, height,
 align
);
block->sws = sws_getContext(
 width, height,
 AV_PIX_FMT_YUV420P,
 width, height,
 AV_PIX_FMT_RGB32,
 SWS_BILINEAR, NULL, NULL, 0
);



Wildcards are that :


- 

- I'm using React-Native
- My emulator is x86 android api 28
- My real-device is arm64-v8a AOSP (around api 28, don't remember exactly(








Other notes :


- 

- libav .so files are compiled from mobile-ffmpeg project.
- I can also sws_scale also works on x86_64 linux using SDL to project YV12
- Test video is here : https://github.com/markkimsal/video-thumbnailer/tree/master/fixtures
block
is a simple C struct with pointers to relevant AV memory structures.- Using FFMPEG 4.3.2












I'm pretty certain it has something to do with the pixel alignment. But documentation is practically non-existent on this topic. It could also be the difference between pixel formats RGBA and RGB32, or possibly little-endian vs big-endian.


-
IP-Cam / CCTV-Cam Live Streaming on iPhone/iPad
19 mai 2013, par user1744691I want to get stream of an ip-cam on my iPhone/iPad and want to display it on screen. By R&D i found that ffmpeg is the only way to achieve it but i found nothing on ffmpeg. Is there any other way to achieve it or a confirmed way to get compiled ffmpeg on mac please mention that. Material regarding how to use ffmepg or source code example will be highly appreciated.
Is there nothing built-in framework to achieve it if not then please mention if there is any free framework/sdk to achieve this functionality.
Thanks
-
Using FFMPEG for crossplatform hardware decoding of MPEG streams
5 février 2019, par KamilleThe application I am working on is targeted for the Windows (10) platform as well as the Linux (Ubuntu 18.04) platform.
We need support for hardware encoding/decoding of H264 and HEVC.My question is :
Should I use the available SDK’s for the graphics card (in our case NVIDIA) or
can I somehow use the FFMPEG SDK to do the job ? And in the latter case is there
some guidline or example material available ?I expect using the graphics card SDK to be much more work but on the other hand I couldn’t find any usable examples for the FFMPEG option ?