
Recherche avancée
Autres articles (54)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (8470)
-
ffmpeg-detect audio level from live audio streaming(php)
27 décembre 2013, par Tony Chhabadai have live audio stream service. I need to use ffmpeg to check audio level of stream in real time.
i have tried
ffmpeg -i sample.aac -filter:a volumedetect -vn -f null /dev/null
I need my live audio streaming link in place of
sample.aac
. -
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


-
PhpVideoToolKit permission denied
21 septembre 2016, par nikoz84I’m try to execute this PHP code
exec("/root/bin/ffmpeg -version 2>&1", $output);
print_r($output);But always the output return permission denied
Array ( [0] => sh: /root/bin/ffmpeg: Permission denied )
and the output from library PhpVideoToolKit
sh: /root/bin/ffmpeg: Permission denied
how can i give permission for execute to my apache service ? i’m used CENTOS