
Recherche avancée
Médias (2)
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (84)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (9772)
-
Your guide to cookies, web analytics, and GDPR compliance
-
FFMPEG : Explain parameters of any codecs fuction pointers
3 décembre 2013, par ZaxI'm going through the article, How to integrate a codec in FFMPEG multimedia framework.
According to it, every codec needs to have 3 basic functions to be defined and these functions are assigned to function pointers of the structureAVCodec
.The 3 function pointers specified in the above article are :
.init -> takes care of allocations and other initializations
.close -> freeing the allocated memory and de-initializations
.decode -> frame by frame decoding.For the function pointer
.decode
, the funtion assigned is :static int cook_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size) {
...The details of these parameters are specified in the above article. However, in the latest code, when the same function is taken as an example, its declaration is as shown below :
static int cook_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)I need to perform some mapping operations on the memory. So, i request if anyone could kindly explain the above parameters in the function declarations. Also, which parameter has the input buffer for decoding the frame ? And after decoding a frame, to which parameter is the decoded frame mapped ?
Thanks in advance.
-Regards.
-
iOS FFmpeg : Requested output format 'flv' is not a suitable output format
14 novembre 2013, par user2992563I just upgraded my iOS compiled FFmpeg library to 1.2.1 and now I'm getting the following error message :
Requested output format 'flv' is not a suitable output format.I tried changing format to 'avi' and 'mov' aswell, but it seems that no matter the format_name I pass I get the same error message.
This is how I set up the format_name :
avformat_alloc_output_context2(&file, NULL, "flv", cname)
And this is how I write the stream packets :
// Appends a data packet to the rtmp stream
-(bool) writePacket: (Demuxer *) source
{
int code = 0;
AVCodecContext
*videoCodec = [source videoCodec],
*audioCodec = [source audioCodec];
// Write headers
if(useHeaders)
{
AVStream
*video = av_new_stream(file, VIDEO_STREAM),
*audio = av_new_stream(file, AUDIO_STREAM);
if (!video || !audio)
@throw [NSException exceptionWithName: @"StreamingError" reason: @"Could not allocate streams" userInfo: nil];
// Clone input codecs and extra data
memcpy(video->codec, videoCodec, sizeof(AVCodecContext));
memcpy(audio->codec, audioCodec, sizeof(AVCodecContext));
video->codec->extradata = av_malloc(video->codec->extradata_size);
audio->codec->extradata = av_malloc(audio->codec->extradata_size);
memcpy(video->codec->extradata, videoCodec->extradata, video->codec->extradata_size);
memcpy(audio->codec->extradata, audioCodec->extradata, audio->codec->extradata_size);
// Use FLV codec tags
video->codec->codec_tag = FLV_TAG_TYPE_VIDEO;
audio->codec->codec_tag = FLV_TAG_TYPE_AUDIO;
video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
audio->codec->sample_rate = INPUT_AUDIO_SAMPLING_RATE;
// Update time base
video->codec->time_base.num = 1;
audio->codec->time_base.den = video->codec->time_base.den = FLV_TIMEBASE;
// Signal bitwise stream copying
//video->stream_copy = audio->stream_copy = 1;
if((code = avformat_write_header(file, NULL)))
@throw [NSException exceptionWithName: @"StreamingError" reason: @"Could not write stream headers" userInfo: nil];
useHeaders = NO;
}
bool isVideo;
AVPacket *packet = [source readPacket: &isVideo];
if(!packet)
return NO;
if(isVideo)
{
packet->stream_index = VIDEO_STREAM;
packet->dts = packet->pts = videoPosition;
videoPosition += packet->duration = FLV_TIMEBASE * packet->duration * videoCodec->ticks_per_frame * videoCodec->time_base.num / videoCodec->time_base.den;
}
else
{
packet->stream_index = AUDIO_STREAM;
packet->dts = packet->pts = audioPosition;
audioPosition += packet->duration = FLV_TIMEBASE * packet->duration / INPUT_AUDIO_SAMPLING_RATE;
}
packet->pos = -1;
packet->convergence_duration = AV_NOPTS_VALUE;
// This sometimes fails without being a critical error, so no exception is raised
if((code = av_interleaved_write_frame(file, packet)))
NSLog(@"Streamer::Couldn't write frame");
av_free_packet(packet);
return YES;
}In the code above I had to comment out this line as stream_copy has been removed from the newest version of FFmpeg :
video->stream_copy = audio->stream_copy = 1;
Any help would be greatly appreciated !