
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (77)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (4699)
-
Error due to calling audio_loop in moviepy
9 juin 2020, par Nosterto have music play in the background of a video that has its own audio, and loop until the end of the video i am using the following code. however audio_loop is causing and error after the video is done writing. the song is 67 seconds long, and if i set
duration = 66
or below I get no error but any time over causes an error.


final_clip = concatenate_videoclips([*vidclip], method='compose')

count=0
for file in os.listdir(TO):
 if file.endswith('.mp4'):
 count+=1

finalClipName = "{}Final.mp4".format(count)
music = AudioFileClip('song.mp3')
audio_background = afx.audio_loop(music, duration = final_clip.duration)#ERROR
final_audio = CompositeAudioClip([final_clip.audio, audio_background])
final_clip = final_clip.set_audio(final_audio)
final_clip.write_videofile(finalClipName, fps=10)




The error at question



Exception ignored in: <function at="at" 0x0000026346d3baf8="0x0000026346d3baf8">
Traceback (most recent call last):
 File "C:\Users\Eric\Projects\Videdit\venv\lib\site-packages\moviepy\audio\io\readers.py", line 254, in __del__
 self.close_proc()
 File "C:\Users\Eric\Projects\Videdit\venv\lib\site-packages\moviepy\audio\io\readers.py", line 150, in close_proc
 self.proc.terminate()
 File "C:\Users\Eric\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1314, in terminate
 _winapi.TerminateProcess(self._handle, 1)
OSError: [WinError 6] The handle is invalid
</function>


-
problem with changing the frames in an video with opencv
5 septembre 2023, par AvizipiI have a code that runs in the last few months without any problem. The code shows an image from a video with extra data from the relevant db. using the keyboard you can jump around some frames and get better insights. However, in the last week changing the frame of the video stopped working.


I built a small script that show the problem.


import cv2

vid_cap_reader_path = "vid_230830_122746_C.avi"
cap_rgb = cv2.VideoCapture(vid_cap_reader_path)

k = 0
while 1:
 if k == ord("q"):
 break
 if k == ord("b"):
 before = cap_rgb.get(cv2.CAP_PROP_POS_FRAMES)
 cap_rgb.set(cv2.CAP_PROP_POS_FRAMES, before + 30.0)
 after = cap_rgb.get(cv2.CAP_PROP_POS_FRAMES)
 print(f"before = {before} after = {after}")
 ret, img = cap_rgb.read()
 if ret:
 cv2.imshow("bla", img)
 k = cv2.waitKey(0)
 else:
 break



This is what is printed to the terminal :


[mpeg4 @ 0x1d87400] warning: first frame is no keyframe
before = 36.0 after = 0.0
before = 67.0 after = 0.0
[mpeg4 @ 0x1d87400] warning: first frame is no keyframe
before = 40.0 after = 0.0
[mpeg4 @ 0x1d87400] warning: first frame is no keyframe



The video itself doesn't "jump" for the next frame as expected and also most of the properties that opencv have return 0. I tested also
CAP_PROP_FRAME_COUNT
, andCAP_PROP_POS_MSEC
without any lack, although the msec flag did give non-zero results which make no sense.

It is also important to mention that I am building this application in a docker file and I am not using a specific version for my requirements. The tests here are with
opencv-python==4.7.0.68
. Also, the videos are working fine while playing them on VLC.

I was looking around the net for a similar problem from the recent time and didn't find much except this github issue that may be similar. I started to downgrade opencv one by one without any luck.


Maybe someone here can help with this issue, or give me a lead to doing something different.


-
Simple mp3 audio extract from video (mp4/avi/webm etc) using Python script (moviepy)
28 mai 2016, par BamI’m trying to run this very simple python script to extract mp3 from a video.
Here’s the code :
import moviepy.editor as mp
clip = mp.VideoFileClip("test.webm")
clip.audio.write_audiofile("test.mp3")I’m running this on a Mac and moviepy/ffmpeg seem to be correctly installed. I get the following error :
Traceback (most recent call last):
File "/Users/XXXXXX/Code/python/000014 - convert mp4 to mp3.py", line 2, in <module>
clip = mp.VideoFileClip("test.webm")
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 55, in __init__
reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 32, in __init__
infos = ffmpeg_parse_infos(filename, print_infos, check_duration)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 250, in ffmpeg_parse_infos
if "No such file or directory" in lines[-1]:
IndexError: list index out of range
</module>The source file is in the same directory as the code is being run in.
The same code ran fine on a Windows pc.
Any ideas ? thanks