
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (57)
-
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)
31 mai 2013, parLorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
Description des scripts
Trois scripts Munin ont été développés :
1. mediaspip_medias
Un script de (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (4363)
-
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.