Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (61)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • 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 ;

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (11685)

  • Interact with ffmpeg from a .NET program - Write Input

    7 mai 2015, par Shimmy

    In reference to this question, as you can see I managed to run and receive data from the program.

    However I didn’t manage to submit data to it, for instance, while converting a file, pressing q immediately stop conversion and stops the program.
    I need my application to support stopping the process as well, and I think this should be done by passing this parameter to the ffmpeg app, since I want it to take care of all uncollected resource or whatever dust it would leave behind if I would just go and use process.Kill()

    Here is what I’ve tried :

    static int lineCount = 0;
    static bool flag;
    static void process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
    {
     Console.WriteLine("Error ({1:m:s:fff}: {0})", lineCount++,
         DateTime.Now);

     if (e.Data != null && string.Equals(e.Data,"Press [q] to stop, [?] for help"))
       flag = true;

     if (flag)
     {
       flag = false;
       Console.WriteLine("Stopping ({0:m:s:fff})...", DateTime.Now);
       process.CancelErrorRead();
       process.CancelOutputRead();
       process.StandardInput.WriteLine("q");
     }  

     Console.WriteLine(e.Data);
     Console.WriteLine();
    }

    But it doesn’t do anything, seems that once the conversion has been requested, I have no control on it any more, I can only receive output from it. Running it as stand alone does allow me interaction of course.

    What am I missing here, is it a different trick in submitting the output or the code in previous answer is wrong, or I should have chosen a different approach ?

    For your attention, RedirectStandardInput is on.

    NOTE : as you can see in the answer of my previous question, ffmpeg interacts differently, I think the one who knows the answer will be (maybe I’m wrong) someone with experience in ffmpeg.

  • Interact with ffmpeg from a .NET program ?

    18 septembre 2011, par Shimmy

    I'm trying to create a .NET wrapper for media-file conversion using ffmepg, here is what I've tried :

    static void Main(string[] args)
    {
     if (File.Exists("sample.mp3")) File.Delete("sample.mp3");

     string result;

     using (Process p = new Process())
     {
       p.StartInfo.FileName = "ffmpeg";
       p.StartInfo.Arguments = "-i sample.wma sample.mp3";

       p.StartInfo.UseShellExecute = false;
       p.StartInfo.RedirectStandardOutput = true;

       p.Start();

       //result is assigned with an empty string!
       result = p.StandardOutput.ReadToEnd();

       p.WaitForExit();
     }
    }

    What actually happens is the content of the ffmpeg program is printed out to the Console app, but the result variable is an empty string. I want to control the conversion progress interactively, so the user doesn't even have to know I'm using ffmpeg, but he still knows the conversion progress' details and what percentage etc. the app is up to.

    Basically I would also be happy with a .NET wrapper for a P/Invoke to conversion function ONLY (I am not interested in a whole external library, unless I can extract the PI function from it).

    Anyone with experience in ffmpeg & .NET ?

    Update
    Please view my further question, how to write input to a running ffmpeg process.

  • iPhone ffmpeg dev using libav to decode from AMR to ACC codec

    10 octobre 2011, par VictorT

    It seems to be that, the AMR support of AudioQueue has been disappeared since iOS 4.3 was released. I can't use audio frame received from RSTP server with old way :

    audioFormat.mFormatID = kAudioFormatAMR;
    int err = AudioQueueNewOutput(&audioFormat, MyAudioQueueOutputCallback, self, NULL, kCFRunLoopCommonModes, 0, &audioQueue);

    As a result I received an error in last string.

    Maybe someone know how to decode AMR AVPacket into raw buffer and encode it with AAC or MP3 using LIBAV ?

    I've tried to use

    avcodec_decode_audio3

    It works and I can get raw buffer but when I'm trying to encode it with

    avcodec_encode_audio

    I get 0 as result

    This is my method to encode buffer :

    - (AVPacket) encodeRawFrame:(const short *) in_buffer withSize:(unsigned int) in_buf_byte_size
    {
       AVPacket res;
       AVCodec *codec;
       AVCodecContext *c= NULL;
       int count, out_size, outbuf_size, frame_byte_size;
       uint8_t *outbuf;

       avcodec_init();
       avcodec_register_all();

       printf("Audio encoding\n");

       codec = avcodec_find_encoder(CODEC_ID_AAC);
       if (!codec) {
           fprintf(stderr, "codec not found\n");
           return res;
       }

       c= avcodec_alloc_context();

       c->bit_rate = 64000;
       c->sample_rate = 24000;
       c->channels = 2;

       if (avcodec_open(c, codec) < 0)
       {
           fprintf(stderr, "could not open codec\n");
       }
       else
       {
           frame_byte_size=c->frame_size*2*2;
           count = in_buf_byte_size/frame_byte_size;

           fprintf(stderr, "Number of frames: %d\n", count);

           outbuf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
           outbuf = (uint8_t*) malloc(outbuf_size);

           out_size = avcodec_encode_audio(c, outbuf, outbuf_size, &in_buffer[frame_byte_size*i]);
           if(out_size >= 0)
           {
               res.size = outbuf_size;
               res.data = malloc(outbuf_size);                
           }

           free(outbuf);
       }


       avcodec_close(c);
       av_free(c);
       return res;
    }

    After encoding "out_size" is always 0 and result buffer is empty.

    Thanks.