
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (73)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (9884)
-
How to put audio data in AVFrame for encode
17 avril 2020, par easy_breezyI try to encode raw PCM sound to G711A and G711U and then decode it, with this codecs everything works fine because I can choose any value for AVCodecContext frame_size for encoding, but in case of Opus codec the AVCodecContext frame_size is equal to 120, so if I understood correctly if my input data array size is bigger than 120 then I need to do some kind of buffering and split my input data into several parts and then sequentially put it to AVFrame->data and pass the AVFrame to encoding.



In result I get a very bad sound and I get this result not only when I use Opus codec but also in G711 if I set it's AVCodecContext frame_size to some value that will be less than size of my input data.



So my question is : what it the correct way to encode input data if it's size if bigger than AVCodecContext frame_size ? Do I need to split my input data into some parts that <= AVCodecContext frame_size if so how should I do that ?



At this moment my code looks like this :



void encode(uint8_t *data, unsigned int length)
{
 int rawOffset = 0;
 int rawDelta = 0;
 int rawSamplesCount = frameEncode->nb_samples <= length ? frameEncode->nb_samples : length;

 while (rawSamplesCount > 0)
 {
 memcpy(frameEncode->data[0], &data[rawOffset], sizeof(uint8_t) * rawSamplesCount);

 encodeFrame();

 rawOffset += rawSamplesCount;
 rawDelta = length - rawOffset;
 rawSamplesCount = rawDelta > frameEncode->nb_samples ? frameEncode->nb_samples : rawDelta;
 }

 av_frame_unref(frameEncode);
}

void encodeFrame()
{
 /* send the frame for encoding */
 int ret = avcodec_send_frame(contextEncoder, frameEncode);
 if (ret < 0)
 {
 LOGE(TAG, "[encodeFrame] avcodec_send_frame error: %s", av_err2str(ret));
 return;
 }

 /* read all the available output packets (in general there may be any number of them) */
 while (ret >= 0)
 {
 ret = avcodec_receive_packet(contextEncoder, packetEncode);
 if (ret < 0 && ret != AVERROR(EAGAIN)) LOGE(TAG, "[encodeFrame] error in avcodec_receive_packet: %s", av_err2str(ret));
 if (ret < 0) break;
 std::pair p = std::pair();
 p.first = (uint8_t *)(malloc(sizeof(uint8_t) * packetEncode->size));
 memcpy(p.first, packetEncode->data, (size_t)packetEncode->size);
 p.second = (unsigned int)(packetEncode->size);

 listEncode.push_back(p); // place encoded data into list to finally create one array of encoded data from it
 }
 av_packet_unref(packetEncode);
}




You can see that I split my input data into several parts, then I put it in frame->data and then pass the frame to encoding but I'm not sure that is the correct way.



UPD : I noticed that when I use G711 if I set AVCodecContext frame_size to 160 and size of my input data is 160 or 320 everething works fine, but if input data size is 640 then i get bad buzzing sound.


-
aacdec : don’t return frames without data
12 mai 2015, par Andreas Cadhalpunaacdec : don’t return frames without data
Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.In this case a bogus frame without any data, but non-zero nb_samples is
returned.Signed-off-by : Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by : Michael Niedermayer <michaelni@gmx.at> -
Need help on handling MPEG4V1 data
14 septembre 2011, par GediminasI'm in situation where I need to get a chunk of MPEG4V1 (Microsoft MPEG-4 VKI
Codec V1) data located in the beginning of a packet (that was sent by some DVR unit).Packet structure looks something like this :
- Compressed MPEG4 data.
- Long integer - Number of events and tripwires.
- Long integer - Number of events.
- Event - Event's sequence.
- Long integer - Number of tripwires.
- Tripwire - Tripwires sequence.
- Long integer - Cyclical redundant code (CRC).
So there is no indication of how to know where does the MPEG4 data ends (Or is there ?),
and from where should I start reading this additional data like "Number of events and tripwires" and etc...I uploaded two packet's so you could see how the actual data looks like :
recvData1.txt,
recvData2.txt.I've tried to decode those packets using FFmpeg library with avcodec_decode_video function and by removing byte by byte from the end of my recvData buffer in a hope for any results,
but FFmpeg just allways returned with an error messages like this :"[msmpeg4v1 @ 038865a0] invalid startcode",
"[msmpeg4v1 @ 038865a0] header damaged".I'm not that good specialist on knowing of how does the MPEG4 works from the inside,
but judging by the error messages it's clearly seen that I'm missing some data for decoding at the start of the buffer.So I'm not sure of what part / kind of MPEG data I'm getting here..
Maybe it's some kind of MPEG's "frame" data with it's "end" indication or something ?I've even compared the start of my recvData buffer to some of MPEG4V1 encoded video files I found on the net "http://www.trekmania.net/clips/video_clips4.htm" to check if the start of my buffer really contains the MPEG data ..and not some kind of DVR vendor specific stuff..
And I noticed that there are about 20bytes of data
(at the start of my packet data, and in .avi files right after about 180bytes..)
that looks like some kind of header or something..Please check this image : "http://ggodis.gamedev.lt/stackOverflow/recvData.jpg"
Maybe someone knows what this part of MPEG4V1 data represents ?
P.S. ..I've checked the CRC values for my received packets and they were correct..