Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (98)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (9171)

  • Assertion error when encoding video using ffmpeg library on visual studio c++

    18 juin 2015, par Leon Phan

    I have a project, that i need to received data from a rtsp link, decode,resize video, encode it and save to .mp4 file.

    this is my code :

    AVPacket destPacket;
    av_init_packet(&destPacket);
    destPacket.data = NULL;
    destPacket.size = 0;
    while(av_read_frame(i_format_context, &packet)>=0) {
       if(packet.stream_index==video_stream_index) {
           int rest = avcodec_decode_video2(copyInputCodec, pFrame, &frameFinished, &packet);
           if(frameFinished) {
               av_init_packet(&destPacket);
               destPacket.data = NULL;
               destPacket.size = 0;
               av_free_packet(&destPacket);
               //deocde here
               int ret_scale = sws_scale(sws_ctx,pFrame->data,pFrame->linesize,0,copyInputCodec->height,encodeFrame->data,encodeFrame->linesize);
               encodeFrame->pts=i;
               int ret_enc = avcodec_encode_video2(copyOutputCodec,&destPacket,encodeFrame,&encodeFinishsed);//<--- Problem here.
               getchar();
           }
       }
    }

    And this is output error

    [swscaler @ 00607880] Warning : data is not aligned ! This can lead to a
    speedlo ss
    Assertion avctx->codec->encode2 failed at /home/kyle/software/ffmpeg/source/ffmp
    eg-git/libavcodec/utils.c:2134

    I try to run many sample code to encode video, the result is same.

    Thanks for help.

    PS : sorry about my English skill.

  • Encode audio to aac with libavcodec

    22 octobre 2015, par ryan

    I’m using libavcodec (latest git as of 3/3/10) to encode raw pcm to aac
    (libfaac support enabled). I do this by calling avcodec_encode_audio
    repeatedly with codec_context->frame_size samples each time. The first four
    calls return successfully, but the fifth call never returns. When I use gdb
    to break, the stack is corrupt.

    If I use audacity to export the pcm data to a .wav file, then I can use
    command-line ffmpeg to convert to aac without any issues, so I’m sure it’s
    something I’m doing wrong.

    I’ve written a small test program that duplicates my problem. It reads the
    test data from a file, which is available here :
    http://birdie.protoven.com/audio.pcm ( 2 seconds of signed 16 bit LE pcm)

    I can make it all work if I use FAAC directly, but the code would be a little cleaner if I could just use libavcodec, as I’m also encoding video, and writing both to an mp4.

    ffmpeg version info :

    FFmpeg version git-c280040, Copyright (c) 2000-2010 the FFmpeg developers
     built on Mar  3 2010 15:40:46 with gcc 4.4.1
     configuration: --enable-libfaac --enable-gpl --enable-nonfree --enable-version3 --enable-postproc --enable-pthreads --enable-debug=3 --enable-shared
     libavutil     50.10. 0 / 50.10. 0
     libavcodec    52.55. 0 / 52.55. 0
     libavformat   52.54. 0 / 52.54. 0
     libavdevice   52. 2. 0 / 52. 2. 0
     libswscale     0.10. 0 /  0.10. 0
     libpostproc   51. 2. 0 / 51. 2. 0

    Is there something I’m not setting, or setting incorrectly in my codec
    context, maybe ? Any help is greatly appreciated !

    Here is my test code :

    #include
    #include <libavcodec></libavcodec>avcodec.h>

    void EncodeTest(int sampleRate, int channels, int audioBitrate,
       uint8_t *audioData, size_t audioSize)
    {
       AVCodecContext  *audioCodec;
       AVCodec *codec;
       uint8_t *buf;
       int bufSize, frameBytes;

       avcodec_register_all();

       //Set up audio encoder
       codec = avcodec_find_encoder(CODEC_ID_AAC);
       if (codec == NULL) return;
       audioCodec = avcodec_alloc_context();
       audioCodec->bit_rate = audioBitrate;
       audioCodec->sample_fmt = SAMPLE_FMT_S16;
       audioCodec->sample_rate = sampleRate;
       audioCodec->channels = channels;
       audioCodec->profile = FF_PROFILE_AAC_MAIN;
       audioCodec->time_base = (AVRational){1, sampleRate};
       audioCodec->codec_type = CODEC_TYPE_AUDIO;
       if (avcodec_open(audioCodec, codec) &lt; 0) return;

       bufSize = FF_MIN_BUFFER_SIZE * 10;
       buf = (uint8_t *)malloc(bufSize);
       if (buf == NULL) return;

       frameBytes = audioCodec->frame_size * audioCodec->channels * 2;
       while (audioSize >= frameBytes)
       {
           int packetSize;

           packetSize = avcodec_encode_audio(audioCodec, buf, bufSize, (short *)audioData);
           printf("encoder returned %d bytes of data\n", packetSize);
           audioData += frameBytes;
           audioSize -= frameBytes;
       }
    }

    int main()
    {
       FILE *stream = fopen("audio.pcm", "rb");
       size_t size;
       uint8_t *buf;

       if (stream == NULL)
       {
           printf("Unable to open file\n");
           return 1;
       }

       fseek(stream, 0, SEEK_END);
       size = ftell(stream);
       fseek(stream, 0, SEEK_SET);
       buf = (uint8_t *)malloc(size);
       fread(buf, sizeof(uint8_t), size, stream);
       fclose(stream);

       EncodeTest(32000, 2, 448000, buf, size);
    }
  • configure : Allow log2 with MSVC 2013 onwards.

    11 mai 2014, par Matt Oliver
    configure : Allow log2 with MSVC 2013 onwards.
    

    Only MSVC 2010 in x64 mode, in the static msvcrt, had a
    stray log2 function (which wasn’t available in the headers).

    MSVC 2013 has got a proper log2 function though.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] configure