
Recherche avancée
Autres articles (104)
-
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 (...) -
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 (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (16634)
-
How to reconnect using avformat_open_input without having to alloc the decoder again ?
26 septembre 2012, par JonaCurrently, I have a code based on ffplay to stream live content.
One thing I'm looking to do is be able to reconnect upon loosing a connection without having to shutdown the whole decoding process.
To me the solution is alloc the decoder myself once and keep using it across reconnections. I can't seem to figure out how to setup a decoder without having to depend on the
AVFormatContext
. Right now my code is failing when trying to use my own allocatedAVCodecContext
to decode. But it doesn't fail if I use theAVCodecContext
given byAVFormatContext
.This is part of my initial code :
// attempt to find more information about the codec
// also it will open the codecs needed.
fferror = avformat_find_stream_info(ic, NULL);
if (0 > fferror)
{
// TODO verify type of error to better map it to our errors
error = ERROR_FAIL_TO_CONNECT;
LOGE("download() -> avformat_find_stream_info failed! fferror:%d, error:%d", fferror, error);
goto fail;
}
AVCodec *dec;
// select the audio stream
int ret = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0);
if (0 > ret) {
error = ERROR_UNEXPECTED_ERROR;
LOGE("download() -> av_find_best_stream failed! ret:%d, error:%d", ret, error);
goto fail;
}
LOGI("download() -> STREAM: nb_streams:%d", ic->nb_streams);
LOGI("download() -> STREAM: audio format:%s", ic->iformat->name);
LOGI("download() -> STREAM: audio bitrate:%d", ic->bit_rate);
// save the audio stream index and source
is->audio_stream_index = ret;
is->audio_st = ic->streams[is->audio_stream_index];
is->audio_buf_size = 0;
is->audio_buf_index = 0;
is->audio_st->discard = AVDISCARD_DEFAULT;
if(ic->pb) {
ic->pb->eof_reached= 0; //FIXME hack, ffplay maybe should not use url_feof() to test for the end
}
if (show_status) {
av_dump_format(ic, 0, is->filename, 0);
}
// open codec
error = open_decoder(is->audio_st->codec, dec);
if (ERROR_NO_ERROR != error) {
LOGE("receive_thread() -> open_decoder failed! error:%d", error);
goto fail;
}And this is the funtion that initializes the decoder.
static int open_decoder (AVCodecContext *avctx, AVCodec *codec)
{
int fferror = 0;
AVCodecContext *c = NULL;
if (smDecoder.open) {
LOGW("open_decoder() -> decoder is already open!");
return ERROR_NO_ERROR;
}
// find the decoder
if (!codec)
{
codec = avcodec_find_decoder(avctx->codec_id);
if (!codec)
{
LOGE("open_decoder() -> avcodec_find_decoder failed!");
return ERROR_UNEXPECTED_ERROR;
}
}
// allocate the decoder av context
c = avcodec_alloc_context3(codec);
if (NULL == c) {
LOGE("open_decoder() -> avcodec_alloc_context3 failed! Out of memory?");
return ERROR_UNEXPECTED_ERROR;
}
// check if the type of codec we support
if (AVMEDIA_TYPE_AUDIO != c->codec_type)
{
LOGE("open_decoder() -> codec_type not supported! codec_type:%d",c->codec_type);
return ERROR_UNEXPECTED_ERROR;
}
// set the proper channels if not properly set
if (c->channels > 0) {
c->request_channels = FFMIN(2, c->channels);
} else {
c->request_channels = 2;
}
c->debug_mv = 0;
c->debug = 0;
c->workaround_bugs = workaround_bugs;
c->idct_algo= idct;
if(fast) c->flags2 |= CODEC_FLAG2_FAST;
c->error_concealment= error_concealment;
c->thread_count = thread_count;
// open the decoder
fferror = avcodec_open2(avctx, codec, NULL);
if (fferror < 0)
{
LOGE("open_decoder() -> avcodec_open2 failed! fferror:%d", fferror);
return ERROR_UNEXPECTED_ERROR;
}
// clean up our reusable packet
memset(&smDecoder.audio_pkt, 0, sizeof(smDecoder.audio_pkt));
smDecoder.open = 1;
smDecoder.codec = codec;
smDecoder.avctx = c;
return ERROR_NO_ERROR;
} -
Anomalie #2792 (Fermé) : 2.1.16 bug possible pipeline_definir_session + ajouter_session( )
11 mai 2013, par cedric -La version 3.0 a introduit le pipeline
preparer_visiteur_session
appelé au moment de l’initialisation de la session, c’est ce qu’il te faudrait. Pas de solution propre en 2.1, c’est à toi de gérer le cas de ré-entrance pour l’éviter dans ta solution, mais elle n’est pas "propre" -
ffmpeg - very slow conversion
25 juillet 2015, par karoluchI create web app in JavaEE which displays many video formats. I use ffmpeg solution to convert videos to formats which is supported natively by main browsers.
According to : http://www.jwplayer.com/html5/formats/
I convert to WEBM container (VP8/VORBIS or VP9/OPUS). But conversion is very slow, bit rate equals to 200kbits/s. To convert I execute following commandffmpeg -i file.mov -c:v libvpx -preset ultrafast result.webm
How to speed up conversion to natively supported formats by main browsers ?