Recherche avancée

Médias (91)

Autres articles (42)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (3910)

  • FFMPEG API : How to clear real-time buffer ?

    29 novembre 2018, par user67

    Here’s the c++ code that I’m using to access my webcam.

    int Camera::Init(char* file_name,
                   char* device_name,
                   char* format,
                   char* resolution,
                   char* frame_rate,
                   char* pixel_format)
    {
       av_log(NULL, AV_LOG_INFO, "---INIT STARTED\n");
       avdevice_register_all();
       av_register_all();

       AVDictionary* properties_collection = NULL;
       av_dict_set(&properties_collection, "f", format, NULL);
       av_dict_set(&properties_collection, "video_size", resolution, NULL);
       av_dict_set(&properties_collection, "framerate", frame_rate, NULL);
       av_dict_set(&properties_collection, "pix_fmt", pixel_format, NULL);
       AVInputFormat *input_format = av_find_input_format("dshow");
       char command_line[256];
       sprintf(command_line, "video=%s", device_name);
       AVFormatContext *input_context = avformat_alloc_context();
       //input_context->flags |= AVFMT_FLAG_NOBUFFER;      //DOESN'T HELP
       //input_context->max_picture_buffer = 0;            //ERR

       int err_code = 0;
       err_code = avformat_open_input(&input_context,
                                       command_line,
                                       input_format,
                                       &properties_collection);
       int i = 0;
       while (i++ < 30)
       {
           Sleep(1000);
           //avformat_flush(input_context); //DOESN'T HELP
           //av_free(input_context); //ERR
       }
       system("pause");
       return 0;
    }

    Right after "avformat_open_input()" it starts reading frames to some internal buffer without me even calling "av_read_frame()".
    After about 10 seconds it start’s giving me error messages :

    [dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
    too full or near too full (62% of size: 3041280 [rtbufsize parameter])!
    frame dropped!
    ...
    ...
    ...
    [dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
    too full or near too full (100% of size: 3041280 [rtbufsize parameter])!
    frame dropped!

    How to clear this buffer or avoid using it ?

    Thanks in advance.

    P.S.Please pardon my english.

    P.P.S.Have a good day.

  • ffmpeg : two videos side-by-side with audio1 lang=ger & audio2 lang=eng

    19 janvier 2023, par miridigital

    I have two videos from two GoPro cameras. Both videos are rendered via ffmpeg side-by-side into a single video (left and right) and the audio is currently combined/mixed into two channels (stereo). I can hear both camera audio channels at the same time.

    


    Two channels stereo :

    


    ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v][1:v]hstack=inputs=2[v]; [0:a][1:a]amerge[a]" -map "[v]" -map "[a]" -ac 2 side-by-side.mp4


    


    audio from both videos mixed into a single file with 2 channels - mediainfo

    


    Now I want to switch between the two audio channels (cam1 or cam2) while I'm playing the side-by-side video.

    


    My first try : With four channels (without -ac 2 parameter) :

    


    ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v][1:v]hstack=inputs=2[v]; [0:a][1:a]amerge[a]" -map "[v]" -map "[a]" side-by-side.mp4


    


    audio from both videos mixed into a single file with 4 channels - mediainfo

    


    But the most video players can't easily select the channels 1+2 or 3+4 while playing.

    


    So I tried two languages :

    


    ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v][1:v]hstack=inputs=2[v]; [0:a][1:a]amerge[a]" -map "[v]" -map "[a]" -metadata:s:a:0 language=ger -metadata:s:a:1 language=eng side-by-side.mp4


    


    audio from both videos mixed into a single file with 4 channels with languages - mediainfo

    


    But that's wrong. I can only see german with 4 channels. How can I put channels 1+2 into german and channels 3+4 into english ? Afterwards I should be able to use the multi language feature from most video players to switch the audio between cameras.

    


    Thank you,
    
Miriam

    


  • Dynamic subtitles by ffmpeg

    8 septembre 2019, par Saeron Meng

    I would like to add some commentary texts into my video but I do not know how to use ffmpeg to realize this. The comments are like screen bullets through the screen, appearing in the right margin, moving and scrolling, and disappearing from the left.

    My thought is to count the length of the comments and define speeds for them to move and I have already gotten the comments saved as an xml file. But even though I can transfer it into srt file, the tricky problem is, it is hard to write the speeds of the subtitles, or something like that, in an srt file, and apply them to ffmpeg commands or APIs. Here is an example of comments (xml file) :

    <chat timestamp="671.195">
       <ems utctime="1562584080" sender="Bill">
           <richtext></richtext>
       </ems>
    </chat>
    <chat timestamp="677.798">
       <ems utctime="1562584086" sender="Jack">
           <richtext></richtext>
       </ems>
    </chat>

    The final result is like this (I did not find an example in websites in English. In China, such moving subtitles are called "danmu" or "screen bullets"), these colorful characters can move horizontally from right to left :

    example

    1. I have searched some solutions on the Internet, most of which talk about how to write ass/srt files and add motionless subtitles. Like this :

    ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4

    3
    00:00:39,770 --> 00:00:41,880
    When I was lying there in the VA hospital ...

    4
    00:00:42,550 --> 00:00:44,690
    ... with a big hole blown through the middle of my life,

    5
    00:00:45,590 --> 00:00:48,120
    ... I started having these dreams of flying.

    But I need another kind of "subtitles" which can move.

    1. When it comes to scrolling subtitles, there are still some solutions : Scrolling from RIGHT to LEFT in ffmpeg / drawtext

    So my question is, how to combine the solutions above to arrange subtitles from top to bottom and let them move concerning the timestamps of the comments ?