Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

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

Sur d’autres sites (6934)

  • How to save an SDL bitmap to memory and load it back ?

    19 novembre 2012, par Nav

    I have a bunch of RWops functions :

    static int myseekfunc(SDL_RWops *context, int offset, int whence) { SDL_SetError("Can't seek in this kind of RWops"); return(-1); }
    static int myreadfunc(SDL_RWops *context, void *ptr, int size, int maxnum) { memset(ptr,0,size*maxnum); return(maxnum); }
    static int mywritefunc(SDL_RWops *context, const void *ptr, int size, int num) { return(num); }
    static int myclosefunc(SDL_RWops *context)
    {
     if(context->type != 0xdeadbeef) { SDL_SetError("Wrong kind of RWops for myclosefunc()"); return(-1); }
     free(context->hidden.unknown.data1);
     SDL_FreeRW(context);
     return(0);
    }

    // Note that this function is NOT static -- we want it directly callable from other source files
    SDL_RWops *MyCustomRWop()
    {
     SDL_RWops *c=SDL_AllocRW();
     if(c==NULL) return(NULL);

     c->seek =myseekfunc;
     c->read =myreadfunc;
     c->write=mywritefunc;
     c->close=myclosefunc;
     c->type =0xdeadbeef;
     printf("deadbeef=%d\n",c->type);
     c->hidden.unknown.data1=malloc(256);//IS THIS CORRECT?
     return(c);
    }

    with which I'm trying to write a BMP into memory and then extract it back. The below code is from tutorial02.
    Two problems I'm facing are :
    1. Unless I call SDL_DisplayYUVOverlay, the SDL_SaveBMP function outputs a blank BMP file to the hard disk. How can I output a BMP file without having to call SDL_DisplayYUVOverlay ?
    2. Although I'm able to save the BMP to memory with SDL_SaveBMP_RW and free the memory with filestream->close, I'm unable to load the BMP back from memory with SDL_SaveBMP. The application crashes while trying to load it. Is it because of the c->hidden.unknown.data1=malloc(256); code above ? What would be the right way of allocating this memory ?

     AVFormatContext *pFormatCtx = NULL;
     int             i, videoStream;
     AVCodecContext  *pCodecCtx = NULL;
     AVCodec         *pCodec = NULL;
     AVFrame         *pFrame = NULL;
     AVPacket        packet;
     SDL_Overlay     *bmp = NULL;
     SDL_Surface     *screen = NULL;
     SDL_Surface     *screen2 = NULL;
     SDL_Rect        rect;
    ....
    ....    
    if(frameFinished)

    {
    SDL_LockYUVOverlay(bmp);//-----------lock

    AVPicture pict;
    pict.data[0] = bmp->pixels[0];
    pict.data[1] = bmp->pixels[2];
    pict.data[2] = bmp->pixels[1];

    pict.linesize[0] = bmp->pitches[0];
    pict.linesize[1] = bmp->pitches[2];
    pict.linesize[2] = bmp->pitches[1];

    // Convert the image into YUV format that SDL uses
    sws_scale( sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pict.data, pict.linesize );

    SDL_UnlockYUVOverlay(bmp);//-----------unlock

    rect.x = 0;
    rect.y = 0;
    rect.w = pCodecCtx->width;
    rect.h = pCodecCtx->height;
    SDL_DisplayYUVOverlay(bmp, &rect);
    ++i;

    SDL_RWops *filestream = MyCustomRWop();//SDL_AllocRW();
    SDL_SaveBMP_RW (screen, filestream, i);
    screen2 = SDL_LoadBMP_RW(filestream,1);//LOADING IS THE PROBLEM HERE. DON'T KNOW WHY
    filestream->close;
    SDL_SaveBMP(screen, filepointer);
  • ReSample RTP Audio data over Socket as PCM data using FFMPEG

    5 février 2020, par GJ.

    I want to receive a RTP Stream and send the raw data received in it over TCP / UDP socket. For this i am trying following commands.

    1. I am sending the RTP stream using following command.

      ffmpeg -re -i hello.wav -ar 8000 -f mulaw -f rtp rtp ://127.0.0.1:1234

    2. Receiver to re transmit the stream over TCP / UDP socket.

      ffmpeg -i rtp ://127.0.0.1:1234 -f mulaw tcp ://127.0.0.1:5555 -hide_banner

    3. A Player to play this Socket stream to verify.

      ffplay tcp ://127.0.0.1:5555 ?listen

    My second command shows that its receiving data and transmitting the data to tcp over 5555 port.

    Input #0, rtp, from 'rtp://127.0.0.1:1234':
     Duration: N/A, start: 0.000000, bitrate: 64 kb/s
       Stream #0:0: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (pcm_mulaw (native) -> pcm_mulaw (native))
    Press [q] to stop, [?] for help
    Output #0, mulaw, to 'tcp://127.0.0.1:5555':
     Metadata:
       encoder         : Lavf58.29.100
       Stream #0:0: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
       Metadata:
         encoder         : Lavc58.54.100 pcm_mulaw

    But the third command does not receive anything, even i tried dumping the response into a file using FFMPEG in command three but same results.

    What am i doing wrong, Please suggest the correct commands using FFMPEG.

  • How to union RAW video data stream with RAW data audio stream through ffmpeg .net

    17 septembre 2022, par zabitstack

    I'm trying to union a raw video data stream with raw audio data stream but without success ! I capture video from webcam and audio from microphone in .net Accord Framework application.

    


    I want use ffmpeg core .net library to transform raw video data into a avi file, then same thing transform raw audio data into mp3 format file. Next merge mp3 with avi in single avi video+audio file.

    


    If you want, I can post source code how I capture data.