
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (75)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (13930)
-
h264 ffmpeg : How to initialize ffmpeg to decode NALs created with x264
19 février 2024, par Raul CalvoI encoded some frames using x264, using
x264_encoder_encode()
and after that I createdAVPackets
using a function like this :

bool PacketizeNals( uint8_t* a_pNalBuffer, int a_nNalBufferSize, AVPacket* a_pPacket )
{
 if ( !a_pPacket )
return false;
 a_pPacket->data = a_pNalBuffer;
 a_pPacket->size = a_nNalBufferSize;
 a_pPacket->stream_index = 0;
 a_pPacket->flags = AV_PKT_FLAG_KEY;

 a_pPacket->pts = int64_t(0x8000000000000000);
 a_pPacket->dts = int64_t(0x8000000000000000);
}



I call this function like this :


x264_nal_t* nals;
int num_nals = encode_frame(pic, &nals);
for (int i = 0; i < num_nals; i++)
{
 AVPacket* pPacket = ( AVPacket* )av_malloc( sizeof( AVPacket ) );
 av_init_packet( pPacket );
 if ( PacketizeNals( nals[i].p_payload, nals[i].i_payload, pPacket ) )
 {
 packets.push_back( pPacket );
 }
}



Now what I want to do is to decode these
AVPackets
usingavcodec_decode_video2
. I think the problem is that I haven't properly initialized the decoder because to encode I used "ultrafast" profile and "zerolatency" tune (x264) and to decode I don't know how to specify these options to ffmpeg.

In some examples I have read people initialize the decoder using the file where the video is stored, but in this case I have the
AVPackets
directly.

What I'm doing to try to decode is :


avcodec_init(); 
avcodec_register_all(); 
AVCodec* pCodec; 
pCodec=avcodec_find_decoder(CODEC_ID_H264); 
AVCodecContext* pCodecContext; 
pCodecContext=avcodec_alloc_context(); 
avcodec_open(pCodecContext,pCodec); 
pCodecContext->width = 320;
pCodecContext->height = 200;
pCodecContext->extradata = NULL;
unsigned int nNumPackets = packets.size();
int frameFinished = 0;
for ( auto it = packets.begin(); it != packets.end(); it++ )
{
 AVFrame* pFrame;
 pFrame = avcodec_alloc_frame();
 AVPacket* pPacket = *it;
 int iReturn = avcodec_decode_video2( pCodecContext, pFrame, &frameFinished, pPacket );
}



But
iReturn
is always -1.

Can anyone help me ? Sorry if my knowledge in this area is low, I'm new.


-
Having ffmpeg add a repeating text overlay on a video
30 mai 2020, par Caius JardI'm looking to create an overlay that cycles through the characters in a string over and over. I've succeeded in using a sendcmd file to put A, B, C, D, E on the first 5 seconds of a video



0 drawtext reinit 'text=A';
1 drawtext reinit 'text=B';
2 drawtext reinit 'text=C';
3 drawtext reinit 'text=D';
4 drawtext reinit 'text=E';




But it doesn't cycle and I haven't been able to find a way to make it, because sendcmd looks like it just takes a simple timecode. I could make a command file 3600 lines long for my hour video, with those commands in over and over (the command file would be generated programmatically so not onerous)





After some considerable experimenting I was able to do it with 5 separate drawtext :



drawtext=fontfile=/Windows/Fonts/bauhs93.ttf:fontsize=1024:fontcolor=white@0.1:bordercolor=black@0.1:borderw=10:r=250:text='A':x=if(trunc(mod(t\,5))\,-2000\,(w-tw)/2),
drawtext=fontfile=/Windows/Fonts/bauhs93.ttf:fontsize=1024:fontcolor=white@0.1:bordercolor=black@0.1:borderw=10:r=250:text='B':x=if(trunc(mod(t\,5))-1\,-2000\,(w-tw)/2),
drawtext=fontfile=/Windows/Fonts/bauhs93.ttf:fontsize=1024:fontcolor=white@0.1:bordercolor=black@0.1:borderw=10:r=250:text='C':x=if(trunc(mod(t\,5))-2\,-2000\,(w-tw)/2),
drawtext=fontfile=/Windows/Fonts/bauhs93.ttf:fontsize=1024:fontcolor=white@0.1:bordercolor=black@0.1:borderw=10:r=250:text='D':x=if(trunc(mod(t\,5))-3\,-2000\,(w-tw)/2),
drawtext=fontfile=/Windows/Fonts/bauhs93.ttf:fontsize=1024:fontcolor=white@0.1:bordercolor=black@0.1:borderw=10:r=250:text='E':x=if(trunc(mod(t\,5))-4\,-2000\,(w-tw)/2)




But as can be seen, I have to repeat a lot of stuff here. Is there any slicker way ? It does seem to have a noticeable effect on encoding speed the more chars are added



I was hoping that text expressions would help but it seems I can only return numerics from the values, so this expression didn't work out :



%{e:if(trunc(mod(t,5)),'A', '')%{e:if(trunc(mod(t,5))-1,'B', '') ...



-
How do I play back video on Android with custom playback speed ?
13 novembre 2015, par guidowI want to play back a video in Android, rendering it to a SurfaceTexture or something else that is usable as an OpenGL ES texture, but I need very precise control over the playback speed of the video to synchronize it to a stream of external events. These events will happen at a roughly predictable speed, but the exact speed will depend on many small mechanical details, influenced by many small factors, including the weather (and possibly even the phase of the moon...).
The
android.media.MediaPlayer
class provided by android allows rendering to a SurfaceTexture (and the 360Videos app from the Oculus Mobile SDK successfully uses that feature), but unfortunately does not seem to allow altering the playback speed, at least not as far as I could tell from the documentation here.I have tried pausing and resuming the playback using pause() and start() respectively, to influence the playback speed, but that leads to extremely choppy and slow playback. My idea here was to make the video have a higher framerate than would ever be needed, and to then manually retard every frame until it actually needs to be shown. From the messages in the log, it looks to me like the MediaPlayer class will release various needed resources on pause and rerequest them on resume, which obviously kills performance if you do that once per frame.
Another option I am looking at is ffmpeg. This one seems like it will do what i want, it doesn’t do any timings itself, it just decodes frames whenever I tell it to to a buffer, leaving me to use it however I want, whenever I want. The obvious drawback is that ffmpeg, at least on android, doesn’t do hardware decoding and probably won’t be able to decode 4K media in realtime.
Yet another thing I was looking at was OpenMAX AL. Unfortunately, OpenMax AL is pretty hard to get into. I haven’t found any good beginner’s documentation yet, only some old, maybe outdated, READMEs as well as the interface specification from Khronos. The latter is a very long and cumbersome read, though, and I couldn’t yet even figure out if OpenMAX AL will even allow me to do my own timings...