Recherche avancée

Médias (91)

Autres articles (86)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (5196)

  • Revision 812fbc5ecb : Merge "Make reset_frame_context an enum."

    12 septembre 2015, par Ronald S. Bultje

    Merge "Make reset_frame_context an enum."

  • I wonder why logcat says "NO SUCH A FILE OR DIRECTORY(2)"

    22 septembre 2013, par autoexebat

    I wanna play audio on Android with ffmpeg.
    But when I run this project, error has occurred

    what should I do ?

    java SIDE

    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import android.app.Activity;
    import android.media.AudioFormat;
    import android.media.AudioManager;
    import android.media.AudioTrack;
    import android.media.MediaPlayer;
    import android.os.Bundle;
    import android.os.SystemClock;

    public class FFmpegBasic extends Activity
    {
       private AudioTrack track;
       private FileOutputStream os;
       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState)
       {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.main);
           createEngine();

           int bufSize = AudioTrack.getMinBufferSize(44100,
                                                     AudioFormat.CHANNEL_CONFIGURATION_STEREO,
                                                     AudioFormat.ENCODING_PCM_16BIT);


           track = new AudioTrack(AudioManager.STREAM_MUSIC,
                                  44100,
                                  AudioFormat.CHANNEL_CONFIGURATION_STEREO,
                                  AudioFormat.ENCODING_PCM_16BIT,
                                  bufSize,
                                  AudioTrack.MODE_STREAM);

           byte[] bytes = new byte[bufSize];

           try {
               os = new FileOutputStream("/sdcard/a.out",false);
           } catch (FileNotFoundException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }

           String result = "/mnt/sdcard/Wildlife.mp3";
           loadFile(result,bytes);

           try {
               os.close();
           } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
       }

       void playSound(byte[] buf, int size) {  
           if(track.getPlayState()!=AudioTrack.PLAYSTATE_PLAYING)
               track.play();
           track.write(buf, 0, size);

           try {
               os.write(buf,0,size);
           } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
       }


       private native void createEngine();
       private native void loadFile(String file, byte[] array);

       /** Load jni .so on initialization*/
       static {
            System.loadLibrary("avutil");
            System.loadLibrary("avcore");
            System.loadLibrary("avcodec");
            System.loadLibrary("avformat");
            System.loadLibrary("avdevice");
            System.loadLibrary("swscale");
            System.loadLibrary("avfilter");
            System.loadLibrary("ffmpeg");
            System.loadLibrary("basicplayer");
       }
    }

    c SIDE


    #include
    #include
    #include
    #include <android></android>log.h>

    #include "libavcodec/avcodec.h"
    #include "libavformat/avformat.h"
    #include "avcodec.h"
    #include "avformat.h"




    void Java_net_jbong_FFmpegBasic_FFmpegBasic_createEngine(JNIEnv* env, jclass clazz)
       {
           //avcodec_init();

           av_register_all();


       }

    void Java_net_jbong_FFmpegBasic_FFmpegBasic_loadFile(JNIEnv* env, jobject obj, jstring file, jbyteArray array)
    {

       AVFormatContext *gFormatCtx = NULL;
       AVCodecContext *gAudioCodecCtx = NULL;
       AVCodec *gAudioCodec = NULL;
       int gAudioStreamIdx = -1;
       char *gAudioBuffer = NULL;
       int i, outsize = 0;
       AVPacket packet;
       const char *str;
       str = (*env)->GetStringUTFChars(env, file, NULL);
       jclass cls = (*env)->GetObjectClass(env, obj);
       jmethodID play = (*env)->GetMethodID(env, cls, "playSound", "([BI)V");

       if (gFormatCtx != NULL)
           return -1;
       if (av_open_input_file(&amp;gFormatCtx,str,NULL,0,NULL)!=0)
           return -2;
       if (av_find_stream_info(gFormatCtx) &lt; 0)
           return -3;

       for(i=0; inb_streams; i++)
       {
           if(gFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
           {
               gAudioStreamIdx = i;
               break;
           }
       }

       if (gAudioStreamIdx == -1)
           return -4;
       gAudioCodecCtx = gFormatCtx->streams[gAudioStreamIdx]->codec;
       gAudioCodec = avcodec_find_decoder(gAudioCodecCtx->codec_id);

       if (gAudioCodec == NULL)
           return -5;

       if (avcodec_open(gAudioCodecCtx, gAudioCodec)&lt;0)
           return -6;


       gAudioBuffer = (char *)av_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE *2);
       int decode = 0;

       while (av_read_frame(gFormatCtx, &amp;packet) >= 0)
       {
        if (gFormatCtx-> streams[packet.stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
        {
            int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE * 8;
            gAudioBuffer = (char *)av_malloc(data_size);
            int size=packet.size;
            while(size > 0)
            {
             int len = avcodec_decode_audio3(gAudioCodecCtx,
               (short *) gAudioBuffer, &amp;data_size, &amp;packet);
             if (data_size > 0)
             {
                       jbyte *bytes = (*env)->GetByteArrayElements(env, array, NULL);
                          memcpy(bytes + decode, (int16_t *)gAudioBuffer, size);
                          (*env)->ReleaseByteArrayElements(env, array, bytes, 0);
                          (*env)->CallVoidMethod(env, obj, play, array, data_size);
                          decode += size;
                          size -= len;

             }
            }
        }
        av_free_packet(&amp;packet);
       }

       av_close_input_file(gFormatCtx);
       return 0;
    }

    Why my android logcat show me this message ?
    "error opening trace file : No such file or directory (2)"

  • Revision b447b9d978 : Merge "Revert "Removing this_frame_stats member from TWO_PASS struct.""

    6 juin 2014, par Adrian Grange

    Changed Paths :
     Modify /vp9/encoder/vp9_firstpass.c



    Merge "Revert "Removing this_frame_stats member from TWO_PASS struct.""