
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (62)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
(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 (...) -
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 (...)
Sur d’autres sites (8165)
-
What do the parameters in LocalMotion in vid.stab mean ? (understanding transforms.trf)
17 février 2016, par Melanie SclarI’ve been trying to understand the log file
transforms.trf
in vid.stab. I realized that it’s the local motions in each frame, but I still don’t get all the parameters.Looking at the code, in
serialize.c
I found :int storeLocalmotion(FILE* f, const LocalMotion* lm){
return fprintf(f,"(LM %i %i %i %i %i %lf %lf)", lm->v.x,lm->v.y,lm->f.x,lm->f.y,lm->f.size,
lm->contrast, lm->match);
}I imagine (v.x, v.y) is the direction of the motion vector and (f.x, f.y) is the starting point. f.size maybe means the magnitude of the vector (although (v.x, v.y) could have expressed that already), but I have no idea of what match and contrast mean. I think contrast refers to the same concept as the option ’mincontrast’, but I’m not sure what it means.
Thanks a lot !
-
Where is moviepy getting the video fps from ?
7 février 2017, par GloinI am using the Python 3 moviepy module for video editing, and I have a few videos that are taken in slow motion. When imported into moviepy, they are massively sped up, and then sit on the last frame for the rest of their duration. Note that, the videos are supposed to be normal for the first couple and last couple of seconds, then slow in the middle.
Unfortunately, I cannot provide the actual video for you to test with, but here is the relevant metadata (fetched with the command
ffprobe -v quiet -print_format json -show_format -show_streams slo-mo_movie.mov
)"r_frame_rate": "240/1",
"avg_frame_rate": "1679400/39481",
"time_base": "1/2400",For comparison, here is the equivalent metadata from a video taken, I think, from the same phone, but without slo-mo :
"r_frame_rate": "30/1",
"avg_frame_rate": "143160/4771",
"time_base": "1/600",I can import the videos in to moviepy with
clip = VideoFileClip("path/to/file.mp4")
, and then for each runprint(clip.fps)
. The first video prints2400
(not a typo from me !), and the second30
.Here is the moviepy code (in
moviepy/video/io/ffmpeg_reader.py
) at line 293) that gets the fps :# Get the frame rate. Sometimes it's 'tbr', sometimes 'fps', sometimes
# tbc, and sometimes tbc/2...
# Current policy: Trust tbr first, then fps. If result is near from x*1000/1001
# where x is 23,24,25,50, replace by x*1000/1001 (very common case for the fps).
try:
match = re.search("( [0-9]*.| )[0-9]* tbr", line)
tbr = float(line[match.start():match.end()].split(' ')[1])
result['video_fps'] = tbr
except:
match = re.search("( [0-9]*.| )[0-9]* fps", line)
result['video_fps'] = float(line[match.start():match.end()].split(' ')[1])
# It is known that a fps of 24 is often written as 24000/1001
# but then ffmpeg nicely rounds it to 23.98, which we hate.
coef = 1000.0/1001.0
fps = result['video_fps']
for x in [23,24,25,30,50]:
if (fps!=x) and abs(fps - x*coef) < .01:
result['video_fps'] = x*coef
if check_duration:
result['video_nframes'] = int(result['duration']*result['video_fps'])+1
result['video_duration'] = result['duration']
else:
result['video_nframes'] = 1
result['video_duration'] = None
# We could have also recomputed the duration from the number
# of frames, as follows:
# >>> result['video_duration'] = result['video_nframes'] / result['video_fps']If I set the slo-mo video’s fps using moviepy to 24, it outputs it the same (very fast, then still on the last frame), but if I set the slo-mo video’s fps to 20, then it outputs it correctly.
Obviously video players like VLC player and Quicktime can correctly work out what frame speed to play, but moviepy/ffmpeg fails. Moviepy/ffmpeg is getting the wrong fps from somewhere.
So, how can I get moviepy to automatically output them as they are supposed to be without human trial and error like above ?
-
c Can you use variables from other files without using include ?
2 juin 2021, par aszswazI am reading the code of the ffmpeg project.In the fftools/ffmpeg.c file of this project, there is a piece of code on line 519 :


519 if (do_benchmark) {
520 int maxrss = getmaxrss() / 1024;
521 av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss);
522 }



I use gdb to find the definition location of the do_benchmark variable :


(gdb) info variables do_benchmark
All variables matching regular expression "do_benchmark":

File fftools/ffmpeg_opt.c:
159: int do_benchmark;
160: int do_benchmark_all;



However, I cannot find a statement like include fftools/ffmpeg_opt.c in the fftools/ffmpeg.c file.I use find + grep to no avail.


$ find . -type f | xargs grep 'ffmpeg_opt'
grep: ./.git/objects/pack/pack-c2a6a6b1765b632f6fa88814ec92d3b0e4c11dad.pack:Match to binary file
grep: ./.git/index:Match to binary file
grep: ./ffmpeg:Match to binary file
./fftools/ffmpeg_opt.d:fftools/ffmpeg_opt.o: fftools/ffmpeg_opt.c fftools/ffmpeg.h config.h \
grep: ./fftools/ffmpeg_opt.o:Match to binary file
./fftools/Makefile:OBJS-ffmpeg += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
grep: ./ffmpeg_g:Match to binary file



I wanted to try a similar approach, but failed.


demo-01.c


#include "stdio.h"

int main(void){
 fptintf(stdout, "demo: %d", demo);
 return 0;
}



demo-02.c


int demo = 0;



$ gcc demo-01.c demo-02.c -o demo
demo-01.c: In the function ‘main’:
demo-01.c:4:33: Error: ‘demo’ is not declared (first use in this function)
 4 | fprintf(stdout, "demo: %d", demo);
 | ^~~~
demo-01.c:4:33: Note: Each undeclared identifier is only reported once in the function in which it appears.



why is that ?