Recherche avancée

Médias (91)

Autres articles (33)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (2881)

  • FFMpeg kmsgrab record pixels wrong

    21 avril 2020, par Alex Joel

    ffmpeg -f kmsgrab -i - -framerate 60 -vf 'hwdownload,format=bgr0' -preset ultrafast out.mkv

    



    This is how a video frame should look like
kitty terminal emulator in the wayland
This is how it is recorded by ffmpegkitty terminal emulator in the waylandweston-simple-egl
https://drive.google.com/file/d/11jOUTk3ZxOfwnfd7zS4d4qBLApTS3Vmx/view?usp=sharing

    


  • issue starting ffmpeg screen capture on OSX (AVFoundation) from Java

    24 juin 2022, par stewori

    I would like to launch from Java on OSX a screen capture command like explained here : https://trac.ffmpeg.org/wiki/Capture/Desktop

    



    It works fine from the terminal. But when I launch exactly the same command using Java's Runtime.exec I get the following output :

    



    [AVFoundation input device @ 0x7f892f500400] Video device not found

'1:': Input/output error


    



    Assume the command I run is stored as String cmd = "ffmpeg -f avfoundation -i '1:' output.mkv". Things I tried :

    



      

    • Using ffmpeg -f avfoundation -list_devices true -i "" I asserted that 1 is the correct index for the screen. I ran that command also via Runtime.exec and it gives the same indexes as when I run it from terminal.

    • 


    • It does not make a difference whether I use '1:' or "\"1:\"". Well, in the latter case it says "1:": Input/output error. Both variants work in terminal.

    • 


    • Neither does it make a difference whether I call
Runtime.getRuntime().exec(cmd),
Runtime.getRuntime().exec(cmd.split(" ")) or (new ProcessBuilder(cmd.split(" "))).start(). In principle it starts ffmpeg and that terminates with the output given above.

    • 


    • It does not seem to make a difference whether I read out ffmpeg's output or not (via process.getErrorStream())

    • 


    • The only thing that works is to store the command in a file, e.g. in run.sh and then call e.g. Runtime.getRuntime().exec("run.sh"). It should be possible to execute this properly from Java without this kind of workaround, right ? What am I doing wrong ?

    • 


    • On Linux, using e.g. ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 output.mp4 it works fine, from command line or from Java, with Runtime.exec and via ProcessBuilder.

    • 


    



    I did not try it on Windows. On OSX (Mojave 10.14.5) I used Java 12, on Linux (Mint 18, 64bit) Java 8. Would be some hassle to try it with Java 12 on Linux and I suspect the Java version is not the cause, given that avfoundation vs x11grab is the far more dominant difference.

    


  • Swift A script of macOS is not running on the M2 chip ?

    15 avril 2024, par Muhammad Danish Qureshi

    I am making a macOS app using SwiftUI, app is working fine on mac Intel chip, mac Apple M1 chip but not working on the mac M2 chip.
Below is the following code which is crashing on M2 chip for force unwrapping the data in String(data: data!, encoding: .utf8).

    


    I know that force unwrap is not suitable, but for testing purpose I am doing force unwrap.

    


    When I run the which ffmpeg in terminal it provides the path in result, no matter which mac terminal is (it always return actual path of ffmpeg), but when run this command from the swift Program it does not found anything and got crashed on apple M2 chip.

    


    My actual scenario (or requirement) is I need to get the path using the command which ffmpeg and write that path in the file on macOS app.

    


    Kindly guide me why the code is crashing or not providing the actual path.

    


    func findFFmpegPath() -> String? {
            let task = Process()
            task.launchPath = "/bin/bash" // Path to bash shell
            task.arguments = ["-l", "-c", "which ffmpeg"] // Execute "which ffmpeg" command
    let pipe = Pipe()
    task.standardOutput = pipe
    task.standardError = pipe // Capture any errors as well

    do {
        try task.run()
        let data = try pipe.fileHandleForReading.readToEnd()
        let output = String(data: data!, encoding: .utf8)
        print("data:\(data)\n\(output)\n\(output?.trimmingCharacters(in: .whitespacesAndNewlines))")
        return output?.trimmingCharacters(in: .whitespacesAndNewlines)
    } catch {
        print("Error running task: \(error)")
        return nil
    }
}


    


    When I run which ffmpeg in the terminal it gives me path correctly, See the screenshot bleow.

    


    enter image description here

    


    When I run the /bin/bash -l -c "which ffmpeg" in the M2 than I got this result.

    


    enter image description here

    


    When I run the /bin/bash -l -c "which ffmpeg" in the Apple M1 than I got this result.

    


    enter image description here

    


    Getting desired result in the terminal, but not getting result from the Swift Program.