
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (9)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (3500)
-
Anomalie #4074 : Le code de plugin-dist/medias/modeles/video.html , produit un paragraphe de trop ...
11 janvier 2018, par eldk -Code de base produit par SPIP
Extrait video  ; : sens de la vie - Monthy Python - 1983 - Universal<script>/*<![CDATA[*/var mejspath='plugins-dist/medias/lib/mejs/mediaelement-and-player.min.js?1508951836',mejscss='plugins-dist/medias/lib/mejs/mediaelementplayer.min.css?1508951836';<br />
var mejsloader; (function(){var a=mejsloader;"undefined"==typeof a&#38;&#38;(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(b){if("undefined"==typeof a.css[b]){a.css[b]=!0;var c=document.createElement("link");c.href=b;c.rel="stylesheet";c.type="text/css";document.getElementsByTagName("head")[0].appendChild(c)}},a.init=function(){!0===a.gs&#38;&#38;function(b){jQuery("audio.mejs,video.mejs").not(".done").each(function(){function c(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)"undefined"== typeof a.plug[f]?(e=!1,a.plug[f]=!1,jQuery.getScript(d.plugins[f],function(){a.plug[f]=!0;c()})):0==a.plug[f]&#38;&#38;(e=!1);e&#38;&#38;new MediaElementPlayer("#"+b,jQuery.extend(d.options,{success:function(a){function b(){jQuery(a).closest(".mejs-inner").removeClass(a.paused?"playing":"paused").addClass(a.paused?"paused":"playing")}b();a.addEventListener("play",b,!1);a.addEventListener("playing",b,!1);a.addEventListener("pause",b,!1);a.addEventListener("paused",b,!1);g.attr("autoplay")&#38;&#38;a.play()}}))}var g=jQuery(this).addClass("done"), b;(b=g.attr("id"))||(b="mejs-"+g.attr("data-id")+"-"+a.c++,g.attr("id",b));var d={options:{},plugins:{},css:[]},e,h;for(e in d)if(h=g.attr("data-mejs"+e))d[e]=jQuery.parseJSON(h);c()})}(jQuery)});a.gs||("undefined"!==typeof mejscss&#38;&#38;a.cssload(mejscss),a.gs=jQuery.getScript(mejspath,function(){a.gs=!0;a.init();jQuery(a.init);onAjaxLoad(a.init)}))})();/*]]>*/</script>Extrait video  ; : sens de la vie - Monthy Python - 1983 - Universal<script>/*<![CDATA[*/var mejspath='plugins-dist/medias/lib/mejs/mediaelement-and-player.min.js?1508951836',mejscss='plugins-dist/medias/lib/mejs/mediaelementplayer.min.css?1508951836';<br />
var mejsloader; (function(){var a=mejsloader;"undefined"==typeof a&#38;&#38;(mejsloader=a={gs:null,plug:{},css:{},init:null,c:0,cssload:null});a.init||(a.cssload=function(b){if("undefined"==typeof a.css[b]){a.css[b]=!0;var c=document.createElement("link");c.href=b;c.rel="stylesheet";c.type="text/css";document.getElementsByTagName("head")[0].appendChild(c)}},a.init=function(){!0===a.gs&#38;&#38;function(b){jQuery("audio.mejs,video.mejs").not(".done").each(function(){function c(){var e=!0,h;for(h in d.css)a.cssload(d.css[h]);for(var f in d.plugins)"undefined"== typeof a.plug[f]?(e=!1,a.plug[f]=!1,jQuery.getScript(d.plugins[f],function(){a.plug[f]=!0;c()})):0==a.plug[f]&#38;&#38;(e=!1);e&#38;&#38;new MediaElementPlayer("#"+b,jQuery.extend(d.options,{success:function(a){function b(){jQuery(a).closest(".mejs-inner").removeClass(a.paused?"playing":"paused").addClass(a.paused?"paused":"playing")}b();a.addEventListener("play",b,!1);a.addEventListener("playing",b,!1);a.addEventListener("pause",b,!1);a.addEventListener("paused",b,!1);g.attr("autoplay")&#38;&#38;a.play()}}))}var g=jQuery(this).addClass("done"), b;(b=g.attr("id"))||(b="mejs-"+g.attr("data-id")+"-"+a.c++,g.attr("id",b));var d={options:{},plugins:{},css:[]},e,h;for(e in d)if(h=g.attr("data-mejs"+e))d[e]=jQuery.parseJSON(h);c()})}(jQuery)});a.gs||("undefined"!==typeof mejscss&#38;&#38;a.cssload(mejscss),a.gs=jQuery.getScript(mejspath,function(){a.gs=!0;a.init();jQuery(a.init);onAjaxLoad(a.init)}))})();/*]]>*/</script> -
ffmpeg convert variable framerate .webm to constant framerate video
4 novembre 2019, par DashadowerI have a .webm file of a recording of a game at 16fps. However, upon trying to process the video with OpenCV, it seems the video is recorded with a variable framerate, so when I try to use OpenCV to get a frame every second by getting the every 16th frame, it won’t work since the video stream will end prematurely.
Therefore, I’m trying to convert a variable-frame .webm video, which claims it has a framerate of 16 fps, to a video with a constant frame, so I can extract one frame for every second. I’ve tried the following ffmpeg command from https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=5518 :
ffmpeg -i input.webm -c:v copy -b:v copy -r 16 output.webm
However, the following error will occur :
[NULL @ 00000272ccbc0c40] [Eval @ 000000bc11bfe2f0] Undefined constant or missing '(' in 'copy'
[NULL @ 00000272ccbc0c40] Unable to parse option value "copy"
[NULL @ 00000272ccbc0c40] Error setting option b to value copy.
Error setting up codec context options.Here’s is the code I’m trying to use to process a frame every second :
video = cv2.VideoCapture(test_mp4_vod_path)
print("Opened ", test_mp4_vod_path)
print("Processing MP4 frame by frame")
# forward over to the frames you want to start reading from.
# manually set this, fps * time in seconds you wanna start from
video.set(1, 0)
success, frame = video.read()
#fps = int(video.get(cv2.CAP_PROP_FPS)) # this will return 0!
fps = 16 # hardcode fps
total_frame_count = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
print("Loading video %d seconds long with FPS %d and total frame count %d " % (total_frame_count/fps, fps, total_frame_count))
count = 1
while video.isOpened():
success, frame = video.read()
if not success:
break
if count % fps == 0:
print("%dth frame is %d seconds on video"%(count, count/fps))
count += 1The code will finish before it gets near the end of the video, since the video isn’t at a constant FPS.
How can I convert a variable-FPS video to a constant FPS video ? -
FFmpeg generic error in an external library
13 octobre 2017, par Mher DidaryanI’m trying to encode the game play from Unreal Engine with h264_nvenc encoder on a windows with FFmpeg 3.3.3. FFmpeg was configured with —enable-cuda —enable-cuvid —enable-nvenc
However avcodec_open2 can’t open the codec.Below is the function where call to
avcodec_alloc_context3
is.void Encoder::AddStream(AVCodecID CodecID)
{
VideoCodec = avcodec_find_encoder(CodecID);
if (!VideoCodec) {
UE_LOG(LogTemp, Error, TEXT("Could not find encoder for '%s'"), ANSI_TO_TCHAR(avcodec_get_name(CodecID)));
}
VideoSt.Stream = avformat_new_stream(FmtCtx, nullptr);
if (!VideoSt.Stream) {
UE_LOG(LogTemp, Error, TEXT("Could not allocate stream"));
}
VideoSt.Stream->id = FmtCtx->nb_streams - 1;
VideoSt.Ctx = avcodec_alloc_context3(VideoCodec);
if (!VideoSt.Ctx) {
UE_LOG(LogTemp, Error, TEXT("Could not alloc an encoding context"));
}
VideoSt.Ctx->codec_id = CodecID;
VideoSt.Ctx->flags = 0;
VideoSt.Ctx->me_range = 16;
VideoSt.Ctx->max_qdiff = 4;
VideoSt.Ctx->refs = 0;
VideoSt.Ctx->qmin = 2;
VideoSt.Ctx->qmax = 31;
VideoSt.Ctx->qcompress = 0.6;
VideoSt.Ctx->width = ViewportSize.X;
VideoSt.Ctx->height = ViewportSize.Y;
VideoSt.Ctx->bit_rate = 4000000;
VideoSt.Stream->time_base = VideoSt.Ctx->time_base = { 1, 30 };
VideoSt.Ctx->gop_size = 25;
VideoSt.Ctx->max_b_frames = 0;
VideoSt.Ctx->thread_count = 1;
VideoSt.Ctx->pix_fmt = AV_PIX_FMT_YUV420P;
VideoSt.Ctx->codec_type = AVMEDIA_TYPE_VIDEO;
if (FmtCtx->oformat->flags & AVFMT_GLOBALHEADER)
VideoSt.Ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}As answer to this question suggests same issue I use
avcodec_alloc_context3
. Am I doing something wrong or error caused buy another reason ?Below is the part where call to
avcodec_open2
is. It’s called afterEncoder::AddStream
so everything is set up I guess.auto c = VideoSt.Ctx;
AVDictionary* opt = nullptr;
av_dict_copy(&opt, Opt, 0);
auto ret = avcodec_open2(c, VideoCodec, &opt);What can cause Generic error in an external library ?