
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (89)
-
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 (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5420)
-
FFmpeg/libav Storing AVPacket data in a file and decoding them again in a different stream - How to prepare and send custom packets in the decoder ?
21 avril 2022, par HitokageI want to be able to open a stream with a video file and send in the decoder my own packets with data that I previously stored from a different stream with the same codec. So like forging my own packets in the decoder.


My approach is that I encode frames into packets using H.265 and store the data in a file like this :


AVPacket *packet;
std::vector data;
...encoding...
data->insert(data->end(), &packet->data[0], &packet->data[packet->size]);
...storing the buffer in a file...



I also have one mkv video with H.265 stream of the same parameters. Now I want to get the stored packet data in the file, create a new packet, and send it into the decoding process of the mkv file. To make it easier I just copy the parameters of the first packet in the mkv stream into a new packet where I insert my data and send it to the decoder. Is this a right approach ?


...open decoder with mkv file...
auto packet = av_packet_alloc();
av_read_frame(formatContext, packet);
//here is the packet I will use later with my data
av_packet_copy_props(decodingPacket, packet);
decodingPacket->flags = 0;
//sending the packet from the mkv
avcodec_send_packet(codecContext, packet);
//the data contains the previously stored data
av_packet_from_data(decodingPacket, data.data(), data.size());
avcodec_send_packet(codecContext, decodingPacket);
...retrieving the frame...



However, I am getting this error when I try to send the forget packet :


Assertion buf_size >= 0 failed at libavcodec/bytestream.h:141



I have tried to manually change the
decodingPacket->buf->size
but that is probably not the problem. I believe that I need to set up some other parameters in the forged packet but what exactly ? Maybe I can also somehow store not only the packet data but the whole structure ? Please let me know, if there is a better way to store and reload a packet and force it into an unrelated decoder with the same parameters.
Thanks !

EDIT : Seems like the buf_size problem was related to my data which were wrongly retrieved. I can confirm that this works now but I am getting a new error :


[hevc @ 0x559b931606c0] Invalid NAL unit size (0 > 414).
[hevc @ 0x559b931606c0] Error splitting the input into NAL units.



-
Révision 17738 : parametre retour facultatif dans ask_php_auth (utilisé dans l’extension forum)
20 avril 2011, par cedric - -
Révision 21543 : Suite à forum.spip.net/fr_258607.html, retour partiel sur http://core.spip.org/p...
10 septembre 2014