
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (59)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 (...) -
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 (7756)
-
My C++ software uses ffmpeg in streaming mode, but I want to decode the data as quickly as possible, how do I do that ?
14 septembre 2022, par Alexis WilkeWhen I run ffmpeg in my command line to convert an m4a file to mp3, it says ×45 to ×55 for the speed at which is decodes the input data. In this case, the 45 minute audio file gets converter in 2 minutes.


When I run the same process through my C++ code, I stream the data. This is because my code accepts data coming from the network so often it will a little faster to do streaming (unfortunately, not with m4a data since the header is placed at the end of the file...)


However, there seems to be something in ffmpeg that makes it think that if I want to stream the data it needs to be done in realtime. In other words, the frames come through at a speed of ×1 instead of the possible average of ×50.


Is there a flag/setup that I need to turn ON or OFF so the streaming process goes ×50 or so ?



I allocate the context like so :


size_t const avio_buffer_size(4096);
unsigned char * avio_buffer(reinterpret_cast<unsigned char="char">(av_malloc(avio_buffer_size)));
AVIOContext * context(avio_alloc_context(
 avio_buffer
 , avio_buffer_size
 , 0 // write flag
 , this // opaque
 , decoder_read_static
 , nullptr // write func.
 , decoder_seek_static));
</unsigned>


To do the streaming, I use custom I/O in the context :


AVFormatContext * format_context(avformat_alloc_context());
format_context->pb = context;
format_context->flags |= AVFMT_FLAG_CUSTOM_IO;
avformat_open_input(
 &format_context
 , "input" // filename (unused)
 , nullptr // input format
 , nullptr); // options



Next I get the audio stream index :


avformat_find_stream_info(format_context, nullptr);
AVCodec * decoder_codec(nullptr);
int const index(av_find_best_stream(
 format_context
 , AVMEDIA_TYPE_AUDIO
 , -1 // wanted stream number
 , -1 // related stream
 , &decoder_codec
 , 0)); // flags



That has the side effect of telling us which decoder to use :


AVCodecContext * decoder_context = avcodec_alloc_context3(decoder_codec);
avcodec_parameters_to_context(
 decoder_context
 , format_context->streams[index]->codecpar);
avcodec_open2(
 decoder_context
 , decoder_codec
 , nullptr); // options



And finally, I loop through the frames :


AVFrame *frame(av_frame_alloc());
AVPacket av_packet;
av_init_packet(&av_packet);
for(;;)
{
 av_read_frame(format_context, &av_packet);
 if(end-detected)
 {
 break;
 }
 if(av_packet.stream_index != index) continue;
 avcodec_send_packet(decoder_context, &av_packet);
 for(;;)
 {
 avcodec_receive_frame(decoder_context, frame);
 if(end-detected)
 {
 break;
 }
 ...copy data from frame...
 av_frame_unref(frame);
 }
 av_packet_unref(&av_packet);
}



Note : I don't show all the error handling, use of RAII, etc. in an attempt to show the code in its simplest form.


-
Announcement : Piwik to focus on Reliability, Performance and Security
To our valued team and community,
Well, we have moved fast and achieved so much during the past few months. Relentlessly releasing major version after major version… We got a lot done including several major new features !
The speed of adding new features was a great showcase of how agile our small teams and the larger community are. And I’m so proud to see automated testing becoming common practice among everyone hacking on Piwik !
For the next few months until the new year we will focus on making what we have better. We will fix those rare but longstanding critical bugs, and aim to solve all Major issues and other must-have performance and general improvements. The core team and Piwik PRO will have the vision of making the existing Piwik and all plugins very stable and risk free. This includes edge cases, general bugs but also specific performance issues for high traffic or issues with edge case data payloads.
We’ll be more pro-active and take Piwik platform to the next level of Performance, Security, Privacy & Reliability ! We will prove to the world that Free/Libre Web software can be of the highest standard of quality. By focusing on quality we will make Piwik even easier to maintain and improve in the future. We are building the best open platform that will let every user liberate their data and keep full control of it.
If you have any feedback or questions get in touch or let’s continue the discussion in the forum.
Thank you for your trust and for liberating your data with Piwik,
Matthieu Aubry
Piwik founderMore information
- How long is each release of Piwik maintained for ? (FAQ)
- When is the next release of Piwik ? What is the release schedule ? (FAQ)
- Pulse of Piwik : our monthly pulse report shows 27 different people contributed to Piwik core in the last month !
This is an amazing testament of the power of free/libre software and yet we think this is just the beginning. We hope more developers will join and contribute to the Piwik project !
-
Announcement : Piwik to focus on Reliability, Performance and Security
To our valued team and community,
Well, we have moved fast and achieved so much during the past few months. Relentlessly releasing major version after major version… We got a lot done including several major new features !
The speed of adding new features was a great showcase of how agile our small teams and the larger community are. And I’m so proud to see automated testing becoming common practice among everyone hacking on Piwik !
For the next few months until the new year we will focus on making what we have better. We will fix those rare but longstanding critical bugs, and aim to solve all Major issues and other must-have performance and general improvements. The core team and Piwik PRO will have the vision of making the existing Piwik and all plugins very stable and risk free. This includes edge cases, general bugs but also specific performance issues for high traffic or issues with edge case data payloads.
We’ll be more pro-active and take Piwik platform to the next level of Performance, Security, Privacy & Reliability ! We will prove to the world that Free/Libre Web software can be of the highest standard of quality. By focusing on quality we will make Piwik even easier to maintain and improve in the future. We are building the best open platform that will let every user liberate their data and keep full control of it.
If you have any feedback or questions get in touch or let’s continue the discussion in the forum.
Thank you for your trust and for liberating your data with Piwik,
Matthieu Aubry
Piwik founderMore information
- How long is each release of Piwik maintained for ? (FAQ)
- When is the next release of Piwik ? What is the release schedule ? (FAQ)
- Pulse of Piwik : our monthly pulse report shows 27 different people contributed to Piwik core in the last month !
This is an amazing testament of the power of free/libre software and yet we think this is just the beginning. We hope more developers will join and contribute to the Piwik project !