Recherche avancée

Médias (0)

Mot : - Tags -/interaction

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (32)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • 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 (...)

Sur d’autres sites (3683)

  • moviepy ruining video after combining them

    1er juin 2020, par jjakeryan

    I'm trying to make a program that downloads videos from TikTok and combines all the separate videos into one .mp4 file and moves the final video to a folder on my desktop. I've been able to make it download all the videos and when I watch the separate videos they play fine however when I combine the videos some of the videos are messed up and look like this but the audio is fine.video looks like this

    



    #slecting all .mp4 files
    video_files = glob.iglob("*.mp4")

    print(video_files)
    clips = []

    for clip in video_files:  # For each mp4 file name
        clips.append(VideoFileClip(clip))  # Store them as a VideoFileClip and add to the clips list

    today = date.today()

    final = concatenate_videoclips(clips)  # Concatenate the VideoFileClips
    final.write_videofile(f"{today}.mp4", codec="libx264")


#moving completed video to folder on desktop
    shutil.move(f'{today}.mp4', '/Users/jacobmarrandio/Desktop/done_videos/')


    



    thanks for any help

    


  • Can't save a file in moviepy python

    23 juillet 2023, par user9102437

    I have seen a few questions about this here, but none of them solved the issue for me, so maybe my case is different in some way.

    


    I am trying to achieve a simple result : read a file and write it. Here is the code :

    


    import os
os.environ['FFMPEG_BINARY'] = '/usr/bin/ffmpeg'

from moviepy.editor import VideoFileClip
name = 'test.mp4'

clip = VideoFileClip('./vids/'+name)

clip.write_videofile('./vids/'+name, codec='libx264', fps=30)


    


    This code comes up with an error :

    


    ---> 88     '-r', '%.02f' % fps,
     89     '-an', '-i', '-'
     90 ]
     91 if audiofile is not None:
     92     cmd.extend([
     93         '-i', audiofile,
     94         '-acodec', 'copy'
     95     ])

TypeError: must be real number, not NoneType


    


    You may notice that I have set the environment variable for ffmpeg (I have also changed that in configure_defaults.py). This is because it was suggested in other questions. Also based on them I have run the following commands before running the code :

    


    sudo apt -y update
sudo apt -y install ffmpeg
pip install decorator
pip install moviepy --upgrade
pip install ffmpeg --upgrade


    


    I am using a Debian GNU/Linux 10 (buster) machine, and the versions of moviepy and ffmpeg are 1.0.3 and 4.1.10-0+deb10u1 respectively.

    


    Nothing seems to be helping to solve this. What am I missing here ?

    


  • How to utilize multiprocessing and multithreading efficiently to convert 1000s of video files to audio using python in parallel

    8 février 2021, par Sachin Kumar S

    I tried to convert video files to audio using moviepy python package. it works perfectly fine.
However, I have 1500 100MB sized videos and I want to convert all of them to audio files. It takes a lot of time with the standard approach.

    


    Code to convert one video file to audio :

    


    import moviepy.editor as mp
clip = mp.VideoFileClip('file.mp4') 
clip.audio.write_audiofile(r"file.mp3")


    


    I can also use threading to convert multiple files at the same time but I want to utilize multiprocessing and multithreading both to achieve the result most efficiently with less time complexity.

    


    Algo using threading only :

    


    clip1...clip10= make 10 lists with 150 files names from os.listdir()
spawn 10 threads to process 10 files at a time.

t1= Thread(target=convert, args=(clips1))
.
.
.
t10= Thread(target=convert, args=(clips2))


    


    Any Ideas ?