Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (31)

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

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (4642)

  • ffmpeg concatenating videos of different fps while keeping the total length not changed

    23 novembre 2017, par A_Matar

    I wanna pad an mp4 video stream with another video clip of a static image that I created using :

    def generate_white_vid (duration):
       output_filename = os.path.join(p_path,'white_vid_'+" 0:.2f}".format(duration)+'.mp4')
       ffmpeg_create_vid_from_static_img = 'ffmpeg -loop 1 -i /path/WhiteBackground.jpg -c:v libx264 -t %f -pix_fmt yuv420p -vf scale=1920:1080 %s' % (duration, output_filename)
       p = subprocess.Popen(ffmpeg_create_vid_from_static_img, shell=True)
       p.communicate()
       return output_filename

    I use the following to concatenate :

    def concat_vids(clip_paths):
       filenames_txt = open('clips_to_join.txt','w')
       for clip in clip_paths:
           filenames_txt.write ('file \''+ clip+'\'\n')
       filenames_txt.close()
       output_filename = clip_paths[0].split('.', 2)[0]
       output_file_path = os.path.join(root_path, output_filename+'-padded.mp4')
       # join the clips
       ffmpeg_command = ["ffmpeg", "-f", "concat", "-safe", "0", "-i", "clips_to_join.txt", "-codec", "copy", output_file_path] # output_filename = ch0X-start_time-end_time
       p = subprocess.Popen(ffmpeg_command)
       p.communicate() # wait till the subprocess finishes. You can send commands to process as well.
       return output_file_path

    When I check the length of the resulting video after concatenation, I find that it is not equal to the sum of the two segments that I concatenated, and sometimes it is even less by some seconds !!

    Here is how I get the video length in seconds :

    def ffmpeg_len(vid_path):
       '''
       Returns length in seconds using ffmpeg
       '''
       ffmpeg_get_mediafile_length = ['sh', '-c', 'ffmpeg -i "$1" 2>&1 | grep Duration', '_', vid_path]
       p = subprocess.Popen(ffmpeg_get_mediafile_length, stdout=subprocess.PIPE, stderr=subprocess.PIPE)    
       output, err = p.communicate()
       length_regexp = 'Duration: (\d{2}):(\d{2}):(\d{2})(\.\d+),'
       re_length = re.compile(length_regexp)
       matches = re_length.search(output)
       if matches:
           video_length = int(matches.group(1)) * 3600 + \
                           int(matches.group(2)) * 60 + \
                           int(matches.group(3)) + float(matches.group(4))
           return video_length
       else:
           print("Can't determine video length.")
           print err
           raise SystemExit

    My guess is that maybe the concatenation unifies the fps rate for the all the clips to be joined, if this is the case, how to prevent this from happening ? How can I get a video of the desired length exactly.

    Maybe it worth mentioning that the video to padded is very short 0.42 second, the original video is 210.58 and the resultant video is 210.56 !

    I have verified that ffmpeg does generate the desired padding region and it is of the desired length 0.42 I got a 0.43 segment when I forced 30 fps but it is okay.

  • lavfi/transpose : restore validity of values in range 4-7

    27 avril 2013, par Stefano Sabatini
    lavfi/transpose : restore validity of values in range 4-7
    

    They were lost in commit a4e0defa75b6f766aa31d80c55688d036b5fd87b.

    • [DH] libavfilter/vf_transpose.c
  • Normalize input with equal length streams

    16 décembre 2020, par user319862

    How can I use ffmpeg to take an arbitrary input file and have the output make audio and video streams equal length starting at time 0. The audio padded with silence. And the video repeating the first frame on the beginning and the last frame on the end.

    


    Edited for clarity :

    


    If the video content starts after the sound, I would like to take the first frame and show it from 0 until the video starts.

    


    If the video content stops before the sound, I would like to take the last frame of the video and display it until the audio stops.

    


    If the audio starts after the video, I would like to pad the gap with silence. If the audio stops before the video, I would like to pad the gap with silence.