
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (104)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 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 (...)
Sur d’autres sites (6940)
-
Révision 17908 : html des .menu .menu-items .item
17 mai 2011, par cedric -extraire les styles qui vont dans la css lists.css.html (a venir)
-
How to downscale video using subprocess and then piping the data over to stdout and play using ffplay and save it as well
2 avril 2021, par ZeroDay FractureI am trying to use ffmpeg to downscale a video and pipe the stdout data to ffplay to play the new downsized video by piping it to ffplay on aws lambda.


This is the command I have so far, but for some reason adding a scale option is not working.


I am trying to run this command locally before I deploy it on python with subprocess command. I need the raw video to be able to save into database for streaming the data in realtime.


%ffmpeg -i sample.mp4 -vf scale=240:-2 -f mpegts -c:v copy -af aresample=async=1:first_pts=0 - | ffplay -


adding the scale optioin for some reason is saving the video as the name scale=240 :-2 which does not make sense.


-
Why storage access functions not working on android 10 API-29 ? error=13, Permission denied ?
8 janvier 2021, par Rpatel

This example code is to create video from images and music.
Code running on till API level 28 but when I just upgrade to
Build version 29 then it starts crashing. I tried the most solution
but could not find the proper reason and solution.

Please let me know...



2


021-01-08 19:48:16.045 18413-19578/com.example.photovideomaker E/audio: io
 java.io.IOException: Cannot run program "/data/user/0/com.example.photovideomaker/files/ffmpeg": error=13, Permission denied
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
 at java.lang.Runtime.exec(Runtime.java:698)
 at java.lang.Runtime.exec(Runtime.java:563)
 at com.example.photovideomaker.service.CreateVideoService.joinAudio(CreateVideoService.java:252)
 at com.example.photovideomaker.service.CreateVideoService.createVideo(CreateVideoService.java:89)
 at com.example.photovideomaker.service.CreateVideoService.onHandleIntent(CreateVideoService.java:83)
 at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)
 at android.os.Handler.dispatchMessage(Handler.java:107)
 at android.os.Looper.loop(Looper.java:214)
 at android.os.HandlerThread.run(HandlerThread.java:67)
 Caused by: java.io.IOException: error=13, Permission denied
 at java.lang.UNIXProcess.forkAndExec(Native Method)
 at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
 at java.lang.ProcessImpl.start(ProcessImpl.java:141)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 at java.lang.Runtime.exec(Runtime.java:698) 
 at java.lang.Runtime.exec(Runtime.java:563) 
 at com.example.photovideomaker.service.CreateVideoService.joinAudio(CreateVideoService.java:252) 
 at com.example.photovideomaker.service.CreateVideoService.createVideo(CreateVideoService.java:89) 
 at com.example.photovideomaker.service.CreateVideoService.onHandleIntent(CreateVideoService.java:83) 
 at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78) 
 at android.os.Handler.dispatchMessage(Handler.java:107) 
 at android.os.Looper.loop(Looper.java:214) 
 at android.os.HandlerThread.run(HandlerThread.java:67) 
</init>




This function throwing the error "On Process.runtime"




private void createVideo() {
 long startTime = System.currentTimeMillis();
 toatalSecond = (application.getSecond() * ((float) application.getSelectedImages().size())) - DEFAULT_FONT_SCALE;
 joinAudio();
 while (true) {
 if (ImageCreatorService.isImageComplate) {
 Log.e("image creation ", " complte");

 break;
 }else {
 Log.e("image creation ", "not complte");
 }
 }
 Log.e("createVideo", "video create start");
 new File(FileUtils.TEMP_DIRECTORY, "video.txt").delete();
 for (int i = 0; i < application.videoImages.size(); i++) {
 appendVideoLog(String.format("file '%s'", application.videoImages.get(i)));
 }

 File r0=new File(FileUtils.TEMP_DIRECTORY, "video.txt");
 String videoPath = new File(FileUtils.APP_DIRECTORY, getVideoName()).getAbsolutePath();
 String[] inputCode = application.getMusicData() != null ? new String[]{
 FileUtils.getFFmpeg(this), "-r",
 String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),
 "-f", "concat", "-safe", "0", "-i", r0.getAbsolutePath(), "-i",
 audioFile.getAbsolutePath(), "-strict", "experimental", "-r", "30",
 "-t", String.valueOf(toatalSecond), "-c:v", "libx264", "-preset",
 "ultrafast", "-pix_fmt", "yuv420p", "-ac", "2", videoPath}
 : new String[]{FileUtils.getFFmpeg(this),
 "-r", String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),
 "-f", "concat", "-i", r0.getAbsolutePath(), "-r", "30", "-c:v", "libx264", "-preset", "ultrafast", "-pix_fmt", "yuv420p", videoPath};

 System.gc();
 Process process = null;
 try {
 process = Runtime.getRuntime().exec(inputCode);
 while (!Util.isProcessCompleted(process)) {
 BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
 while (true) {
 String line = reader.readLine();
 if (line != null) {
 Log.e("process", line);
 appendLog(line);
 final int incr = durationToprogtess(line);
 new Handler(Looper.getMainLooper()).post(new Runnable() {
 public void run() {
 if (receiver != null) {
 receiver.onVideoProgressUpdate(incr);
 }
 }
 });
 mBuilder.setProgress(100, ((int) ((75.0f * ((float) incr)) / 100.0f)) + 25, false);
 mNotifyManager.notify(1001, mBuilder.build());
 }else {
 break;
 }
 }
 }
 } catch (IOException e) {
 e.printStackTrace();
 } finally {
 Util.destroyProcess(process);
 }
 mBuilder.setContentText("Video created :" + FileUtils.getDuration(System.currentTimeMillis() - startTime)).setProgress(0, 0, false);
 mNotifyManager.notify(1001, mBuilder.build());
 try {
 long fileSize = new File(videoPath).length();
 String artist = getResources().getString(R.string.artist_name);
 ContentValues values = new ContentValues();
 values.put("_data", videoPath);
 values.put("_size", Long.valueOf(fileSize));
 values.put("mime_type", "video/mp4");
 values.put("artist", artist);
 values.put("duration", Float.valueOf(toatalSecond * 1000.0f));
 getContentResolver().insert(Media.getContentUriForPath(videoPath), values);
 } catch (Exception e2) {
 e2.printStackTrace();
 }
 try {
 sendBroadcast(new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE", Uri.fromFile(new File(videoPath))));
 } catch (Exception e3) {
 e3.printStackTrace();
 }

 buildNotification(videoPath);
 final String str = videoPath;
 new Handler(Looper.getMainLooper()).post(new Runnable() {
 public void run() {
 if (receiver != null) {
 receiver.onVideoProgressUpdate(100);
 receiver.onProgressFinish(str);
 }
 }
 });
 FileUtils.deleteTempDir();
 stopSelf();
 }



I have tried checking the directory in storage and check mkdir is working or not but this function purely works for creating video from a collection of images, themes, and audio. as per android