Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (23)

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

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (4899)

  • Concatenate two files while keeping the duration the same as the two files separately

    21 septembre 2020, par John Pollard

    When I calculate the duration of each individual file I want to concatenate I get 10.24 for both. So I figured when I concatenate the two files I would get a duration of file A plus file B or 10.24 + 10.24 giving me a total duration of 20.48 for the combined file. But no matter what command I use to concentrate I cannot get the same duration. Am I doing something wrong ?

    


    ffprobe -i "audioA.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24 


    


    ffprobe -i "audioB.mp3" -show_entries format=duration -v quiet -of csv="p=0"
10.24 


    


    Which makes a total of 10.24 + 10.24 = 20.48 seconds

    


    But when I concatenate the files I get a different duration. Here are my different tries.

    


    Try 1

    


    FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' -map 0:a -codec:a copy -map_metadata -1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.610612


    


    Try 2

    


    FFMPEG -y -i audioA.mp3 -i audioB.mp3 -filter_complex [0:a][1:a]concat=n=2:v=0:a=1 output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0
20.453878


    


    Try 3

    


    FFMPEG -y -i 'concat:audioA.mp3|audioB.mp3' output.mp3
ffprobe -i "output.mp3" -show_entries format=duration -v quiet -of csv="p=0"
20.506122


    


      

    • Is there a command to use to concatenate that will output a file with
the same duration ?
    • 


    • Is there a way to do that without reencoding ?
    • 


    • What makes the durations different in the combined files above ?
    • 


    


  • Cross Fade Arbitrary Number of Videos ffmpeg Efficiently

    15 avril 2022, par jippyjoe4

    I have a series of videos named 'cut_xxx.mp4' where xxx represents a number 000 through 999. I want to do a cross fade on an arbitrary number of them to create a compilation, and each fade should last 4 seconds long. Currently, I'm doing this with Python, but I suspect this is not the most efficient way :

    


    import subprocess    
def get_length(filename):
  result = subprocess.run(["ffprobe", "-v", "error", "-show_entries",
                          "format=duration", "-of",
                          "default=noprint_wrappers=1:nokey=1", filename],
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT)
  return float(result.stdout)

CROSS_FADE_DURATION = 4

basevideo = 'cut_000.mp4'
for ii in range(total_videos - 1):
  fade_start = math.floor(get_length(basevideo) - CROSS_FADE_DURATION) # new one
  outfile = f'cross_fade_{ii}.mp4'
  append_video = f'cut_{str(ii+1).zfill(3)}.mp4'
  cfcmd = f'ffmpeg -y -i {basevideo} -i {append_video} -filter_complex "xfade=offset={fade_start}:duration={CROSS_FADE_DURATION}" -an {outfile}'
  basevideo = outfile
  subprocess.call(cfcmd)
  print(fade_start)


    


    I specifically remove the audio with -an because I'll add an audio track later. The issue I see here is that I'm compressing the video over and over again with each individual video file I add to the compilation because I'm only adding one video at a time and then re-encoding.

    


    There should be a way to cross fade multiple videos together into a compilation, but I'm not sure what this would look like or how I would get it to work for an arbitrary number of video files of different durations. Any idea on what that monolithic ffmppeg command would look like or how I could automatically generate it given a list of videos and their durations ?

    


  • How to create an animated GIF using FFMPEG with an interval ?

    26 octobre 2014, par Jeff Wilbert

    Hello fellow overflowers,

    A brief overview of what I’m trying to accomplish ; I have a site that will accept video uploads, uploads get converted into the mp4 format to be uniformed and playable on the web using one of the many available players. That part is all fine and dandy.

    The problem now is I want to show the user a short scaled preview (animated gif) of the video before they click to play it. The code I’m working with now is

    ffmpeg -i test.mp4 -vf scale=150:-1 -t 10 -r 1 test.gif

    Which works for creating a scaled animated gif with a fixed width of 150px at a rate of 1 frame per second but its only an animation of the first 10 seconds of the video. I’m trying to do something that spreads out the frame gap to cover the whole video length but create an animated gift that’s no more then 10 seconds long.

    For example say I have a video that’s 30 seconds I want the gif to be 10 seconds long but cover frames of the entire 30 seconds so it might start at frame 3 or 3 seconds in and create a frame in the gif, then at 6 seconds in the video create another frame, then 9 seconds in another, and so forth where the final outcome is

       example video 30 seconds long          example video 1 minute 45 second long

    video position - gif frame/per second      video position - gif frame/per second
         00:03:00   1                               00:10:50   1
         00:06:00   2                               00:21:00   2
         00:09:00   3                               00:31:50   3
         00:12:00   4                               00:42:00   4
         00:15:00   5                               00:52:50   5
         00:18:00   6                               01:03:00   6
         00:21:00   7                               01:13:50   7
         00:24:00   8                               01:24:00   8
         00:27:00   9                               01:34:50   9
         00:30:00   10                              01:45:00   10

     3 second interval between frames         10.5 second interval between frames

    Where you end up with an animated gif that’s 10 seconds long showing a preview of the entire video no matter the length of it. Which basically just boils down to
    video length / 10 (length of desired animated gif) = interval to use between frames but I don’t know how I can use that data to accomplish my problem...

    So does anyone have an idea or suggestion on how this can be accomplished with relative ease ? I can probably do it by calculating the length through code and running a command to extract each individual frame from the video that’s needed then generate a gif from the images but I’d like to be able to do it all with just one command. Thanks.