Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (109)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • 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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (10718)

  • ffmpeg conversion for apple tv

    24 janvier 2013, par Sam

    I have one particular movie file that is giving me grief while I am trying to convert my movie library to be able to be viewed on my Apple TV. I have been using iFlicks to convert all of my files and have only had one issue. The original of this particular movie file plays fine but after it has been converted the video freezes after a few minutes but the audio keeps playing. I tried using ffmpeg to convert the file but now the file is very choppy. The first time it is played the video will be choppy, the next time the audio will be choppy... but it plays fine in VLC for some reason. So I was thinking that maybe I have chosen the wrong codecs to suit Quicktime/Apple TV. Below is the command I used for ffmpeg. Have I chosen the right codecs and actually written the command correctly ? (I haven't really used ffmpeg before...)

    ffmpeg -i input.avi -vcodec libx264 -acodec libfaac output.m4v
  • Convert .m4a to PCM using libavcodec

    17 décembre 2013, par gmcc051

    I'm trying to convert a .m4a file to raw PCM file so that I can play it back in Audacity.

    According to the AVCodecContext it is a 44100 Hz track using the sample format AV_SAMPLE_FMT_FLTP which, to my understanding, when decodeded using avcodec_decode_audio4, I should get two arrays of floating point values (one for each channel).

    I'm unsure of the significance of the AVCodecContext's bits_per_coded_sample = 16

    Unfortunately Audacity plays the result back as if I have the original track is mixed in with some white noise.

    Here is some sample code of what I've been done. Note that I've also added a case for a track that uses signed 16bit non-interleaved data (sample_format = AC_SAMPLE_FMT_S16P), which Audacity plays back fine.

    int AudioDecoder::decode(std::string path)
    {
     const char* input_filename=path.c_str();

     av_register_all();

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

     if(avformat_find_stream_info(container, NULL)<0){
         printf("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){
       printf("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){
       printf("cannot find codec!");
     }

     if(avcodec_open2(ctx,codec,NULL)<0){
        printf("Codec cannot be found");
     }

     AVSampleFormat sfmt = ctx->sample_fmt;

     AVPacket packet;
     av_init_packet(&packet);
     AVFrame *frame = avcodec_alloc_frame();

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

     FILE *outfile = fopen("test.raw", "wb");

     int len;
     int frameFinished=0;

     while(av_read_frame(container,&packet) >= 0)
     {
         if(packet.stream_index==stream_id)
         {
           //printf("Audio Frame read \n");
           int len=avcodec_decode_audio4(ctx, frame, &frameFinished, &packet);

           if(frameFinished)
           {      
             if (sfmt==AV_SAMPLE_FMT_S16P)
             { // Audacity: 16bit PCM little endian stereo
               int16_t* ptr_l = (int16_t*)frame->extended_data[0];
               int16_t* ptr_r = (int16_t*)frame->extended_data[1];
               for (int i=0; inb_samples; i++)
               {
                 fwrite(ptr_l++, sizeof(int16_t), 1, outfile);
                 fwrite(ptr_r++, sizeof(int16_t), 1, outfile);
               }
             }
             else if (sfmt==AV_SAMPLE_FMT_FLTP)
             { //Audacity: big endian 32bit stereo start offset 7 (but has noise)
               float* ptr_l = (float*)frame->extended_data[0];
               float* ptr_r = (float*)frame->extended_data[1];
               for (int i=0; inb_samples; i++)
               {
                   fwrite(ptr_l++, sizeof(float), 1, outfile);
                   fwrite(ptr_r++, sizeof(float), 1, outfile);
                }
              }            
           }
       }
    }
    fclose(outfile);
    av_close_input_file(container);
    return 0;  

    }

    I'm hoping I've just done a naive conversion (most/less significant bit issues), but at present I've been unable to figure it out. Note that Audacity can only import RAW float data if its 32bit or 64 bit float (big or little endian).

    Thanks for any insight.

  • How to add more codec support in FFmpeg library used with Android ?

    2 janvier 2013, par AB1209

    I want to use ffmpeg library in my Android app to play .ts video file format.I am trying to run sample app given at GitHub Appunite.

    So far I have managed to compile ffmpeg library & build .so files.I am working on Ubuntu 10.10 & using NDK r8.

    Sample app works fine & plays file formats like .mp4 & .3gp but it doesn't play .FLV & .ts file (which is my requirement).

    Whenever I try to play .ts or .FLV files it says "Could not open stream"

    In Logcat it shows

    E/player.c(28005): player_set_data_source Could not open video file: file:///mnt/sdcard/football.ts (-1094995529: Invalid data found when processing input)

    I am trying this for weeks.So far I have not got any way. Please help

    Thanks