Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (77)

  • Organiser par catégorie

    17 mai 2013, par

    Dans 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, par

    Utilité
    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 2011

    Contrairement à 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 Noster

    to 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">&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\Eric\Projects\Videdit\venv\lib\site-packages\moviepy\audio\io\readers.py", line 254, in __del__&#xA;    self.close_proc()&#xA;  File "C:\Users\Eric\Projects\Videdit\venv\lib\site-packages\moviepy\audio\io\readers.py", line 150, in close_proc&#xA;    self.proc.terminate()&#xA;  File "C:\Users\Eric\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1314, in terminate&#xA;    _winapi.TerminateProcess(self._handle, 1)&#xA;OSError: [WinError 6] The handle is invalid&#xA;</function>

    &#xA;

  • problem with changing the frames in an video with opencv

    5 septembre 2023, par Avizipi

    I 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.

    &#xA;

    I built a small script that show the problem.

    &#xA;

    import cv2&#xA;&#xA;vid_cap_reader_path = "vid_230830_122746_C.avi"&#xA;cap_rgb = cv2.VideoCapture(vid_cap_reader_path)&#xA;&#xA;k = 0&#xA;while 1:&#xA;    if k == ord("q"):&#xA;        break&#xA;    if k == ord("b"):&#xA;        before = cap_rgb.get(cv2.CAP_PROP_POS_FRAMES)&#xA;        cap_rgb.set(cv2.CAP_PROP_POS_FRAMES, before &#x2B; 30.0)&#xA;        after = cap_rgb.get(cv2.CAP_PROP_POS_FRAMES)&#xA;        print(f"before = {before} after = {after}")&#xA;    ret, img = cap_rgb.read()&#xA;    if ret:&#xA;        cv2.imshow("bla", img)&#xA;        k = cv2.waitKey(0)&#xA;    else:&#xA;        break&#xA;

    &#xA;

    This is what is printed to the terminal :

    &#xA;

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

    &#xA;

    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, and CAP_PROP_POS_MSEC without any lack, although the msec flag did give non-zero results which make no sense.

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

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

    &#xA;

  • Simple mp3 audio extract from video (mp4/avi/webm etc) using Python script (moviepy)

    28 mai 2016, par Bam

    I’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