Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (79)

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

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

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

Sur d’autres sites (6044)

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

    


  • getruntime() exec() with double quotes in command

    29 décembre 2012, par brux

    I want to execute an ffmpeg command, the method I am using works with every command on my list except the following one which contains double quotes to set a filter (-vf) parameter

    ffmpeg -i 2012-12-27.mp4 -vf "movie=bb.png [movie]; [in] [movie] overlay=0:0 [out]" -vcodec libx264 -acodec copy out.mp4

    I have tried changing the quotes for single quotes with no luck. The command works at the android terminal with both single and double quotes.

    The app I'm developing uses about 5 ffmpeg commands, all work except this one, is this some bug ?

    I can't find a concrete solution to this problem, breaking the args into an array and then passing this to runtime().exec() as suggested elsewhere doesn't seem to work, or simply trying to escape the quotes with \" won't work.

    Both of the files referenced in the above command are located in the sdcard, I removed the concatenation of the command out so that things don't get messy, rest assured these commands work in a terminal when referencing the full paths to the files.
    I contatenate the string passed to getRuntime().exec() using a stringbuilder and`getexternalstorageDirectory().getabsolutepath() to get the path to each file like I have been doing with previous commands when using the process class.

    I am using Jelly Bean 4.2 in case that is of any significance.

  • How to extract single image (with different name each time) from multiple videos in the one folder using ffmpeg bash script

    15 juillet 2014, par morriscotty_sd

    Let’s start with this... I’m fairly new to Linux.

    I have been looking into ffmpeg to extract an image from a video using the terminal. I’ve accomplished this using this piece of code :

      ffmpeg  -itsoffset -4  -i oggvideo.ogg -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 oggThumb.jpg

    I run this when I’m in the directory which holds the videos in my project. But what I want is to extract an image from all videos in that folder at the same time, naming the image corresponding with the video name it’s extracted from. My end goal is to have a folder which will hold videos that a user uploads, and at a certain time the script will run and extract images from the uploaded videos, saving the image path to a database.

    I found this line of code :

    for %%i in (*.mp4) do ffmpeg -ss 20 -i %%i -t 1 -s 590x340 -f image2 %%i.jpg

    from this site : Trying-to-extract-1-image-from-multiple-videos-with-FFMPEG

    I run that in the terminal and it gives me the error : ’bash : syntax error near unexpected token `(’’
    I tried removing the ’( )’ but then it just takes me onto a new line. This is where I’m having the most problems due to being relatively new to linux commands.

    Any suggestions or advice would be very helpful.