Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (111)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6475)

  • How can I use ffmpeg to create a seamless looping gif ? [closed]

    27 juin 2024, par DavidNyan10

    I have an MP4 file which contains animation repeating in a loop. Let's just say, for example, a video of rain. However, when loop is turned on, the video cuts off at the wrong place and does not make a nice smooth animation. The part where it loops is obvious. It's just that the video contains more than one cycle of the loop, but not an exact integer of the full cycle.

    


    My goal is to turn this video into a gif with a seamless loop. In other words, I want the last frame of the video to match the first frame.

    


    My approach : I found a "Seamless loop creator" website on Google, tried it out, and it worked REALLY well. I thought all my problems have been solved. But little did I know, I've been only looking at the few seconds at the beginning and at the end of the video, not paying attention to what's in the middle. The sneaky pesky little website cuts off the video right in the middle, stitch the "seamless transition" at the beginning and end of the video, and put an ugly cross-fade in the middle where the frames don't line up. That is stupid. This of course, isn't noticable on rain videos, but on videos like a character jumping, the crossfade is very visible.

    


    My second approach : I'd use FFMPEG to get the first frame of the video, then starting from the last frame of the video and backwards, it'd try to find a frame that matches exactly with the first frame.

    


    Steps :

    


      

    1. Get the first frame and save it as a PNG or something I don't know
    2. 


    3. Reverse the original video
    4. 


    5. Match the image to each frame of the video in step 2. It is now easier because it's not doing it backwards frame by frame.
    6. 


    7. When a frame match is found, cut off all the frames before this matched frame.
    8. 


    9. Reverse back the video
    10. 


    


    Can I achieve something like this in ffmpeg, preferably a one-liner in windows cmd ?

    


    Follow-up question : Would it be better to leave the last frame the same as first frame or should I remove it ? For example, when it's looping, it would repeat that exact frame two times, is that good ? Or which one provides better results ? And if it's better to not include the last frame (the one that matches), how would I do it in my process above ?

    


    I tried ChatGPT, expecting a ready-made code. Put it in the command prompt and lost my original video file. Had to use a recovery tool because the file was overwritten.

    


  • Best way to upgrade FFMPEG library upgrade ? [closed]

    1er février 2024, par Code_Life

    Background context : We are using FFMPEG 3.4 on iOS & Android apps to playback our RTSP streams and are planning to upgrade to the latest version which is 6.x

    


    Problem Statement : I want to minimize the risk(& effort) in development and testing as we have a large of devices which generate the stream.

    


    Question :

    


      

    1. Any suggestion or experience on upgrading ? Do's and Don't

      


    2. 


    3. One of the thoughts is to add two versions of FFMPEG lib and validate each device's performance by doing A/B testing over time. But I'm not sure if that is technically possible as both dependencies will conflict.

      


    4. 


    5. Has anyone tried the Multiplatform approach ?

      


    6. 


    


  • Muxing encoder output with custom io in ffmpeg

    3 mai 2021, par MisterSincere

    I am having some basic issues on how to mux my encoder results into a mp4 file. My current approach is to create a custom AVFormatContext, where the DataProvider is the encoder :

    


    AVFormatContext *create_format_context(DataProvider *pDataProvider) {
  AVFormatContext *ctx{avformat_alloc_context()};

  size_t   bufSize{8 * 1024 * 1024};
  uint8_t *avBuffer{(uint8_t*)av_malloc(bufSize)};

  ctx->pb = avio_alloc_context(avBuffer,
                               bufSize,
                               0,
                               pDataProvider,
                               DataProvider::read,
                               nullptr,
                               nullptr);

  ctx->flags |= AVFMT_FLAG_CUSTOM_IO;

  FFMPEG_CALL(avformat_open_input(&ctx, nullptr, nullptr, nullptr));
  return ctx;
}


    


    But I crash on avformat_open_input with the following error message :

    


    


    Invalid data found when processing input

    


    


    It tries to read for the first time from the encoder, but since this is at init-time, the encoder doesn't have any results yet. I figured the problem is that ffmpeg tries to query for some header informations, since it would feel weird to ask for actual data when just opening.
    
How do I provide that header information / where can I learn something about how this header should look like and what else I need to provide for ffmpeg ?
    
Or is there even a completely different approach, because quite honestly I would be happy if I could feed the per frame encoded data directly to ffmpeg instead of through this whole context abstraction.

    


    For context I pasted the muxer class, I guess the progress() function is the most interesting one, here header, source.

    


    Also I call the kinda magic functions

    


    av_register_all();
avcodec_register_all();
avformat_network_init();


    


    before everything else concerning ffmpeg.

    


    The encoder is not written with ffmpeg, but with cuda / the nvidia video sdk for hardware acceleration purposes.