
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (65)
-
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 (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (9609)
-
avcodec library not extracting all the frames from a video
22 novembre 2018, par Guru GovindanI have written a library that could be used with python to extract frames from a video in a buffer for some processing. I used the examples from the ffmpeg to build my library using libavcodec.
This and seems to be working fine for most of the videos. But I see on some videos where my library does not extract all the frames (way less than the FPS).It seems like somehow the packets might be out of order and docoder is not able to handle it. I keep getting a lot of the following errors
pid=100 pes_code=0x1e0
nal_unit_type : 9, nal_ref_idc : 0
nal_unit_type : 1, nal_ref_idc : 2
deblocking_filter_idc 7 out of range
decode_slice_header error
no frame !
I use the following steps to setup the decoder.
//open input file, allocate context
if ((ret = avformat_open_input(&format_ctx, in_filename, 0, 0)) < 0) {
PyErr_SetString(ExtractorError, "Could not open input file!");
goto end;
}
if ((ret = avformat_find_stream_info(format_ctx, 0)) < 0) {
PyErr_SetString(ExtractorError, "Failed to retrieve input stream information!");
goto end;
}
av_dump_format(format_ctx, 0, in_filename, 0);
// Get the video index from the stream
for(int i=0; inb_streams ;i++ )
{
if( format_ctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO )
{
video_stream_index = i;
break;
}
}
/* if video stream not availabe */
if((video_stream_index) == -1)
{
PyErr_SetString(ExtractorError, "video stream to retreive fps is not found!");
return NULL;
}
long duration = format_ctx->duration + (format_ctx->duration <= INT64_MAX - 5000 ? 5000 : 0);
float duration_in_secs = (float)duration / AV_TIME_BASE;
stream_mapping_size = format_ctx->nb_streams;
stream_mapping = av_mallocz_array(stream_mapping_size, sizeof(*stream_mapping));
if (!stream_mapping) {
ret = AVERROR(ENOMEM);
goto end;
}
AVCodec *pCodec = NULL;
AVCodecParameters *in_codecpar = NULL;
for (i = 0; i < format_ctx->nb_streams; i++) {
AVStream *in_stream = format_ctx->streams[i];
in_codecpar = in_stream->codecpar;
if (in_codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&
in_codecpar->codec_type != AVMEDIA_TYPE_VIDEO &&
in_codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) {
stream_mapping[i] = -1;
continue;
}
if (in_codecpar->codec_type == AVMEDIA_TYPE_VIDEO){
pCodec = avcodec_find_decoder(in_codecpar->codec_id);
stream_mapping[i] = stream_index++;
break;
}
}
if(!pCodec){
PyErr_SetString(ExtractorError, "error, no pCodec!");
return NULL;
}
// convert CodecParam to CodecCtx
AVCodecContext *pCodecCtx = avcodec_alloc_context3(pCodec);
if (!pCodecCtx) {
PyErr_SetString(ExtractorError, "Failed to convert codecParam to CodecCtx!");
return NULL;
}
ret = avcodec_parameters_to_context(pCodecCtx, in_codecpar);
if (ret < 0)
goto end;
//open video decoder
if (avcodec_open2(pCodecCtx, pCodec, NULL) < 0)
{
logging("EXTRACTOR: failed to open codec through avcodec_open2\n");
return NULL;
}In order to test it I used the following command from ffmpeg to extract frames from the same video and it worked fine.
ffmpeg -i /thuuz/extractor/03000.ts -f image2 -qscale:v 7 ffmpeg-detect—%03d.jpg -hide_banner -v quiet
Am I not passing the right codec params ? Please let me know some inputs on how to debug this issue.
Thanks a lot. -
Anomalie #4214 (Rejeté) : Notices sous easyphp et php 7.3 rc3
2 novembre 2018, par Franck DSous easyphp avec php 7.3rc3 avec un spip 24140 tout neuf, j’ai donc aussi le commit https://zone.spip.net/trac/spip-zone/changeset/112276/spip-zone (qui n’a sans doute rien avoir avec le problème)
A savoir que pour les tests, je fais l’ajout d’un fichier mes_options contenant :- <span class="CodeRay"><span class="inline-delimiter"><?php</span>
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_NO_CACHE</span><span class="delimiter">'</span></span>, -<span class="integer">1</span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_INTERDIRE_COMPACTE_HEAD_ECRIRE</span><span class="delimiter">'</span></span>, <span class="predefined-constant">true</span>);
- <span class="predefined">error_reporting</span>(<span class="exception">E_ALL</span>^<span class="exception">E_NOTICE</span>);
- ini_set (<span class="string"><span class="delimiter">"</span><span class="content">display_errors</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">On</span><span class="delimiter">"</span></span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">SPIP_ERREUR_REPORT</span><span class="delimiter">'</span></span>,<span class="exception">E_ALL</span>);
- <span class="predefined">$GLOBALS</span>[<span class="string"><span class="delimiter">'</span><span class="content">taille_des_logs</span><span class="delimiter">'</span></span>] = <span class="integer">500</span>;
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_MAX_LOG</span><span class="delimiter">'</span></span>, <span class="integer">500000</span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_LOG_FILELINE</span><span class="delimiter">'</span></span>,<span class="predefined-constant">true</span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_LOG_FILTRE_GRAVITE</span><span class="delimiter">'</span></span>,<span class="integer">8</span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_DEBUG_SLOW_QUERIES</span><span class="delimiter">'</span></span>, <span class="predefined-constant">true</span>);
- <span class="predefined">define</span>(<span class="string"><span class="delimiter">'</span><span class="content">_BOUCLE_PROFILER</span><span class="delimiter">'</span></span>, <span class="integer">5000</span>);
- </span>
J’ai un warning qui s’affiche, mais pour le voir, j’ai installer manuellement le plugin https://plugins.spip.net/simplog.html dans le dossier "plugins"
Puis après avoir fait l’ajout du dépôt de la zone, je vais à la page /ecrire/ ?exec=charger_plugin et je clique sur le bouton "Rechercher" de la boite "Rechercher et ajouter des plugins"Pour info, sinon, cela semble quand même fonctionner normalement :-)
-
How Read .mp4 video and then put it in NamedPipeServerStream ?
23 mars 2019, par Oleg PiHow I Might Put .mp4 readed with StreamReader and then put it into pipe ?
I need to read the data and send it to the pipe. I read the .mpg4 file. Then I process it through ffmpeg. Am I trying to send the file to the pipe correctly ?public void getVideoFramesFromLocalPath(string fileName, string outputFileName, int period)
{
Thread th1 = new Thread(new ParameterizedThreadStart(PipeLine));
th1.Start(fileName);
int bitrate = 5000;
int fps = 10;
string strTakeFrame = $"-f image2pipe -i pipe:videoPipe -qscale:v 4 -vf fps=1/{period} {outputFileName}_%04d.jpg";
ffProcessStart(strTakeFrame);
}
private async void PipeLine(object fileName)
{
StreamReader SR = new StreamReader((string)fileName);
NamedPipeServerStream pipeServer = new NamedPipeServerStream("videoPipe", PipeDirection.Out);
pipeServer.WaitForConnection();
StreamWriter SW = new StreamWriter(pipeServer);
SW.Write(SR.ReadToEnd());
SW.Flush();
}
static void ffProcessStart(string commandLine)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = @"ffmpeg.exe";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = commandLine;
try
{
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
}
}
catch (Exception e)
{
Console.WriteLine(e);
}
}