Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (63)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • 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 (8904)

  • Android FFMPEG - Low FPS & File Size is massive

    2 mai 2018, par Alexzander Flores

    I am new to Android app development and I have been asked to make a video splitter app. I am trying to use FFMPEG, but the library size is massive and makes the .APK file 140MB. How can I solve this ? Similar apps are around 15MBs in size.

    Also, the framerate starts at 30FPS and drops to around 2.2FPS over time when trying to split a 30 second long video into two parts. How can I solve this ? This is my code currently :

    package splicer.com.splicer;

    import android.Manifest;
    import android.content.Context;
    import android.content.Intent;
    import android.content.pm.PackageManager;
    import android.database.Cursor;
    import android.media.MediaMetadataRetriever;
    import android.media.MediaScannerConnection;
    import android.net.Uri;
    import android.provider.MediaStore;
    import android.support.v4.app.ActivityCompat;
    import android.support.v4.content.ContextCompat;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.text.method.ScrollingMovementMethod;
    import android.view.View;
    import android.widget.Button;
    import android.widget.TextView;

    import com.github.hiteshsondhi88.libffmpeg.ExecuteBinaryResponseHandler;
    import com.github.hiteshsondhi88.libffmpeg.FFmpeg;
    import com.github.hiteshsondhi88.libffmpeg.LoadBinaryResponseHandler;
    import com.github.hiteshsondhi88.libffmpeg.exceptions.FFmpegNotSupportedException;

    public class MainActivity extends AppCompatActivity {

       private Button button;
       private TextView textView;
       private FFmpeg ffmpeg;

       static {
           System.loadLibrary("native-lib");
       }

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           ffmpeg = FFmpeg.getInstance(getApplicationContext());
           try {
               ffmpeg.loadBinary(new LoadBinaryResponseHandler() {

                   @Override
                   public void onStart() {}

                   @Override
                   public void onFailure() {}

                   @Override
                   public void onSuccess() {}

                   @Override
                   public void onFinish() {}
               });
           } catch(FFmpegNotSupportedException e) {
               e.printStackTrace();
           }

           textView = (TextView) findViewById(R.id.textView);
           textView.setY(200);
           textView.setHeight(700);
           textView.setMovementMethod(new ScrollingMovementMethod());

           button = (Button) findViewById(R.id.button);
           button.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View view) {
                   openGallery();
               }
           });
       }

       /**
        * A native method that is implemented by the 'native-lib' native library,
        * which is packaged with this application.
        */
       public native String stringFromJNI();

       public void openGallery() {
           if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
               ActivityCompat.requestPermissions(this, new String [] {Manifest.permission.READ_EXTERNAL_STORAGE}, 0);
           }

           if(ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
               ActivityCompat.requestPermissions(this, new String [] {Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);
           }

           Intent gallery = new Intent(Intent.ACTION_PICK, MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
           startActivityForResult(gallery, 100);
       }

       public String getRealPathFromURI(Context context, Uri contentUri) {
           Cursor cursor = null;
           try {
               String[] proj = { MediaStore.Images.Media.DATA };
               cursor = context.getContentResolver().query(contentUri,  proj, null, null, null);
               int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
               cursor.moveToFirst();
               return cursor.getString(column_index);
           } finally {
               if (cursor != null) {
                   cursor.close();
               }
           }
       }

       @Override
       protected void onActivityResult(int requestCode, int resultCode, final Intent intent) {
           super.onActivityResult(requestCode, resultCode, intent);
           if(resultCode == RESULT_OK && requestCode == 100) {
               MediaMetadataRetriever retriever = new MediaMetadataRetriever();
               try {
                   retriever.setDataSource(getBaseContext(), intent.getData());
                   String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
                   long splitCount = Long.valueOf(time) / 1000 / 15;
                   if(splitCount > 1) {
                       final String path = getRealPathFromURI(getBaseContext(), Uri.parse(intent.getData().toString()));

                       for(int a = 0, start = 0; a < splitCount; ++a, start += 15) {
                           // I am only testing with .mp4s atm, this will change before production
                           final String targetPath = path.replace(".mp4", "_" + (a + 1) + ".mp4");

                           ffmpeg.execute(new String [] {
                                   "-r",
                                   "1",
                                   "-i",
                                   path,
                                   "-ss",
                                   String.valueOf(start),
                                   "-t",
                                   String.valueOf(start + 15),
                                   "-r",
                                   "24",
                                   targetPath
                           }, new ExecuteBinaryResponseHandler() {
                               @Override
                               public void onStart() {}

                               @Override
                               public void onProgress(String message) {
                                   textView.setText("onProcess: " + message);
                               }

                               @Override
                               public void onFailure(String message) {
                                   textView.setText("onFailure: " + message + " --- " + path);
                               }

                               @Override
                               public void onSuccess(String message) {
                                   textView.setText("onSuccess:" + message);
                                   MediaScannerConnection.scanFile(getBaseContext(),
                                   new String [] { targetPath }, null,
                                   new MediaScannerConnection.OnScanCompletedListener() {
                                       public void onScanCompleted(String path, Uri uri) {}
                                   });
                               }

                               @Override
                               public void onFinish() {}
                           });
                       }
                   }
               } catch(Exception e) {
                   e.printStackTrace();
               } finally {
                   retriever.release();
               }
           }
       }
    }

    I don’t believe everything here is as optimal as it could be, but I’m just trying to prove the concept at the moment. Any help in the right direction would be amazing, thank you !

  • How to compile ffmpeg with the new Flascc compiler ?

    5 décembre 2012, par charles

    I have tried to compile ffmpeg with the new flascc compiler with the following parameters ( I set only h263 ability as a test) :

    PATH=/cygdrive/c/download/flascc/sdk/usr/bin:$PATH ./configure --enable-static
    --disable-shared --extra-libs=-static --extra-cflags=--static --disable-doc  --disable-ffplay
    --disable-ffprobe --disable-ffserver --disable-avdevice   --disable-avfilter  
    --disable-pthreads  --disable-everything --enable-muxer=flv
    --enable-encoder=flv --enable-encoder=h263 --disable-mmx --disable-shared  
    --prefix=bin/  --disable-protocols --disable-network --disable-optimizations --disable-debug
    --disable-asm --disable-stripping
    --prefix=/cygdrive/c/download/flascc/sdk/usr

    Then I tried to make as follows :

    PATH=/cygdrive/c/download/flascc/sdk/usr/bin:$PATH make

    PATH=/cygdrive/c/download/flascc/sdk/usr/bin:$PATH make install

    *.a files have been created in the subdirectories, like : libavcodec.a. But how can I create an .swf/.swc from the *.a files ?

    Thanks !
    Charles

  • Convert a video to mp3 in python without ffmpeg

    13 octobre 2020, par Breno Henrique

    I have some problems when I tryed to convert a video to music in python with moviepy and the prompt given me a error, because this library need ffmepg, so I can't install ffmepg, because now only have the x64 version to download, and now I have this problem, and I thinking what is the other way to install the ffmepg or convert a video to music ! Can someone help-me, Thanks !

    


    Code to convert :

    


    with VideoFileClip(mp4f) as vc:
    with vc.audio as ac:
        ac.write_audiofile(mp3f)


    


    Error :

    


    OSError: MoviePy error: the file X could not be found!
Please check that you entered the correct path.


    


    System details :
Python - 3.8.6
Windows 10 Pro x86