Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (70)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (9533)

  • FFMpeg amix filter volume changes. Explanation request

    22 janvier 2020, par klodoma

    First, the question :
    IS THERE somewhere documented or explained how ffmpeg amix filter changes the volume in the mixed audio files ? I couldn’t find any good reference.

    There are several threads regarding this "issue" that the amix filter changes the volume of the input files. I played around with these and I just cannot explain what is going on. It makes a difference if you "mix" files like concatenate them at specific times or you overlap audio tracks and volume changes just doesn’t make any sense.

    Firstly, I don’t understand WHY the volumes need to be changed.

    Some related refs :

  • ffplay cannot play more than one song

    5 février 2020, par Bernie gach

    i have taken ffplay.c file from http://ffmpeg.org/doxygen/trunk/ffplay_8c-source.html and re edited it to a cpp file to embed in my win32 gui application . i have made the following changes to it.

    1. made the int main function into a local function as follows, i can pass the HWND to embedd the player
    void Ffplay::play_song(string file, HWND parent, bool* successfull)
    {
       int flags;
       VideoState* is;
       input_filename = file;
       /* register all codecs, demux and protocols */
    #if CONFIG_AVDEVICE
       avdevice_register_all();
    #endif
       //avformat_network_init();
       //check whether the filename is valid
       if (input_filename.empty())
       {
           logger.log(logger.LEVEL_ERROR, "filename %s is not valid\n", file);
           return;
       }
       if (display_disable)
       {
           video_disable = 1;
       }
       flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
       if (audio_disable)
           flags &= ~SDL_INIT_AUDIO;
       else
       {
           /* Try to work around an occasional ALSA buffer underflow issue when the
            * period size is NPOT due to ALSA resampling by forcing the buffer size. */
           if (!SDL_getenv("SDL_AUDIO_ALSA_SET_BUFFER_SIZE"))
               SDL_setenv("SDL_AUDIO_ALSA_SET_BUFFER_SIZE", "1", 1);
       }
       if (display_disable)
           flags &= ~SDL_INIT_VIDEO;
       SDL_SetMainReady();
       if (SDL_Init(flags))
       {
           logger.log(logger.LEVEL_ERROR, "Could not initialize SDL - %s\n", SDL_GetError());
           logger.log(logger.LEVEL_ERROR, "(Did you set the DISPLAY variable?)\n");
           return;
       }
       //Initialize optional fields of a packet with default values.
       //Note, this does not touch the data and size members, which have to be initialized separately.
       av_init_packet(&flush_pkt);
       flush_pkt.data = (uint8_t*)&flush_pkt;

       if (!display_disable)
       {
           int flags = SDL_WINDOW_HIDDEN;
           if (alwaysontop)
    #if SDL_VERSION_ATLEAST(2,0,5)
               flags |= SDL_WINDOW_ALWAYS_ON_TOP;
    #else
               logger.log(logger.LEVEL_INFO, "SDL version doesn't support SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n");
    #endif
           if (borderless)
               flags |= SDL_WINDOW_BORDERLESS;
           else
               flags |= SDL_WINDOW_RESIZABLE;
           SDL_InitSubSystem(flags);
           ShowWindow(parent, true);
           //window = SDL_CreateWindow(program_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, default_width, default_height, flags);
           window = SDL_CreateWindowFrom(parent);
           SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
           if (window) {
               renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
               if (!renderer)
               {
                   logger.log(logger.LEVEL_ERROR, "Failed to initialize a hardware accelerated renderer: %s\n", SDL_GetError());
                   renderer = SDL_CreateRenderer(window, -1, 0);
               }
               if (renderer)
               {
                   if (!SDL_GetRendererInfo(renderer, &renderer_info))
                   {
                       logger.log(logger.LEVEL_INFO, "Initialized %s renderer.\n", renderer_info.name);
                   }
               }
           }
           if (!window || !renderer || !renderer_info.num_texture_formats)
           {
               logger.log(logger.LEVEL_ERROR, "Failed to create window or renderer: %s\n", SDL_GetError());
               return;
           }
       }

       is = stream_open(input_filename.c_str(), file_iformat);
       if (!is)
       {
           logger.log(logger.LEVEL_ERROR, "Failed to initialize VideoState!\n");
           return;
       }
       //the song is playing now
       *successfull = true;
       event_loop(is);
       //the song has quit;
       *successfull = false;
    }
    1. changed the callback functions as the static ones couldn’t be used by c++ eg,
    void Ffplay::static_sdl_audio_callback(void* opaque, Uint8* stream, int len)
    {
       static_cast(opaque)->sdl_audio_callback(opaque, stream, len);
    }

    closing doesn’t change from the main file to close the audio and sdl framework

    void Ffplay::do_exit(VideoState* is)
    {
       abort = true;
       if(is)
       {
           stream_close(is);
       }
       if (renderer)
           SDL_DestroyRenderer(renderer);
       if (window)
            SDL_DestroyWindow(window);
    #if CONFIG_AVFILTER
       av_freep(&vfilters_list);
    #endif
       avformat_network_deinit();
       SDL_Quit();

    }

    i call the functions as follows from main gui

    ft=std::async(launch::async, &Menu::play_song, this, songs_to_play.at(0));

    the menu::play_song function is :

    void Menu::play_song(wstring song_path)
    {
       ready_to_play_song = false;
       OutputDebugString(L"\nbefore song\n");
       using std::future;
       using std::async;
       using std::launch;

       string input{ song_path.begin(),song_path.end() };
       Ffplay ffplay;
       ffplay.play_song(input, h_sdl_window, &song_opened);

       OutputDebugString(L"\nafter song\n");
       ready_to_play_song = true;
    }

    THE PROBLEM is i can only play one song . if i call the menu::play_song function again the sound is missing and the video/art cover is occasionally missing also. it seems some resources are not been released or something like that.

    i have localised the proble to this function

    int Ffplay::packet_queue_get(PacketQueue* q, AVPacket* pkt, int block, int* serial)
    {

       MyAVPacketList* pkt1;
       int ret;
       int count=0;
       SDL_LockMutex(q->mutex);

       for (;;)
       {


           if (q->abort_request)
           {
               ret = -1;
               break;
           }

           pkt1 = q->first_pkt;
           if (pkt1) {
               q->first_pkt = pkt1->next;
               if (!q->first_pkt)
                   q->last_pkt = NULL;
               q->nb_packets--;
               q->size -= pkt1->pkt.size + sizeof(*pkt1);
               q->duration -= pkt1->pkt.duration;
               *pkt = pkt1->pkt;
               if (serial)
                   *serial = pkt1->serial;
               av_free(pkt1);
               ret = 1;
               break;
           }
           else if (!block) {
               ret = 0;
               break;
           }
           else
           {
               logger.log(logger.LEVEL_INFO, "packet_queue before");
               SDL_CondWait(q->cond, q->mutex);
               logger.log(logger.LEVEL_INFO, "packet_queue after");

           }
       }
       SDL_UnlockMutex(q->mutex);
       return ret;
    }

    the call to SDL_CondWait(q->cond, q->mutex); never returns

  • Samples Archive Mirror

    27 février 2011, par Multimedia Mike — General

    I’m pleased to announce the first (to my knowledge) public mirror of the world-famous MPlayerHQ multimedia samples archive, hosted right here at multimedia.cx (can you think of a better place ?) :

    http://samples.multimedia.cx/

    Here’s hoping the load doesn’t crush my simple hosting plan (which actually claims quite a bit of bandwidth per month, but we’ll see).