Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (47)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (5569)

  • ffmpeg break up videos with frame persecond

    25 mai 2018, par jameshwart lopez

    Theres a command to extract images of a video providing frame per seconds

    ffmpeg -i "vide.mp4" -vf fps=1 frames/frame_%04d.png -hide_banner

    Is there a command in ffmpeg to cut video providing fps and save it as video(.mp4 / avi) file like the command above ?

    What i currently have is i created a method to cut the videos with start and endtime but i firstly created a method to get the length of a video so that i could cut the video base on how many frames that was generated by the above command.

    def get_length(self):
           """
           Gets the length of a video in seconds

           Returns:
               float : Length of the video
           """

           print("Getting video length: " + self.video_string_path)
           command = 'ffprobe -i "'+self.video_string_path+'" -show_entries format=duration -v quiet -of csv="p=0"'
           self.command = command
           length = str(cmd.execute(command)).strip()
           print("lenght: "+length+" second(s)")
           return float(length)

    def cut(self, start_time, duration, output_file_name = 'output_file_name.mp4', save_to =''):
           """
           Cut a video on a specific start time of the video and duration.
           Check ffmpeg documentation https://ffmpeg.org/ffmpeg.html for more information about the parameters

           Parameters:
               start_time : string
                   is the value of ffmpeg -ss with the format: 00:00:00.000

               duration : string | int | float
                   is the end point where the video will be cut. Can be the same with start_time format but it could also handle integer as in seconds

               output_file_name : string
                   is the file name once the file is save in the hardisk

               save_to : string | optional
                   is the directory where the file will be saved

           Returns:
               string: file location of the cutted video

           """

           self.make_sure_save_dir_exits(save_to)
           print('Cutting ' + self.video_string_path + ' from ' + start_time + ' to ' + str(duration))
           print('Please wait...')
           file = '"' + self.save_to + output_file_name + '"'
           command = 'ffmpeg -i "' + self.video_string_path + '" -ss ' + str(start_time) + ' -t ' + str(duration) + ' -c copy -y ' + file
           self.command = command
           cmd.execute(command)

           file_loc = self.get_save_to_dir() + output_file_name
           print('Done: Output file was saved to "' + file_loc + '"')

           return file_loc + output_file_name
  • Error exporting animation ffmpeg - Matplotlib

    4 décembre 2020, par jonboy

    I'm having issues with exporting an animation using python through anaconda on a Mac. I'm getting the following RuntimeError.

    


    RuntimeError: Requested MovieWriter (ffmpeg) not available


    


    Looking at other questions, the main options are to install ffmpeg via conda :

    


    conda install -c conda-forge ffmpeg


    


    Or designate the path :

    


    plt.rcParams['animation.ffmpeg_path'] = '/usr/local/bin/ffmpeg'


    


    The second option just returns the same RuntimeError. The first option returns a separate error :

    


    BrokenPipeError: [Errno 32] Broken pipe


During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/Users/person/opt/anaconda3/lib/python3.8/site-packages/matplotlib/animation.py", line 1152, in save
writer.grab_frame(**savefig_kwargs)

  File "/Users/person/opt/anaconda3/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)

  File "/Users/person/opt/anaconda3/lib/python3.8/site-packages/matplotlib/animation.py", line 232, in saving
self.finish()

  File "/Users/person/opt/anaconda3/lib/python3.8/site-packages/matplotlib/animation.py", line 368, in finish
self.cleanup()

  File "/Users/person/opt/anaconda3/lib/python3.8/site-packages/matplotlib/animation.py", line 411, in cleanup
raise subprocess.CalledProcessError(

CalledProcessError: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '1600x1302', '-pix_fmt', 'rgba', '-r', '10', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-b', '8000k', '-vcodec', 'libx264', '-y', 'test_text.mp4']' died with .


    


    Chasing up this error then refers me back to uninstalling the ffmpeg package. But this just leads to the initial error stating ffmpeg isn't available.

    


  • FFMPEG : swr_convert error code -22

    12 juillet 2014, par Hyndrix

    I am trying to use swr_convert to convert audio between different formats. With a given set of parameters the swr_convert returns -22.

    What does this error mean ? Is there somewhere a list of error codes for FFMPEG ? I already checked the error.h header file of the FFMPEG project.

    Regards,