Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (84)

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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (15984)

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

    


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

    


  • 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