
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (79)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (...)
Sur d’autres sites (7670)
-
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 ?


-
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 ?
-
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 !