Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (44)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (11129)

  • Join us for the Piwik Community Meetup 2015 !

    25 juin 2015, par Piwik Core Team — Community, Meta

    We’re excited to announce that our third Piwik Community Meetup will be held in Berlin on Tuesday, the 4th of August, 2015. Don’t miss this great opportunity to connect with other users and meet the core team behind Piwik. It’s free, so REGISTER TODAY ! And maybe you would like to share your Piwik use case ? We’re also waiting for your presentation ideas.

    We will cover some of the upcoming features, discuss the future of Piwik, share tricks and hacks to help you get the most out of your Piwik platform, and socialise. If you use Piwik to improve your websites and apps, or are just generally curious about digital analytics and marketing – this event is not to be missed. As our core team is scattered all over the world, this will be a rare opportunity for you to meet and talk to us all at once – especially for those of you interested in the platform, integrating your app with Piwik, and building plugins.

    After the official part, we would like to enjoy drinks with all the participants in the nearby bars. We hope you will be able to join us !

    All Piwik community members are warmly invited to take part in the meetup !

    Piwik Community Meetup 2015

    When ?

    Tuesday, the 4th of August, from 5-9pm

    Where ?

    Kulturbrauerei
    Schönhauser Allee
    Prenzlauer Berg area
    Berlin, Germany
    exact directions tbc.

    Languages :

    English and German

    Book tickets :

    BOOK YOUR FREE INVITATION HERE

    Open call for YOUR presentation ideas

    We would also like to hear how you use Piwik – we’ll be delighted if you’d share your interesting use case during the Meetup. Please send your presentation ideas (speaking time : 5 to 7 minutes) to : meetup@piwik.pro ! Deadline : 20th of July 2015.

    Contact the organisers :

    meetup@piwik.pro

  • ffmpeg AVStream::codecpar is null

    12 décembre 2022, par RuiChen0101

    I'm trying to make a simple audio decoder by using libav, and I encounter a problem.
I cannot get AVCodecParameters from AVStream, codepar always is null.

    


    here is my code.

    


    #include &#xA;#include &#xA;#include &#xA;#include &#xA;&#xA;extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>channel_layout.h>&#xA;#include <libswresample></libswresample>swresample.h>&#xA;}&#xA;&#xA;int main(int argc, char** argv) {&#xA;  if (argc != 2) {&#xA;    fprintf(stderr, "usage: %s input_file > output_file\n", argv[0]);&#xA;    exit(1);&#xA;  }&#xA;&#xA;  const int out_channels = 2, out_samples = 512, sample_rate = 44100;&#xA;&#xA;  int max_buffer_size;&#xA;&#xA;  // register supported formats and codecs&#xA;  av_register_all();&#xA;&#xA;  // allocate empty format context&#xA;  // provides methods for reading input packets&#xA;  AVFormatContext* fmt_ctx = avformat_alloc_context();&#xA;&#xA;  // determine input file type and initialize format context&#xA;  if (avformat_open_input(&amp;fmt_ctx, argv[1], NULL, NULL) != 0) {&#xA;      fprintf(stderr, "error: avformat_open_input()\n");&#xA;      exit(1);&#xA;  }&#xA;&#xA;  // determine supported codecs for input file streams and add&#xA;  // them to format context&#xA;  if (avformat_find_stream_info(fmt_ctx, NULL) &lt; 0) {&#xA;    fprintf(stderr, "error: avformat_find_stream_info()\n");&#xA;    exit(1);&#xA;  }&#xA;&#xA;  AVCodec* codec = NULL;&#xA;  int stream = 0;&#xA;&#xA;  // find audio stream in format context&#xA;    &#xA;  fprintf(stderr, "%d\n", fmt_ctx->nb_streams);&#xA;  for (int i = 0; i &lt; fmt_ctx->nb_streams; i&#x2B;&#x2B;) {&#xA;    AVCodecParameters* avCodecParameters = NULL;&#xA;    avCodecParameters = fmt_ctx->streams[i]->codecpar;&#xA;    if(!avCodecParameters){&#xA;      fprintf(stderr, "error: CodecParameters\n");// always fail here&#xA;      exit(1);&#xA;    }&#xA;    if(avCodecParameters->codec_type == AVMEDIA_TYPE_AUDIO){&#xA;      stream = i;&#xA;      codec = avcodec_find_decoder(avCodecParameters->codec_id);&#xA;      if (!codec) {&#xA;          fprintf(stderr, "error: avcodec_find_decoder()\n");&#xA;          exit(1);&#xA;      }&#xA;      break;&#xA;    }&#xA;  }&#xA;&#xA;  if (stream == fmt_ctx->nb_streams) {&#xA;    fprintf(stderr, "error: no audio stream found\n");&#xA;    exit(1);&#xA;  }&#xA;  return 0;&#xA;}&#xA;

    &#xA;

    For the input file format, I have tried .wav and .m4a file

    &#xA;

    and the output always is

    &#xA;

    1&#xA;error: CodecParameters&#xA;

    &#xA;

    Dose anyone has the same problem ?

    &#xA;

    How to solve it ?

    &#xA;

    thanks !

    &#xA;

  • C++ ffmpeg mp4 to mp3 transcoding

    2 juillet 2014, par Unknown

    I am working on an application that converts the audio of mp4 video to mp3 files. I managed to compile ffmpeg with libmp3lame.

    This is what I have so far

    // Step 1 - Register all formats and codecs
    avcodec_register_all();
    av_register_all();

    AVFormatContext* fmtCtx = avformat_alloc_context();

    // Step 2 - Open input file, and allocate format context
    if(avformat_open_input(&amp;fmtCtx, filePath.toLocal8Bit().data(), NULL, NULL) &lt; 0)
       qDebug() &lt;&lt; "Error while opening " &lt;&lt; filePath;

    // Step 3 - Retrieve stream information
    if(avformat_find_stream_info(fmtCtx, NULL) &lt; 0)
       qDebug() &lt;&lt; "Error while finding stream info";

    // Step 4 - Find the audiostream
    int audioStreamIdx = -1;
    for(uint i=0; inb_streams; i++) {
       if(fmtCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
           audioStreamIdx = i;
           break;
       }
    }

    if(audioStreamIdx != -1) {
       AVCodecContext *audioDecCtx = fmtCtx->streams[audioStreamIdx]->codec;

       // Step 5
       AVCodec *aCodec = avcodec_find_decoder(audioDecCtx->codec_id);
       avcodec_open2(audioDecCtx, aCodec, NULL);

       // Step 6
       AVOutputFormat* outputFormat = av_guess_format(NULL, outPath.toLocal8Bit().data(), NULL);

       // Step 7
       AVFormatContext *outformatCtx = avformat_alloc_context();

       // Step 8
       AVCodec *encoder = avcodec_find_encoder(AV_CODEC_ID_MP3);
       //encoder->sample_fmts = AV_SAMPLE_FMT_S16;
       AVCodecContext *audioEncCtx = avcodec_alloc_context3(encoder);
       audioEncCtx->sample_fmt = AV_SAMPLE_FMT_S16P;
       audioEncCtx->sample_rate = 44100;
       audioEncCtx->channel_layout = av_get_default_channel_layout(audioDecCtx->channels);

       avcodec_open2(audioEncCtx, encoder, NULL);

       // Step 9
       AVFrame *frame = av_frame_alloc();

       AVPacket pkt;
       av_init_packet(&amp;pkt);

       // Step 10
       while(av_read_frame(fmtCtx, &amp;pkt) == 0) {
           int got_frame = 0;

           if(pkt.stream_index == audioStreamIdx) {
               int len = avcodec_decode_audio4(audioDecCtx, frame, &amp;got_frame, &amp;pkt);

               if(got_frame) {
                   // Step 11
                   AVPacket outPkt;
                   av_init_packet(&amp;outPkt);

                   int got_packet = 0;

                   qDebug() &lt;&lt; "This is printed";

                   int error = avcodec_encode_audio2(audioEncCtx, &amp;outPkt, frame, &amp;got_packet);

                   qDebug() &lt;&lt; "This is not printed...";
              }
           }
       }

       av_free_packet(&amp;pkt);
    }

    avformat_close_input(&amp;fmtCtx);

    It goes wrong at the line avcodec_encode_audio2(). It seems like the function does not return. As you can see, the line after the encoding line is not printed. What am I doing wrong ?

    Thanks in advance !