
Advanced search
Other articles (100)
-
Dépôt de média et thèmes par FTP
31 May 2013, byL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Le plugin : Podcasts.
14 July 2010, byLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 video/mp4 (...) -
Qu’est ce qu’un éditorial
21 June 2013, byEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
On other websites (8783)
-
FFMpeg kmsgrab record pixels wrong
21 April 2020, by Alex Joelffmpeg -f kmsgrab -i - -framerate 60 -vf 'hwdownload,format=bgr0' -preset ultrafast out.mkv



This is how a video frame should look like


This is how it is recorded by ffmpeg

https://drive.google.com/file/d/11jOUTk3ZxOfwnfd7zS4d4qBLApTS3Vmx/view?usp=sharing


-
issue starting ffmpeg screen capture on OSX (AVFoundation) from Java
24 June 2022, by steworiI 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 that1
is the correct index for the screen. I ran that command also viaRuntime.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, withRuntime.exec
and viaProcessBuilder
.















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 April 2024, by Muhammad Danish QureshiI 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
inString(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.



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



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



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