Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (9199)

  • SDL Audio - Plays only Static Noise

    19 août 2019, par bcpermafrost

    Im having an issue with playing audio.

    Im new to the SDL World of things so im learning from a tutorial.

    http://dranger.com/ffmpeg/tutorial03.html

    As far as audio goes, i have exactly what he put down and didnt get the result he says I should get. In the end of the lesson he specifies that the audio should play normally. However all i get is excessively loud static noise. This leads me to believe that the packets arent being read correctly. However I have no idea how to debug or look for the issue.

    Here is my main loop for parsing the packets :

    while (av_read_frame(pFormatCtx, &packet) >= 0) {

            if (packet.stream_index == videoStream) {
                avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);

                if (frameFinished){

                    AVPicture pict;

                    pict.data[0] = yPlane;
                    pict.data[1] = uPlane;
                    pict.data[2] = vPlane;
                    pict.linesize[0] = pCodecCtx->width;
                    pict.linesize[1] = uvPitch;
                    pict.linesize[2] = uvPitch;

                    sws_scale(sws_ctx,
                        pFrame->data, pFrame->linesize,
                        0, pCodecCtx->height,
                        pict.data, pict.linesize);

                    //SDL_UnlockTexture(bmp);

                    SDL_UpdateYUVTexture(bmp, 0,
                        yPlane, pCodecCtx->width,
                        uPlane, uvPitch,
                        vPlane, uvPitch);


                    SDL_RenderClear(renderer);
                    SDL_RenderCopy(renderer, bmp, NULL, NULL);
                    SDL_RenderPresent(renderer);


                    av_free_packet(&packet);


                }

            }
            else if (packet.stream_index == audioStream) {
                packet_queue_put(&audioq, &packet);

            }
            else
                av_free_packet(&packet);



            SDL_PollEvent(&event);

            switch (event.type) {
            case SDL_QUIT:
                quit = 1;
                SDL_DestroyTexture(bmp);
                SDL_DestroyRenderer(renderer);
                SDL_DestroyWindow(screen);
                SDL_Quit();
                exit(0);
                break;
            default:
                break;

            }

        }

    this is my initialization of the audio device :

    aCodecCtxOrig = pFormatCtx->streams[audioStream]->codec;
       aCodec = avcodec_find_decoder(aCodecCtxOrig->codec_id);
       if (!aCodec) {
           fprintf(stderr, "Unsupported codec!\n");
           return -1;
       }

       // Copy context
       aCodecCtx = avcodec_alloc_context3(aCodec);
       if (avcodec_copy_context(aCodecCtx, aCodecCtxOrig) != 0) {
           fprintf(stderr, "Couldn't copy codec context");
           return -1; // Error copying codec context
       }


       wanted_spec.freq = aCodecCtx->sample_rate;
       wanted_spec.format = AUDIO_U16SYS;
       wanted_spec.channels = aCodecCtx->channels;
       wanted_spec.silence = 0;
       wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE;
       wanted_spec.callback = audio_callback;
       wanted_spec.userdata = aCodecCtx;


       if (SDL_OpenAudio( &wanted_spec, &spec) < 0) {
           fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError());
           return -1;
       }

       avcodec_open2(aCodecCtx, aCodec, NULL);

       // audio_st = pFormatCtx->streams[index]
       packet_queue_init(&audioq);
       SDL_PauseAudio(0);

    The Call back (same as the tutorial) :|

    void audio_callback(void *userdata, Uint8 *stream, int len) {

       AVCodecContext *aCodecCtx = (AVCodecContext *)userdata;
       int len1, audio_size;

       static uint8_t audio_buf[(MAX_AUDIO_FRAME_SIZE * 3) / 2];
       static unsigned int audio_buf_size = 0;
       static unsigned int audio_buf_index = 0;

       while (len > 0) {
           if (audio_buf_index >= audio_buf_size) {
               /* We have already sent all our data; get more */
               audio_size = audio_decode_frame(aCodecCtx, audio_buf, sizeof(audio_buf));
               if (audio_size < 0) {
                   /* If error, output silence */
                   audio_buf_size = 1024; // arbitrary?
                   memset(audio_buf, 0, audio_buf_size);
               }
               else {
                   audio_buf_size = audio_size;
               }
               audio_buf_index = 0;
           }
           len1 = audio_buf_size - audio_buf_index;
           if (len1 > len)
               len1 = len;
           memcpy(stream, (uint8_t *)audio_buf + audio_buf_index, len1);
           len -= len1;
           stream += len1;
           audio_buf_index += len1;
       }
    }
  • HTML5 Video plays on macOS safari, not iOS Safari

    8 février 2019, par BenJ

    Everything seems to work in Safari and Chrome on the desktop. But iOS is not cooperating.

    Here’s how I encoded the video :

    ffmpeg -an -i orig.mp4 -vcodec libx264 -crf 30 -maxrate 900 -pix_fmt yuv420p -profile:v baseline -level 3 homepage.mp4

    Here’s my html :

    <video playsinline="playsinline" muted="muted" autoplay="autoplay" loop="loop" src="/assets/videos/homepage.mp4" type="video/mp4"></video>

    Here’s my css :

    video {
       position: fixed;
       top: 50%;
       left: 50%;
       min-width: 100%;
       min-height: 100%;
       width: auto;
       height: auto;
       z-index: -100;
       transform: translateX(-50%) translateY(-50%);
       background-size: cover;
       transition: 1s opacity;
    }

    If you’d like to see for yourself : 2606southave.com

  • Building FFMPEGINTEROP with Visual Studio 2017 ?

    25 septembre 2018, par Francois Gagnon

    I’m working on a project that requires a video player. I’ve been using the standard UWP MediaPlayerElement but it refuses to read many types of videos, including ASF and FLV and some older MPG.

    I’ve read that ffmpeginterop is more compatible with a variety of codecs. However building it is a finicky and all the instructions are designed for VS2015 and command prompt for ARM processor, which does not exist for VS2017. I can’t find an updated version of the instructions (Left a message on their GIT site as well... no answers).

    So my question is two-fold :

    1. Is there any way to download the missing/updated codecs to include them in my project that uses the standard UWP approach ?

    2. Is there an updated way/tutorial/instructions of building ffmpeginterop with VS2017 ?

    3. Is ffmpeginterop too old and I should not build using it going forward ?

    Thanks !