Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (32)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (5870)

  • Why can’t I run the ffmpeg executable stored in /mnt/sdcard ?

    18 novembre 2024, par user2193172

    I managed to compile the ffmpeg Static build. But when I am trying to call the ffmpeg command line I get a Java IOException : No such file or Directory.

    



    My code is as follows :

    



    public void merge_video(View view){

    if(ffmpeg_file.exists()){
          Log.d(null, "ffmpeg exists");
      }else{
          Log.d(null, "Could not locate ffmpeg in the folder");
      }

      File file1 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4");
      if(file1.exists()){
          Log.d(null,"File 1 exists");
      }
      File file2 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4");
      if(file2.exists()){
          Log.d(null,"File 2 exists");
      }

      String[] ffmpegCommand = new String[5];
      ffmpegCommand[0] = "/mnt/sdcard/com.ffmpeg_test/ffmpeg";
      ffmpegCommand[1] = "-i";
      ffmpegCommand[2] = "concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4";
      ffmpegCommand[3] = "copy";
      ffmpegCommand[4] = "/mnt/sdcard/com.ffmpeg_test/output.mp4";  

      try {
          Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();

          String line;
          BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
          Log.d(null, "*******Starting FFMPEG");

          while((line = reader.readLine())!=null){

              Log.d(null, "***"+line+"***"); 
          }
          Log.d(null,"****ending FFMPEG****");

    } catch (IOException e) {
        e.printStackTrace();
    }
  }


    



    The LogCat print is as follows :

    



    03-27 20:41:10.522: W/System.err(24709): java.io.IOException: Error running exec(). Command: [/mnt/sdcard/com.ffmpeg_test/ffmpeg, -i, concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4, copy, /mnt/sdcard/com.ffmpeg_test/output.mp4] Working Directory: null Environment: [ANDROID_SOCKET_zygote=13, TMPDIR=/data/local/tmp, ANDROID_BOOTLOGO=1, EXTERNAL_STORAGE=/mnt/sdcard, ANDROID_ASSETS=/system/app, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ASEC_MOUNTPOINT=/mnt/asec, LOOP_MOUNTPOINT=/mnt/obb, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar, USBHOST_STORAGE=/mnt/sdcard/usbStorage, ANDROID_DATA=/data, LD_LIBRARY_PATH=/vendor/lib:/system/lib, ANDROID_ROOT=/system, ANDROID_PROPERTY_WORKSPACE=12,32768, EXTERNAL_STORAGE2=/mnt/sdcard/external_sd]
03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:224)
03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessBuilder.start(ProcessBuilder.java:202)
03-27 20:41:10.522: W/System.err(24709):    at com.example.ffmpeg_test.MainActivity.merge_video(MainActivity.java:106)
03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
03-27 20:41:10.527: W/System.err(24709):    at android.view.View$1.onClick(View.java:2149)
03-27 20:41:10.527: W/System.err(24709):    at android.view.View.performClick(View.java:2538)
03-27 20:41:10.527: W/System.err(24709):    at android.view.View$PerformClick.run(View.java:9152)
03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.handleCallback(Handler.java:587)
03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.dispatchMessage(Handler.java:92)
03-27 20:41:10.527: W/System.err(24709):    at android.os.Looper.loop(Looper.java:123)
03-27 20:41:10.527: W/System.err(24709):    at android.app.ActivityThread.main(ActivityThread.java:3691)
03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
03-27 20:41:10.537: W/System.err(24709):    at dalvik.system.NativeStart.main(Native Method)
03-27 20:41:10.537: W/System.err(24709): Caused by: java.io.IOException: No such file or directory
03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(Native Method)
03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:222)
03-27 20:41:10.537: W/System.err(24709):    ... 16 more
03-27 20:41:36.057: W/KeyCharacterMap(24709): No keyboard for id 0
03-27 20:41:36.057: W/KeyCharacterMap(24709): Using default keymap: /system/usr/keychars/qwerty.kcm.bin


    


  • Problems with ffmpeg command line on android

    17 mai 2017, par user2193172

    I managed to compile the ffmpeg Static build. But when I am trying to call the ffmpeg command line I get a Java IOException : No such file or Directory.

    My code is as follows :

    public void merge_video(View view){

       if(ffmpeg_file.exists()){
             Log.d(null, "ffmpeg exists");
         }else{
             Log.d(null, "Could not locate ffmpeg in the folder");
         }

         File file1 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4");
         if(file1.exists()){
             Log.d(null,"File 1 exists");
         }
         File file2 = new File("/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4");
         if(file2.exists()){
             Log.d(null,"File 2 exists");
         }

         String[] ffmpegCommand = new String[5];
         ffmpegCommand[0] = "/mnt/sdcard/com.ffmpeg_test/ffmpeg";
         ffmpegCommand[1] = "-i";
         ffmpegCommand[2] = "concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4";
         ffmpegCommand[3] = "copy";
         ffmpegCommand[4] = "/mnt/sdcard/com.ffmpeg_test/output.mp4";  

         try {
             Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();

             String line;
             BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
             Log.d(null, "*******Starting FFMPEG");

             while((line = reader.readLine())!=null){

                 Log.d(null, "***"+line+"***");
             }
             Log.d(null,"****ending FFMPEG****");

       } catch (IOException e) {
           e.printStackTrace();
       }
     }

    The LogCat print is as follows :

    03-27 20:41:10.522: W/System.err(24709): java.io.IOException: Error running exec(). Command: [/mnt/sdcard/com.ffmpeg_test/ffmpeg, -i, concat:/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_22.mp4|/mnt/sdcard/com.ffmpeg_test/VID_3_25_2013_12_28.mp4, copy, /mnt/sdcard/com.ffmpeg_test/output.mp4] Working Directory: null Environment: [ANDROID_SOCKET_zygote=13, TMPDIR=/data/local/tmp, ANDROID_BOOTLOGO=1, EXTERNAL_STORAGE=/mnt/sdcard, ANDROID_ASSETS=/system/app, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ASEC_MOUNTPOINT=/mnt/asec, LOOP_MOUNTPOINT=/mnt/obb, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar, USBHOST_STORAGE=/mnt/sdcard/usbStorage, ANDROID_DATA=/data, LD_LIBRARY_PATH=/vendor/lib:/system/lib, ANDROID_ROOT=/system, ANDROID_PROPERTY_WORKSPACE=12,32768, EXTERNAL_STORAGE2=/mnt/sdcard/external_sd]
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:224)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.ProcessBuilder.start(ProcessBuilder.java:202)
    03-27 20:41:10.522: W/System.err(24709):    at com.example.ffmpeg_test.MainActivity.merge_video(MainActivity.java:106)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-27 20:41:10.522: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View$1.onClick(View.java:2149)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View.performClick(View.java:2538)
    03-27 20:41:10.527: W/System.err(24709):    at android.view.View$PerformClick.run(View.java:9152)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.handleCallback(Handler.java:587)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-27 20:41:10.527: W/System.err(24709):    at android.os.Looper.loop(Looper.java:123)
    03-27 20:41:10.527: W/System.err(24709):    at android.app.ActivityThread.main(ActivityThread.java:3691)
    03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-27 20:41:10.527: W/System.err(24709):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
    03-27 20:41:10.532: W/System.err(24709):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
    03-27 20:41:10.537: W/System.err(24709):    at dalvik.system.NativeStart.main(Native Method)
    03-27 20:41:10.537: W/System.err(24709): Caused by: java.io.IOException: No such file or directory
    03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(Native Method)
    03-27 20:41:10.537: W/System.err(24709):    at java.lang.ProcessManager.exec(ProcessManager.java:222)
    03-27 20:41:10.537: W/System.err(24709):    ... 16 more
    03-27 20:41:36.057: W/KeyCharacterMap(24709): No keyboard for id 0
    03-27 20:41:36.057: W/KeyCharacterMap(24709): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
  • How can upload audio on dropbox after converted it from the video format using ffmpeg in nodejs and angular

    21 septembre 2021, par Amir Shahzad

    nodejs server side code

    


    This is my nodejs server side where i want to convert the video into the audio format and then want to upload the converted audio on the dropbox is there any way to do that ??

    


    const express = require('express'),
path = require('path'),
cors = require('cors'),
ffmpeg = require('fluent-ffmpeg'),
fs = require("fs"),
access_token = "My-Access-Token";

ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');

const app = express();
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({
  extended: false
}));


app.post('/api/upload', upload.single('mp4'), function (req, res) {
  if (!req.file) {
    console.log("No file is available!");
    return res.send({
     success: false
  });

  } else {
   function convert(input, output, callback) {
      ffmpeg(input)
          .output(output)
          .on('end', function() {                    
           console.log('conversion ended');
            callback(null);
          }).on('error', function(err){
           console.log('error: ', err);
            callback(err);
          }).run();
    }
     const filepath = req.file.path;
     var content = fs.readFileSync(filepath);

 options = {
    method: "POST",
    url: 'https://content.dropboxapi.com/2/files/upload',
    headers: {
     "Content-Type": "text/plain; charset=dropbox-cors-hack" ,
     "Authorization": "Bearer " + access_token,
      "Dropbox-API-Arg": "{\"path\": \"/youtube- 
       radio/"+req.file.originalname+"\",\"mode\": \"overwrite\",\"autorename\": 
       true,\"mute\": false}",
    },
     body:content
};
convert(filepath,  options+'.mp3', function(err,res, body){
   if(!err) {
    console.log('File Name is',req.file.originalname);
    console.log('File Path Is = ',req.file.path)
    console.log('conversion complete');   
    console.log('ERR', err);
   }
});
console.log('File is available!');
return res.send({
  success: true
})
}
 });


  const PORT = process.env.PORT || 8080;
  const server = app.listen(PORT, () => {
  console.log('Connected to port ' + PORT)
  })


    


    i have read many documentations of dropbox and ffmpeg and angular file upload but i could not understand Please anyone can resolve my code Thanks in advance

    


    This is my typescript file

    


    import { Component, OnInit } from '@angular/core';
import { FileUploader } from 'ng2-file-upload';
import { ToastrService } from 'ngx-toastr';
import { Track } from 'ngx-audio-player'; 
import { PlayerServiceService } from './services/player-service.service';


const URL = 'http://localhost:8080/api/upload';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit{

public uploader: FileUploader = new FileUploader({
  url: URL,
  itemAlias: 'mp4'
});
 constructor(private toastr: ToastrService,
    private playerService: PlayerServiceService) { }

 ngOnInit(): void {
   this.uploader.onAfterAddingFile = (file) => {
     file.withCredentials = false;
 };
  this.uploader.onCompleteItem = (item: any, status: any) => {
    console.log('Uploaded File Details:', item);
     this.toastr.success('File successfully uploaded!');
  };

}
}


    


    This is html code

    


     <div class="container mt-5">&#xA;  <div class="file-upload">&#xA;     <input type="file" ng2fileselect="ng2fileselect" />&#xA;     <button type="button" class="btn btn-info">&#xA;      Upload&#xA;    </button>&#xA;  </div>&#xA;</div>&#xA;

    &#xA;