Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (27)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • 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

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

Sur d’autres sites (5935)

  • ffmpeg bit_rate error - Android [duplicate]

    6 juin 2016, par Adroid Freak

    This question already has an answer here :

    I’m getting the following error "maybe incorrect parameters such as bit_rate, rate, width or height" in some android phones, what am I doing wrong ?

    /data/data/com.exampleapp.android/app_bin/ffmpeg -y -i /storage/emulated/0/example/test/recording.mp4 -af asetrate=9600*4/3 -strict -2 /storage/emulated/0/example/media/example/test.m4a
      libavutil      54.  7.100 / 54.  7.100
      libavcodec     56.  1.100 / 56.  1.100
      libavformat    56.  4.101 / 56.  4.101
      libavdevice    56.  0.100 / 56.  0.100
      libavfilter     5.  1.100 /  5.  1.100
      libswscale      3.  0.100 /  3.  0.100
      libswresample   1.  1.100 /  1.  1.100
      libpostproc    53.  0.100 / 53.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/example/test/recording.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 0
        compatible_brands: isom3gp4
        creation_time   : 2016-06-06 00:51:05
      Duration: 00:00:03.33, start: 0.000000, bitrate: 14 kb/s
        Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 12 kb/s (default)
        Metadata:
          creation_time   : 2016-06-06 00:51:05
          handler_name    : SoundHandle
    [aac @ 0x42136170] Too many bits per frame requested
    Output #0, ipod, to '/storage/emulated/0/example/media/example/test.m4a':
      Metadata:
        major_brand     : isom
        minor_version   : 0
        compatible_brands: isom3gp4
        Stream #0:0(eng): Audio: aac, 0 channels, 128 kb/s (default)
        Metadata:
          creation_time   : 2016-06-06 00:51:05
          handler_name    : SoundHandle
          encoder         : Lavc56.1.100 aac
    Stream mapping:
      Stream #0:0 -> #0:0 (aac (native) -> aac (native))
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    exitValue 1
  • Error decoding a simple audio file using FFmpeg library

    29 mars 2017, par satyres

    After successfuly compiling the latest version of FFmpeg library and generated .a library in Ubuntu I’ve been struggling now for more than a week to decode and play a simple mp3 file in Android without a success !
    I’ve followed this tutorial given by FFmpeg team in Github i’ve tried to use it in Android but no luck !
    here is the Native code.

    void Java_com_example_home_hellondk_MainActivity_audio_1decode_1example(JNIEnv * env, jobject obj, jstring file, jbyteArray array) {
       jboolean isfilenameCopy;
       const char * filename = ( * env) - > GetStringUTFChars(env, file, &
           isfilenameCopy);
       jclass cls = ( * env) - > GetObjectClass(env, obj);
       jmethodID play = ( * env) - > GetMethodID(env, cls, "playSound", "([BI)V");
       AVCodec * codec;
       AVCodecContext * c = NULL;
       int len;
       FILE * f, * outfile;
       uint8_t inbuf[AUDIO_INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
       AVPacket avpkt;
       AVFrame * decoded_frame = NULL;

       av_init_packet( & avpkt);

       printf("Decode audio file %s \n", filename);
       LOGE("Decode audio file %s\n", filename);
       /* find the MPEG audio decoder */
       codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
       if (!codec) {
           fprintf(stderr, "Codec not found\n");
           LOGE("Codec not found\n");
           exit(1);
       }

       c = avcodec_alloc_context3(codec);
       if (!c) {
           fprintf(stderr, "Could not allocate audio codec context\n");
           LOGE("Could not allocate audio codec context\n");
           exit(1);
       }

       /* open it */
       if (avcodec_open2(c, codec, NULL) < 0) {
           fprintf(stderr, "Could not open codec\n");
           LOGE("Could not open codec\n");
           exit(1);
       }

       f = fopen(filename, "rb");
       if (!f) {
           fprintf(stderr, "Could not open %s\n", filename);
           LOGE("Could not open %s\n", filename);
           exit(1);
       }


       /* decode until eof */
       avpkt.data = inbuf;
       avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f);

       while (avpkt.size > 0) {
           int i, ch;
           int got_frame = 0;

           if (!decoded_frame) {
               if (!(decoded_frame = av_frame_alloc())) {
                   fprintf(stderr, "Could not allocate audio frame\n");
                   LOGE("Could not allocate audio frame\n");
                   exit(1);
               }
           }

           len = avcodec_decode_audio4(c, decoded_frame, & got_frame, & avpkt);
           if (len < 0) {
               fprintf(stderr, "Error while decoding\n");
               LOGE("Error while decoding\n");
               exit(1);
           }
           if (got_frame) {
               /* if a frame has been decoded, output it */
               int data_size = av_get_bytes_per_sample(c - > sample_fmt);
               if (data_size < 0) {
                   /* This should not occur, checking just for paranoia */
                   fprintf(stderr, "Failed to calculate data size\n");
                   LOGE("Failed to calculate data size\n");
                   exit(1);
               }
               if (data_size > 0) {

                   jbyte * bytes = ( * env) - > GetByteArrayElements(env, array, NULL);
                   memcpy(bytes, decoded_frame, got_frame); //
                   ( * env) - > ReleaseByteArrayElements(env, array, bytes, 0);
                   ( * env) - > CallVoidMethod(env, obj, play, array, got_frame);
                   LOGE("DECODING ERROR5");
               }
           }
           avpkt.size -= len;
           avpkt.data += len;
           avpkt.dts =
               avpkt.pts = AV_NOPTS_VALUE;
           if (avpkt.size < AUDIO_REFILL_THRESH) {
               /* Refill the input buffer, to avoid trying to decode
                * incomplete frames. Instead of this, one could also use
                * a parser, or use a proper container format through
                * libavformat. */
               memmove(inbuf, avpkt.data, avpkt.size);
               avpkt.data = inbuf;
               len = fread(avpkt.data + avpkt.size, 1,
                   AUDIO_INBUF_SIZE - avpkt.size, f);
               if (len > 0)
                   avpkt.size += len;
           }
       }


       fclose(f);

       avcodec_free_context( & c);
       av_frame_free( & decoded_frame);

    }

    The Java code :

    package com.example.home.hellondk;

    import android.media.AudioFormat;
    import android.media.AudioManager;
    import android.media.AudioTrack;
    import android.media.MediaPlayer;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.util.Log;

    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;

    public class MainActivity extends AppCompatActivity {
       static {
           System.loadLibrary("MyLibraryPlayer");
       }
       public native void createEngine();

       public native void audio_decode_example(String outfilename, byte[] array);



       private AudioTrack track;
       private FileOutputStream os;

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

    /*        MediaPlayer mp = new MediaPlayer();
           mp.start();*/

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

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

           byte[] bytes = new byte[bufSize];

           try {
               os = new FileOutputStream("/storage/emulated/0/Cloud Radio/a.out", false);
           } catch (FileNotFoundException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
           }
      audio_decode_example("/storage/emulated/0/Cloud Radio/test.mp3", bytes);

       }

       void playSound(byte[] buf, int size) {
           //android.util.Log.v("ROHAUPT", "RAH Playing");
           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();
           }
       }
    }

    I always got this error : Error while decoding .
    i’ve tried to change the decoder "AV_CODEC_ID_MP3" no sucess !
    Thank you so much for your help.
    Kind regards

  • avformat/mxfdec : Fix Sign error in mxf_read_primer_pack()

    29 août 2017, par 孙浩(晓黑)
    avformat/mxfdec : Fix Sign error in mxf_read_primer_pack()
    

    Fixes : 20170829B.mxf

    Co-Author : 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
    Found-by : Xiaohei and Wangchu from Alibaba Security Team
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/mxfdec.c