
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (78)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (11133)
-
Returns wrong frame while seeking in FFMPEG Player
5 février 2015, par user543I have implemented an audio player which supports all the formats using FFMPEG. But while seeking the audio, the application is getting the wrong frame at that target duration. Here is my code for the seek functionality.
int64_t seekTime = av_rescale_q(seekValue * AV_TIME_BASE,
AV_TIME_BASE_Q,
fmt_ctx->streams[seekStreamIndex]->time_base);
int64_t seekStreamDuration =
fmt_ctx->streams[seekStreamIndex]->duration;
int flags = AVSEEK_FLAG_BACKWARD;
if (seekTime > 0 && seekTime < seekStreamDuration)
flags |= AVSEEK_FLAG_ANY;
int ret = av_seek_frame(fmt_ctx, seekStreamIndex, seek_target,
flags);
if (ret < 0)
ret = av_seek_frame(fmt_ctx, seekStreamIndex, seekTime,
flags);
avcodec_flush_buffers(dec_ctx);It is working fine for most of the songs.
But some of the mp3 songs are getting the wrong timespan.For instance : If the song total duration is 2 minutes, if I play the song without seeking it works fine. But while playing, if we seek the song to some position, this will make the song ends with 2 mins and 10 seconds.
I am getting this issue with only mp3 songs. I am using FFMPEG 2.1. The code for the seek functionality is working fine on FFMPEG 0.11.1.
Please provide any information about this issue.
-
matplotlib ArtistAnimation returns a blank video
28 mars 2017, par MpaullI’m trying to produce an animation of a networkx graph changing over time. I’m using the networkx_draw utilities to create matplotlib figures of the graph, and matplotlib’s ArtistAnimation module to create an animation from the artists networkx produces. I’ve made a minimum reproduction of what I’m doing here :
import numpy as np
import networkx as nx
import matplotlib.animation as animation
import matplotlib.pyplot as plt
# Instantiate the graph model
G = nx.Graph()
G.add_edge(1, 2)
# Keep track of highest node ID
G.maxNode = 2
fig = plt.figure()
nx.draw(G)
ims = []
for timeStep in xrange(10):
G.add_edge(G.maxNode,G.maxNode+1)
G.maxNode += 1
pos = nx.drawing.spring_layout(G)
nodes = nx.drawing.draw_networkx_nodes(G, pos)
lines = nx.drawing.draw_networkx_edges(G, pos)
ims.append((nodes,lines,))
plt.pause(.2)
plt.cla()
im_ani = animation.ArtistAnimation(fig, ims, interval=200, repeat_delay=3000,blit=True)
im_ani.save('im.mp4', metadata={'artist':'Guido'})The process works fine while displaying the figures live, it produces exactly the animation I want. And it even produces a looping animation in a figure at the end of the script, again what I want, which would suggest that the animation process worked. However when I open the "im.mp4" file saved to disk, it is a blank white image which runs for the expected period of time, never showing any of the graph images which were showed live.
I’m using networkx version 1.11, and matplotlib version 2.0. I’m using ffmpeg for the animation, and am running on a Mac, OSX 10.12.3.
What am I doing incorrectly ?
-
avcodec_encode_video returns 0 as output size
11 juin 2014, par vacetahannaHello what I am doing wrong ? When I try to encode a Frame, the out_size is 0. and if I use the avcodec_encode_video2 the return value is 0, which indicates, that everything went good, but the avpkt.size is 0 after that. What am I missing or doing wrong ? thank you so much here is my code
int EncodeVideoFFMPEG::enc_main( void *istream, void *outstream, int width, int height )
{
avcodec_register_all();
//choose codec
AVCodec *codec = avcodec_find_encoder(CODEC_ID_H264);
//set parameters
AVCodecContext *c = avcodec_alloc_context3(codec);
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->bit_rate = 50000;
c->pix_fmt = PIX_FMT_YUV420P;
c->width = width;
c->height = height;
c->time_base.num = 1;
c->time_base.den = 25;
c->gop_size = 20;
c->max_b_frames = 0;
//open
avcodec_open2(c, codec, NULL);
int got_packet;
int BYTEPIC = width * height * 3;
//prepare for changing color space
struct SwsContext *img_convert_ctx1 =
sws_getContext(width, height, PIX_FMT_BGR24,
width, height, PIX_FMT_YUV420P,
SWS_BICUBIC, NULL, NULL, NULL);
//allocateframesforcolorspacechange
AVFrame *pictureBGR = alloc_pictureBGR24(width, height);
AVFrame *picture = alloc_picture420P(width, height);
//get frame from OGRE and let pictureBGR point to it
unsigned char *image = new unsigned char[BYTEPIC];
memcpy(image, istream, BYTEPIC);
//change from BGR to 420P
sws_scale(img_convert_ctx1, &image, pictureBGR->linesize, 0, height, picture->data, picture->linesize);
delete image;
AVPacket avpkt;
av_new_packet( &avpkt, BYTEPIC );
//encode withthe codec
int out_size = avcodec_encode_video(c, avpkt.data, avpkt.size, picture);
//int success = avcodec_encode_video2(c, &avpkt, picture, &got_packet);
outstream = avpkt.data;
return out_size;
}