
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 (49)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (7685)
-
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 ?
-
Inconsistant rendering in libmelt XML and C interface and 'hold' producer and avformat consumer
14 octobre 2016, par Leif AndersenI am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).
The code I have for rendering it is :
#include <framework></framework>mlt.h>
#include
#include
int main() {
if(mlt_factory_init(NULL)) {
mlt_profile p = mlt_profile_init(NULL);
mlt_consumer target = mlt_factory_consumer(p, "avformat",
mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
mlt_producer_set_in_and_out(source, 0, 10);
mlt_consumer_connect(target, mlt_producer_service(source));
mlt_consumer_start(target);
sleep(5);
mlt_consumer_stop(target);
mlt_consumer_close(target);
mlt_producer_close(source);
mlt_factory_close();
} else {
printf("No\n");
}
return 0;
}Where
logo.png
is this file.When I run this code and play
output.mp4
, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.On the other hand, if I change the consumer to be SDL, the image plays just fine.
And finally, if I change the consumer to be XML, and then use the melt command line application to render it :
melt -consumer avformat:xmlout.mp4 output.xml
and play the video, it also plays fine.
Is there something I am missing in the avformat consumer that I should be setting ? Or something else that I am missing here ?
Edit : For reference, the outputted xml file :
output.xml
is :<?xml version="1.0" encoding="utf-8"?>
<mlt version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10">
<profile description="DV/DVD PAL" width="720" height="576" progressive="0" colorspace="601"></profile>
<producer title="Anonymous Submission" in="0" out="10">
<property>15000</property>
<property>pause</property>
<property>/Users/leif/logo.png</property>
<property>1.06667</property>
<property>0</property>
<property>onefield</property>
<property>hold</property>
<property>1</property>
</producer>
</mlt> -
Inconsistant rendering in mlt XML and C interface and 'hold' producer and avformat consumer
14 octobre 2016, par Leif AndersenI am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).
The code I have for rendering it is :
#include <framework></framework>mlt.h>
#include
#include
int main() {
if(mlt_factory_init(NULL)) {
mlt_profile p = mlt_profile_init(NULL);
mlt_consumer target = mlt_factory_consumer(p, "avformat",
mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
mlt_producer_set_in_and_out(source, 0, 10);
mlt_consumer_connect(target, mlt_producer_service(source));
mlt_consumer_start(target);
sleep(5);
mlt_consumer_stop(target);
mlt_consumer_close(target);
mlt_producer_close(source);
mlt_factory_close();
} else {
printf("No\n");
}
return 0;
}Where
logo.png
is this file.When I run this code and play
output.mp4
, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.On the other hand, if I change the consumer to be SDL, the image plays just fine.
And finally, if I change the consumer to be XML, and then use the melt command line application to render it :
melt -consumer avformat:xmlout.mp4 output.xml
and play the video, it also plays fine.
Is there something I am missing in the avformat consumer that I should be setting ? Or something else that I am missing here ?
Edit : For reference, the outputted xml file :
output.xml
is :<?xml version="1.0" encoding="utf-8"?>
<mlt version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10">
<profile description="DV/DVD PAL" width="720" height="576" progressive="0" colorspace="601"></profile>
<producer title="Anonymous Submission" in="0" out="10">
<property>15000</property>
<property>pause</property>
<property>/Users/leif/logo.png</property>
<property>1.06667</property>
<property>0</property>
<property>onefield</property>
<property>hold</property>
<property>1</property>
</producer>
</mlt>