Recherche avancée

Médias (91)

Autres articles (54)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11489)

  • omxplayer : audio out of sync

    31 janvier 2014, par Jan Pulpan

    We build simple web controlled video player based on Raspberry Pi and omxplayer. The problem we have is any file which is transcoded with ffmpeg has an audio out of sync. The video file produced at iPad and uploaded directly to Pi plays fine. The same file transcoded with simple ffmpeg command like this doesn't and audio is about 1s delayed :

    ffmpeg -i input.mp4 output.mp4

    The audio out of sync problem shows at Raspberry/omxplayer only. If I play the same file at computer it's perfectly fine. The input file is 720p h264 aac one.

    Anyone has solved something like this before ?

    Thanks !

  • ffmpeg trimming video with -ss and -t working only with audio

    16 février 2014, par user3197974

    I am trying to extract 5 seconds out of a TS stream using the command below :

    ffmpeg -ss 780 -t 5 -i "D:\TS\stream_457.ts" -map 0:17 -map 0:7 -qscale 6 -y -async 1 "D:\1_O.ts"

    The trimming seems to work on the audio track, the output file plays only 5 seconds of audio but the video starts at second 780 and continues until the end of the stream. So i end up with 5 seconds of audio and 37 seconds of video.

    How can i trim both audio and video ?

    Thanks

  • Decode audio using libavcodec and play using libAO ?

    21 mars 2012, par Ashika Umanga Umagiliya

    I use following code snippet to decode audio files (tested with MP3,WAV,WMV).

    But when it plays the audio , it just gives static sounds and crashes time to time.
    Any hints on what i am doing wrong here ?

    #include
    #include
    #include
    #include


    extern "C" {
    #include "libavutil/mathematics.h"
    #include "libavformat/avformat.h"
    #include "libswscale/swscale.h"
    #include <ao></ao>ao.h>

    }

    void die(const char *msg)
    {
       fprintf(stderr,"%s\n",msg);
       exit(1);
    }

    int main(int argc, char **argv)
    {

       const char* input_filename=argv[1];

       //avcodec_register_all();
       av_register_all();
       //av_ini

       AVFormatContext* container=avformat_alloc_context();
       if(avformat_open_input(&amp;container,input_filename,NULL,NULL)&lt;0){
           die("Could not open file");
       }

       if(av_find_stream_info(container)&lt;0){
           die("Could not find file info");
       }
       av_dump_format(container,0,input_filename,false);

       int stream_id=-1;
       int i;
       for(i=0;inb_streams;i++){
           if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
               stream_id=i;
               break;
           }
       }
       if(stream_id==-1){
           die("Could not find Audio Stream");
       }

       AVDictionary *metadata=container->metadata;

       AVCodecContext *ctx=container->streams[stream_id]->codec;
       AVCodec *codec=avcodec_find_decoder(ctx->codec_id);

       if(codec==NULL){
           die("cannot find codec!");
       }

       if(avcodec_open(ctx,codec)&lt;0){
           die("Codec cannot be found");
       }

       //ctx=avcodec_alloc_context3(codec);

       //initialize AO lib
       ao_initialize();

       int driver=ao_default_driver_id();

       ao_sample_format sformat;
       sformat.bits=16;
       sformat.channels=2;
       sformat.rate=44100;
       sformat.byte_format=AO_FMT_NATIVE;
       sformat.matrix=0;

       ao_device *adevice=ao_open_live(driver,&amp;sformat,NULL);
       //end of init AO LIB

       AVPacket packet;
       av_init_packet(&amp;packet);

       AVFrame *frame=avcodec_alloc_frame();

       int buffer_size=AVCODEC_MAX_AUDIO_FRAME_SIZE;
       uint8_t buffer[buffer_size];
       packet.data=buffer;
       packet.size =buffer_size;



       int len;
       int frameFinished=0;
       while(av_read_frame(container,&amp;packet)>=0)
       {

           if(packet.stream_index==stream_id){
               //printf("Audio Frame read  \n");
               int len=avcodec_decode_audio4(ctx,frame,&amp;frameFinished,&amp;packet);
               //frame->
               if(frameFinished){
                   //printf("Finished reading Frame %d %d\n",packet.size,len);
                   ao_play(adevice, (char*)frame->data, len);
               }

           }


       }

       av_close_input_file(container);
       ao_shutdown();
       return 0;
    }