
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (43)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)
Sur d’autres sites (4766)
-
Evolution #4170 : Visibilité icônes des auteurs
24 août 2018, par erational 鬼Voici un 1er essai :
- ligne 1 : l’existant les auteurs 32
- ligne 2 : la proposition pour des couleurs plus lisibles un peu à la mode "flat design"
-
avfilter/vf_scale : set correct AVFrame SAR if reset_sar=1
16 juin, par Niklas Haasavfilter/vf_scale : set correct AVFrame SAR if reset_sar=1
This otherwise generates an inconsistency between the frame state and the
link state, since the link state is set to 1:1 explicitly when `reset_sar`
is enabled, but this line of code unconditionally overwrote the output
frame SAR with the value that would be computed in the absence of `reset_sar`.cf. vf_scale_cuda, which does this correctly
-
How to properly pass an asset FileDescriptor to FFmpeg using JNI in Android
6 janvier 2021, par William SeemannI'm trying to retrieve metadata in Android using FFmpeg, JNI and a Java FileDescriptor and it isn't' working. I know FFmpeg supports the pipe protocol so I'm trying to emmulate : "
cat test.mp3 | ffmpeg i pipe:0
" programmatically. I use the following code to get a FileDescriptor from an asset bundled with the Android application :


FileDescriptor fd = getContext().getAssets().openFd("test.mp3").getFileDescriptor();
setDataSource(fd, 0, 0x7ffffffffffffffL); // native function, shown below




Then, in my native (In C++) code I get the FileDescriptor by calling :



static void wseemann_media_FFmpegMediaMetadataRetriever_setDataSource(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
{
 //...

 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); // function contents show below

 //...
}

// function contents
static int jniGetFDFromFileDescriptor(JNIEnv * env, jobject fileDescriptor) {
 jint fd = -1;
 jclass fdClass = env->FindClass("java/io/FileDescriptor");

 if (fdClass != NULL) {
 jfieldID fdClassDescriptorFieldID = env->GetFieldID(fdClass, "descriptor", "I");
 if (fdClassDescriptorFieldID != NULL && fileDescriptor != NULL) {
 fd = env->GetIntField(fileDescriptor, fdClassDescriptorFieldID);
 }
 }

 return fd;
}




I then pass the file descriptor pipe # (In C) to FFmpeg :



char path[256] = "";

FILE *file = fdopen(fd, "rb");

if (file && (fseek(file, offset, SEEK_SET) == 0)) {
 char str[20];
 sprintf(str, "pipe:%d", fd);
 strcat(path, str);
}

State *state = av_mallocz(sizeof(State));
state->pFormatCtx = NULL;

if (avformat_open_input(&state->pFormatCtx, path, NULL, &options) != 0) { // Note: path is in the format "pipe:<the fd="fd">"
 printf("Metadata could not be retrieved\n");
 *ps = NULL;
 return FAILURE;
}

if (avformat_find_stream_info(state->pFormatCtx, NULL) < 0) {
 printf("Metadata could not be retrieved\n");
 avformat_close_input(&state->pFormatCtx);
 *ps = NULL;
 return FAILURE;
}

// Find the first audio and video stream
for (i = 0; i < state->pFormatCtx->nb_streams; i++) {
 if (state->pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO && video_index < 0) {
 video_index = i;
 }

 if (state->pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO && audio_index < 0) {
 audio_index = i;
 }

 set_codec(state->pFormatCtx, i);
}

if (audio_index >= 0) {
 stream_component_open(state, audio_index);
}

if (video_index >= 0) {
 stream_component_open(state, video_index);
}

printf("Found metadata\n");
AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(state->pFormatCtx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
 printf("Key %s: \n", tag->key);
 printf("Value %s: \n", tag->value);
}

*ps = state;
return SUCCESS;
</the>



My issue is
avformat_open_input
doesn't fail but it also doesn't let me retrieve any metadata or frames, The same code works if I use a regular file URI (e.g file ://sdcard/test.mp3) as the path. What am I doing wrong ? Thanks in advance.


Note : if you would like to look at all of the code I'm trying to solve the issue in order to provide this functionality for my library : FFmpegMediaMetadataRetriever.