Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (111)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

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

  • FFMPEG hold multiple frames and use as a movie

    18 juin 2019, par Cole

    I have a video that I’m trying to create jump shots from. For example I want the output of my command to show frame 5 of the original clip for 30 frames, and frame 25 of the OG clip to show for 30 frames.

    assuming the OG clip is 30 FPS

    ffmpeg -t 1 -i og_clip.mp4 -filter_complex "
       [0]select=eq(n\,5)[H1];[0][H1]overlay[O1];
       [0]select=eq(n\,25)[H2];[0][H2]overlay[O2];
       [O1][O2]concat=n=2[Merge]" -map "[Merge]" out.mp4

    The above doesnt work right.

    What I’ve been doing up until now has been a two part command :

    ffmpeg -i og_clip.mp4 -vf "select=eq(n\,5)" -vframes 1 -y out_0.png
    ffmpeg -i og_clip.mp4 -vf "select=eq(n\,25)" -vframes 1 -y out_1.png
    ffmpeg -t 1 -i og_clip.mp4 -i out_0.png -i out_1.png -filter_complex "
       [0][1]overlay[H1];[0][2]overlay[H2];
       [H1][H2]concat=n=2[Merge]" -map "[Merge]" out.mp4

    Which has been working for me. The only problem is that the process of converting to a png first for each frame I want to use, takes too long. I’m trying to condense it all into one command. I figure that the encoding of the png is what takes so long.

    Any help would be much appreciated !

  • Handling an arbitrary number of start and stop time pairings to cut a movie file down

    9 juin 2019, par Kieran

    I am writing a function that takes a list of tuples and a file path string as arguments and outputs a cut down video that only includes the frames that fall inside the start/stop pairings provided.

    I’m getting stuck because I am not sure whether the .trim() method of the ’infile’ object is altering the existing object or or creating a new one or doing something else entirely.

    the list of start/stop frame pairings can be arbitrarily long, every example I have found has been for a specific number of start and stop pairings and I can’t find anything describing what data structure needs to be passed back to ffmpeg.concat().

    My code is displayed below :

    import ffmpeg

    frameStamps = [(50,75),(120,700),(1250,1500)]
    videoFilePath = 'C:/Users/Kieran/Videos/testMovie.mp4'
    outputFolder = 'C:/Users/Kieran/Videos/'

    def slice_video(frameStamps, videoFilePath, outputFolder):

       originalFile = ffmpeg.input(videoFilePath)

       for stamp in frameStamps:
           ffmpeg.concat(originalFile.trim(start_frame=stamp[0], end_frame=stamp[1]))


       ffmpeg.output(outputFolder + 'testoutput.mp4')
       ffmpeg.run()

    slice_video(frameStamps, videoFilePath, outputFolder)

    Now I am able to get the following when I individually print out originalFile.trim() which are getting recognised in the console as "FilterableStream" objects

    trim(end_frame=75, start_frame=50)[None] <29b4fb0736ec>
    trim(end_frame=700, start_frame=120)[None] <c66c4e1a48f5>
    trim(end_frame=1500, start_frame=1250)[None] &lt;13e0697a5288>  
    </c66c4e1a48f5>

    and I have tried passing them back as a list, dictionary and tuple and haven’t been able to get it working

    Output Errors :

     File "C:/Users/Kieran/Example.py", line 21, in slice_video
    ffmpeg.output(outputFolder + 'testoutput.mp4')

     File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\_ffmpeg.py", line 94, in output
    return OutputNode(streams, output.__name__, kwargs=kwargs).stream()

     File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 282, in __init__
    kwargs=kwargs

     File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 170, in __init__
    self.__check_input_len(stream_map, min_inputs, max_inputs)

     File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 149, in __check_input_len
    raise ValueError('Expected at least {} input stream(s); got {}'.format(min_inputs, len(stream_map)))

    ValueError: Expected at least 1 input stream(s); got 0
  • Cutting movie with ffmpeg result in audio/video desync

    15 mai 2020, par T4ng10r

    I've concate long ago set of movies taken during some lecture. Now I want to cut them for each question/answer.

    &#xA;&#xA;

    I do it like this.

    &#xA;&#xA;

    &#xA;

    ffmpeg -ss 00:00:34.7 -t 00:10:44.6 -y -i input_movie.mp4 -vcodec copy -acodec copy output_1.mp4

    &#xA; &#xA;

    ffmpeg -ss 00:11:22.2 -y -i input_movie.mp4 -vcodec copy -acodec copy output_2.mp4

    &#xA;

    &#xA;&#xA;

    Yet, for the second part I can't set proper starting point so audio and video would be in sync.
    &#xA;Usually I could fix it with small tweeks in cut start time (like .1, .2, and so on). For this case this doesn't work.
    &#xA;When I play second cut in mplayer video is few second behind audio (where audio is cut properly). When I jump forward and back - all is again in sync.

    &#xA;&#xA;

    Where's the problem ? How to fix it ?

    &#xA;