Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (107)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (11977)

  • CEFSharp proprietary codecs support

    8 mars 2015, par Citrus

    I got an issue with CEFSharp which is chromium embeddable framework wrapper for C#.NET. I need to make proprietary codecs available for a project (H.264/MP4 to be specific). After some google-fu I’ve found that I must set the use_proprietary_codecs to true in the cef.gyp(i) file, but the problem is, that I’ve got this stuff from NuGet and there aren’t any cef.gyp(i) files. I need this library badly to have the codec support, else we must rewrite 5 months of work completely, which isn’t clearly an option. Thanks for any help !

  • IOException : Error running exec() Command, When calling FFmpeg method

    21 avril 2016, par kc ochibili

    i am trying to create a slide show mp4 using this ffmpeg method but i keep getting this IOException Error running exec(). Command when i click the button.

    here is my call

    ffmpegController = new FfmpegController(getTempDirectory(), new File(""));
    ffmpegController.createSlideshowFromImagesAndAudio(slideFrames, getAudioPath(), getOutPath(), 500, mCallbackResponse);

    Here is the source code of the small project.
    Here is the apk

    And here is my Error message

      Error running exec(). Command: [ffmpeg, -y, -i, /storage/emulated/0/TestFFmpeg/frame1.png, /storage/emulated/0/TestFFmpeg/temp/image-000.jpg]

    Working Directory: lib Environment: [VIBE_PIPE_PATH=/dev/pipes, ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=9, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/sec_edm.jar:/system/framework/seccamera.jar:/system/framework/secocsp.jar:/system/framework/sc.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/sws.jar:/system/framework/WfdCommon.jar, ANDROID_PROPERTY_WORKSPACE=8,66560, SECONDARY_STORAGE=/storage/extSdCard:/storage/UsbDriveA:/storage/UsbDriveB:/storage/UsbDriveC:/storage/UsbDriveD:/storage/UsbDriveE:/storage/UsbDriveF, ANDROID_STORAGE=/storage]

    Here is my Activity code :

    public class MainActivity extends Activity {

    Button testButton;
    EditText errorLogView;

    TinyDB tinydb;// sharedPreference Wrapper
    static Context context;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
       context = getApplicationContext();
       tinydb = new TinyDB(context); // sharedPreference Wrapper
       testButton = (Button) findViewById(R.id.test_Image_View);
       errorLogView = (EditText) findViewById(R.id.errorlog);
       setListeners();
    }

    public void setListeners(){
       testButton.setOnClickListener(new OnClickListener() {

           @Override
           public void onClick(View v) {
               // TODO Auto-generated method stub
               Bitmap frame1Bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
               //Saves the image to the file system an returns the path
               String firstFrame = tinydb.putImagePNG("TestFFmpeg", "frame1.png", frame1Bitmap);
               String secondFrame = tinydb.putImagePNG("TestFFmpeg", "frame2.png", frame1Bitmap);
               String thirdFrame = tinydb.putImagePNG("TestFFmpeg", "frame3.png", frame1Bitmap);


               ArrayList<clip> slideFrames = new ArrayList<clip>();
               slideFrames.add(new Clip(firstFrame));
               slideFrames.add(new Clip(secondFrame));
               slideFrames.add(new Clip(thirdFrame));

               copyResourceSoundToSDCard();

               FfmpegController ffmpegController = null;
               try {

                   ffmpegController = new FfmpegController(getTempDirectory(), new File(""));
                   ffmpegController.createSlideshowFromImagesAndAudio(slideFrames, getAudioPath(), getOutPath(), 500, mCallbackResponse);

               } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   toast("FileNotFoundException");
                   toast(e.getLocalizedMessage());
               } catch (IOException e) {
                   // TODO Auto-generated catch block
                   toast("IOException");
                   toast(e.getLocalizedMessage());
                   errorLogView.setText(e.getLocalizedMessage());
                   e.printStackTrace();
               } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   toast("Exception ");
                   toast(e.getLocalizedMessage());
               }          
           }
       });


    }

    public Clip getAudioPath(){
       Clip mAudPath = null;
       try {
           mAudPath = new Clip(new File(tinydb.getString("audpath")).getCanonicalPath());
       } catch (IOException e1) {
           // TODO Auto-generated catch block
           e1.printStackTrace();
       }
       return mAudPath;
    }

    public Clip getOutPath(){
       String videoName = ("myTestVideo.mp4");
       String saveFolder = ("TestFFmpeg/videos");
       String movieFullPath = setupAudioFolder(saveFolder, videoName);

       Clip outPath = null;
       try {
           outPath = new Clip(new File(movieFullPath).getCanonicalPath());
       } catch (IOException e1) {
           // TODO Auto-generated catch block
           e1.printStackTrace();
       }
       tinydb.putString("outhPath", outPath.path);

       return outPath;
    }

    public void copyResourceSoundToSDCard(){
       try {
           copyRawFile(context, R.raw.screens_shot_sound, getResaveDirectory(), "755");
       } catch (IOException e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
       } catch (InterruptedException e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
       }
    }

    private File getResaveDirectory(){

       String audioName = ("ShotSound.wav");
       String saveFolder = ("TestFFmpeg");
       File appRootFile;
       String path = setupAudioFolder(saveFolder, audioName);
       tinydb.putString("audpath",  path);
       appRootFile = new File(path);
       return appRootFile;
     }

    public String setupAudioFolder(String theFolder, String theImageName){
       File sdcard_path = Environment.getExternalStorageDirectory();
       File mFolder = new File(sdcard_path, theFolder);
       if (!mFolder.exists()) {
           if (!mFolder.mkdirs()) {
               Log.e("While creatingsave path",
                       "Default Save Path Creation Error");
               // Toast("Default Save Path Creation Error");
           }
       }
       String mFullPath = mFolder.getPath() + '/' + theImageName;

       return mFullPath;
    }
    private static void copyRawFile(Context ctx, int resid, File file, String mode) throws IOException, InterruptedException
    {
       final String abspath = file.getAbsolutePath();
       // Write the iptables binary
       final FileOutputStream out = new FileOutputStream(file);
       final InputStream is = ctx.getResources().openRawResource(resid);
       byte buf[] = new byte[1024];
       int len;
       while ((len = is.read(buf)) > 0) {
           out.write(buf, 0, len);
       }
       out.close();
       is.close();
       // Change the permissions
       Runtime.getRuntime().exec("chmod "+mode+" "+abspath).waitFor();
    }      
    ShellCallback mCallbackResponse = new ShellUtils.ShellCallback() {

       @Override
       public void shellOut(String shellLine) {
           // TODO Auto-generated method stub

       }

       @Override
       public void processComplete(int exitValue) {
           // TODO Auto-generated method stub
           toast("process done");

       }
    };

    public File getTempDirectory(){
       String saveFolder = ("TestFFmpeg/temp");
       File appRootFile = setupCustomFile(saveFolder);


       return appRootFile;
    }

    public File setupCustomFile(String theFolder){
       File sdcard_path = Environment.getExternalStorageDirectory();
       File mFolder = new File(sdcard_path, theFolder);
       if (!mFolder.exists()) {
           if (!mFolder.mkdirs()) {
               Log.e("While creatingsave path",
                       "Default Save Path Creation Error");
               // Toast("Default Save Path Creation Error");
           }
       }

       return mFolder;
    }



    public static void toast(String thetext) {
       Toast.makeText(context, thetext, Toast.LENGTH_LONG).show();
    }
    </clip></clip>

    any help would be appreciated

  • Evolution #3692 : Suivre les évolution de MediaJS

    22 mai 2017

    - Equipement a écrit :

    Pour information, quelques problèmes que j’ai constatés sur la version 4.1.0 de MediaElement (du 04/05/2017) :

    Après passage en 4.1.1

    - En navigation au clavier, lorsque le focus est sur le gros triangle au centre de la vidéo, la touche entrée (et la barre d’espace) ne permet pas de lancer la vidéo.

    Chez moi ça marche avec entrée ou espace (testé sous Win10 + Chrome)

    - L’agrandissement du texte à 200 % fait passer le bouton plein écran sous la vidéo, en blanc sur fond blanc, aussi il n’est plus visible.

    Non reproduit en 4.1.1.

    - MediaElement 4.1.0 permet d’afficher une transcription textuelle (au format VTT) lorsqu’on navigue avec la souris, mais pas avec le clavier.

    Je ne sais pas comment tester ça.

    - La vignette d’une vidéo au format FLV (codec FLV1) ne s’affiche pas.

    On parle bien de la vignette au sens de SPIP, c’est-à-dire, de l’image jointe en plus du document en tant que vignette ?
    Chez-moi ça marche

    - Si une page contient une vidéo MP4 et une vidéo FLV (codec FLV1), les vignettes des vidéos ne s’affichent pas.

    Idem