
Recherche avancée
Autres articles (50)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (4834)
-
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.


-
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.


-
x86 : Remove inline MMX assembly that clobbers the FPU state
26 janvier 2024, par Martin Storsjöx86 : Remove inline MMX assembly that clobbers the FPU state
These inline implementations of AV_COPY64, AV_SWAP64 and AV_ZERO64
are known to clobber the FPU state - which has to be restored
with the 'emms' instruction afterwards.This was known and signaled with the FF_COPY_SWAP_ZERO_USES_MMX
define, which calling code seems to have been supposed to check,
in order to call emms_c() after using them. See
0b1972d4096df5879038f0af776f87f41e90ebd4,
29c4c0886d143790fcbeddbe40a23dfc6f56345c and
df215e575850e41b19aeb1fd99e53372a6b3d537 for history on earlier
fixes in the same area.However, new code can use these AV_*64() macros without knowing
about the need to call emms_c().Just get rid of these dangerous inline assembly snippets ; this
doesn't make any difference for 64 bit architectures anyway.Signed-off-by : Martin Storsjö <martin@martin.st>