Recherche avancée

Médias (91)

Autres articles (81)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (10942)

  • Erros in compiling and running FFmpeg C example code

    11 juillet 2019, par Tina J

    I’ve been trying to change an FFmpeg’s example code HERE to call other filters using its C APIs. Say the filter be freezedetect=n=-60dB:d=8 which normally runs like this :

    ffmpeg -i small.mp4 -vf "freezedetect=n=-60dB:d=8" -map 0:v:0 -f null -

    And prints outputs like this :

    [freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_start: 5.005
    [freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_duration: 2.03537
    [freezedetect @ 0x25b91c0] lavfi.freezedetect.freeze_end: 7.04037

    However, the original example displays frames, not these metadata information. How can I change the code to print this metadata information (and not the frames) ?

    I’ve been trying to change the display_frame function below into a display_metadata function. Looks like the frame variable has a metadata dictionary which looks promising, but my attempts failed to use it. I’m also new to C language.

    Original display_frame function :

    static void display_frame(const AVFrame *frame, AVRational time_base)
    {
       int x, y;
       uint8_t *p0, *p;
       int64_t delay;

       if (frame->pts != AV_NOPTS_VALUE) {
           if (last_pts != AV_NOPTS_VALUE) {
               /* sleep roughly the right amount of time;
                * usleep is in microseconds, just like AV_TIME_BASE. */
               delay = av_rescale_q(frame->pts - last_pts,
                                    time_base, AV_TIME_BASE_Q);
               if (delay > 0 && delay < 1000000)
                   usleep(delay);
           }
           last_pts = frame->pts;
       }

       /* Trivial ASCII grayscale display. */
       p0 = frame->data[0];
       puts("\033c");
       for (y = 0; y < frame->height; y++) {
           p = p0;
           for (x = 0; x < frame->width; x++)
               putchar(" .-+#"[*(p++) / 52]);
           putchar('\n');
           p0 += frame->linesize[0];
       }
       fflush(stdout);
    }

    My new display_metadata function that needs to be completed :

    static void display_metadata(const AVFrame *frame)
    {

    //    printf("%d\n",frame->height);

       AVDictionary* dic = frame->metadata;

       printf("%d\n",*(dic->count));

    //    fflush(stdout);
    }
  • KeyError : 1 on Python when the code points to a value that exists [closed]

    10 décembre 2020, par oo92

    I am using the following code to traverse a list JSON output. There are about 100 streamers I want to take screens from but the code fails after the first one where I call the ffmpeg. I put a code after the ffmpeg to see if Python is running it at all and it does :

    


    Traceback (most recent call last):&#xA;  File "/home/onur/Desktop/pythonProject/main.py", line 12, in <module>&#xA;    username = streams_now[i][&#x27;channel&#x27;][&#x27;display_name&#x27;]&#xA;KeyError: 1&#xA;auronplay it is &#xA;</module>

    &#xA;

    This is my code :

    &#xA;

    import streamlink, os&#xA;from twitch import TwitchClient&#xA;&#xA;client = TwitchClient(client_id=&#x27;frl3dqgn21bbpp6tajjvg5pdevczac&#x27;)&#xA;&#xA;streams_now = client.streams.get_live_streams(limit=100)&#xA;&#xA;print(streams_now[2][&#x27;channel&#x27;][&#x27;display_name&#x27;])&#xA;&#xA;for i in range(0, 99):&#xA;  username = streams_now[i][&#x27;channel&#x27;][&#x27;display_name&#x27;]&#xA;  streams_now = streamlink.streams(&#x27;http://twitch.tv/&#x27; &#x2B; username)&#xA;  stream = streams_now["best"].url&#xA;  dir_path = os.getcwd() &#x2B; &#x27;/&#x27; &#x2B; username&#xA;  os.mkdir(dir_path)&#xA;  os.system(&#x27;ffmpeg -i &#x27; &#x2B; stream &#x2B; f&#x27; -ss 20 -vframes 10 -r 0.2 -f image2 {dir_path}/&#x27; &#x2B; username &#x2B; &#x27;_output_%09d.jpg&#x27;)&#xA;  print(username &#x2B; &#x27; it is &#x27;)&#xA;

    &#xA;

    The line that throws the error is username = streams_now[i][&#x27;channel&#x27;][&#x27;display_name&#x27;]. However, this line cannot throw an error because I am testing it before the for loop :

    &#xA;

    print(streams_now[2][&#x27;channel&#x27;][&#x27;display_name&#x27;])

    &#xA;

    and I get this : shroud

    &#xA;

  • FFMPEG Windows : need to add mix audio to this code

    28 mai 2020, par a4n6c

    I have this and now I wish to add a background sound from mp3 in the area where I am removing audio.

    &#xA;&#xA;

    ffmpeg -i "demo.mp4" -vcodec copy -af "volume=enable=&#x27;between(t,67,69)&#x27;:volume=0" -y "output1.mp4"&#xA;

    &#xA;&#xA;

    this is just one simple example shown the list of (between) can be larger than 1 line. an example will help me progress further thank you.

    &#xA;