Recherche avancée

Médias (1)

Mot : - Tags -/intégration

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

Sur d’autres sites (12857)

  • How to return width and height of a video/image using ffprobe & batch

    7 octobre 2023, par user780756

    I need to get the width and height of an image file using ffprobe and need to store it in variables using batch (Windows) so I can later use those values.

    



    I tried to do this,

    



    @echo off
for /f "tokens=1-2" %%i in ('ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=width,height %1') do set W=%%i & set H=%%j
echo %W%
echo %H%


    



    But fails to execute with

    



    Argument '_' provided as input filename, but 's' was already specified.


    



    p.s. I also tried imagemagick identify in a similar way, but it seems that identify has a bug when returning height for GIF files

    


  • How to get the real, actual duration of an MP3 file (VBR or CBR) server-side

    27 janvier 2021, par SquareCat

    I used to calculate the duration of MP3 files server-side using ffmpeg - which seemed to work fine. Today i discovered that some of the calculations were wrong. Somehow, for some reason, ffmpeg will miscalculate the duration and it seems to happen with variable bit rate mp3 files only.

    



    When testing this locally, i noticed that ffmpeg printed two extra lines in green.

    



    Command used :

    



    ffmpeg -i song_9747c077aef8.mp3


    



    ffmpeg says :

    



    [mp3 @ 0x102052600] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0x102052600] Estimating duration from bitrate, this may be inaccurate


    



    After a nice, warm google session, i discovered some posts on this, but no solution was found.

    



    I then tried to increase the maximum duration :

    



    ffmpeg -analyzeduration 999999999 -i song_9747c077aef8.mp3


    



    After this, ffmpeg returned only the second line :

    



    [mp3 @ 0x102052600] Estimating duration from bitrate, this may be inaccurate


    



    But in either case, the calculated duration was just plain wrong. Comparing it to VLC i noticed that there the duration is correct.

    



    After more research i stumbled over mp3info - which i installed and used.

    



    mp3info -p "%S" song_9747c077aef8.mp3


    



    mp3info then returned the CORRECT duration, but only as an integer, which i cannot use as i need a more accurate number here. The reason for this was explained in a comment below, by user blahdiblah - mp3info is simply pulling ID3 info from the file and not actually performing any calculations.

    



    I also tried using mplayer to retrieve the duration, but just as ffmpeg, mplayer is returning the wrong value.

    


  • Running an FFprobe process in Xcode to return file duration data

    24 octobre 2019, par NCrusher

    Using this example, I was able to create a process to run ffmpeg from the main resource bundle of a MacOS app. The fact that I was able to get it to work, however, was really dumb luck.

    But now I need to be able to do something similar with ffprobe, along the lines of what is discussed in this post, to get the duration of an audio file in order to trim a set number of seconds off the end of it, using these arguments :

    ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 input.m4b

    But I don’t know how to implement it. This is basically what I want to accomplish :

       func insertTrimArguments() {
           conversionSelection()
           if trimStartEndClipsCheckbox.state == .on {
               ffmpegArguments.insert(contentsOf: ["-ss", "00:00:02.000", /*"-t", "duration minus 4.2secs"]*/, at: 3)
           }
           else {
           }
       }

    I haven’t been coding in Swift long and processes are entirely new for me and not something that was ever covered in any of the "fundamentals" tutorials I studied before I began my project. Taking the monkey-see/monkey-do approach from the first example I linked, I can sort of make a start imitating it for my ffprobe function, but I have no idea if I’m doing it right or where to go with it from here.

    This is all I have so far.

       // get file duration and subtract 4.2 seconds if "trim audible clips is enabled, then insert additional arguments into conversionSelection arrays
       func getFileDuration() {
           guard let ffprobePath = Bundle.main.path(forResource: "ffprobe", ofType: "") else { return }
           do {
               let ffprobeTask: Process = Process()
               ffprobeTask.launchPath = ffprobePath
               ffprobeTask.arguments = [
                   "-v", "error",
                   "-show_entries",
                   "format=duration", "-of",
                   "compact=p=0:nk=1",
                   "\(inputFilePath)"]
               ffprobeTask.standardInput = FileHandle.nullDevice
               ffprobeTask.launch()
               ffprobeTask.waitUntilExit()
           }
       }

    How do I adapt this process so that instead of converting and outputing a new file, it returning the duration of the input file so that I can do the necessary math and include it in my arguments ?