
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 (31)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (4969)
-
How to check if client is still connected with ffmpeg
11 décembre 2017, par AdalcarI am working on a live-streaming server in C++ using FFMPEG.
I have a I have an acquisition thread which grabs the images from the cameras and I spawn a new thread on each client connexion to send them the packets.Here’s my "send" function :
void Encoder::_encode()
{
int ret = 0;
if (avcodec_send_frame(ctx, frame) < 0)
throw new std::runtime_error("error sending a frame for encoding");
while (ret >= 0)
{
ret = avcodec_receive_packet(ctx, pkt);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
return;
avio_write(client, pkt->data, pkt->size);
avio_flush(client);
av_packet_unref(pkt);
}
}This encodes the frame and sends it to the client.
The problem is : whenever the client exits, the thread keeps sending it data, and throws no exception, even when the same client connects again, it will spawn a new thread while the old one keeps running...
Is there a way to "ping" the client to check whether it is still connected ? -
Extract audio from video using autogen ffmpeg C# in Unity
5 décembre 2024, par Johan SophieHi I'm using ffmpeg autogen to extract audio from video in Unity, but when I following this code, the file write cannot write, it's 0Kb, so what's issue of this or someone have any examples for extract audio using this library, apologize for my English. This is github of library : 
https://github.com/Ruslan-B/FFmpeg.AutoGen



unsafe void TestExtractAudio()
{

 string inFile = Application.streamingAssetsPath + "/" + strFileName;
 string outFile = Application.streamingAssetsPath + "/" + strFileNameAudio;

 AVOutputFormat* outFormat = null;
 AVFormatContext* inFormatContext = null;
 AVFormatContext* outFormatContext = null;
 AVPacket packet;

 ffmpeg.av_register_all();

 inFormatContext = ffmpeg.avformat_alloc_context();
 outFormatContext = ffmpeg.avformat_alloc_context();

 if (ffmpeg.avformat_open_input(&inFormatContext, inFile, null, null) < 0)
 {
 throw new ApplicationException("Could not open input file.");
 }

 if (ffmpeg.avformat_find_stream_info(inFormatContext, null) < 0)
 {
 throw new ApplicationException("Failed to retrieve input stream info.");
 }

 ffmpeg.avformat_alloc_output_context2(&outFormatContext, null, null, outFile);
 if (outFormatContext == null)
 {
 throw new ApplicationException("Could not create output context");
 }

 outFormat = outFormatContext->oformat;

 AVStream* inStream = inFormatContext->streams[1];
 AVStream* outStream = ffmpeg.avformat_new_stream(outFormatContext, inStream->codec->codec);
 if (outStream == null)
 {
 throw new ApplicationException("Failed to allocate output stream.");
 }

 if (ffmpeg.avcodec_copy_context(outStream->codec, inStream->codec) < 0)
 {
 throw new ApplicationException("Couldn't copy input stream codec context to output stream codec context");
 }

 outFormatContext->audio_codec_id = AVCodecID.AV_CODEC_ID_MP3;

 int retcode = ffmpeg.avio_open(&outFormatContext->pb, outFile, ffmpeg.AVIO_FLAG_WRITE);
 if (retcode < 0)
 {
 throw new ApplicationException("Couldn't open output file");
 }

 int returnCode = ffmpeg.avformat_write_header(outFormatContext, null);

 if (returnCode < 0)
 {
 throw new ApplicationException("Error occurred opening output file.");
 }

 while (true)
 {
 if (ffmpeg.av_read_frame(inFormatContext, &packet) < 0)
 {
 break;
 }

 if (packet.stream_index == 1)
 {

 inStream = inFormatContext->streams[1];
 outStream = outFormatContext->streams[0];

 // TODO: Replicate log packet functionality to print out what's inside the packet.

 packet.pts = ffmpeg.av_rescale_q_rnd(packet.pts, inStream->time_base, outStream->time_base,
 AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);
 packet.dts = ffmpeg.av_rescale_q_rnd(packet.dts, inStream->time_base, outStream->time_base,
 AVRounding.AV_ROUND_NEAR_INF | AVRounding.AV_ROUND_PASS_MINMAX);

 packet.duration = ffmpeg.av_rescale_q(packet.duration, inStream->time_base, outStream->time_base);

 int returncode = ffmpeg.av_interleaved_write_frame(outFormatContext, &packet);

 }

 ffmpeg.av_packet_unref(&packet);
 }

 ffmpeg.av_write_trailer(outFormatContext);


 ffmpeg.avformat_close_input(&inFormatContext);

 ffmpeg.avformat_free_context(outFormatContext);

 Console.WriteLine("Press any key to continue...");

 Console.ReadKey();
}




the value returnCode return less than 0, so someone can fix this, thanks so much for that


-
avcodec/nvdec : More effort to make vp8 compile with gcc 4.6
27 novembre 2017, par Philip Langdaleavcodec/nvdec : More effort to make vp8 compile with gcc < 4.6
I'm told my prefix work-around wasn't enough to make it compile,
although I'm not sure why ; I did some basic testing and that
approach appeared to work, but I'm not in a position to do a
full compile on CentOS 6 so I can't be sure of anything.I have had it confirmed that the additional change to not use
named initialisers is enough to make it compile, so let's
throw that into the mix too.