Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (62)

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

  • 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

Sur d’autres sites (8703)

  • ffmpeg save video in segments, time does not match

    22 août 2022, par Yohann

    I use ffmpeg to save the rtsp live stream to the local, specify the fragment size of 2 seconds and use the current time to name the video file

    


    But the length of the returned video is not equal to 2 seconds and the interval between file names is not 2 seconds

    


    I have tried several command line arguments

    


    ffmpeg -i rtsp://192.168.18.119/live/test -f segment -strftime 1 -segment_time 2 -segment_atclocktime 1 -reset_timestamps 1 -an -vcodec copy ./%Y-%m-%d-%H.%M.%S.mp4

# execute result
2022-08-22-17.20.16.mp4  duration:00:03
2022-08-22-17.20.17.mp4  duration:00:03
2022-08-22-17.20.18.mp4  duration:00:07
2022-08-22-17.20.19.mp4  duration:00:03
2022-08-22-17.20.20.mp4  duration:00:03
# file names are not time aligned


    


    ffmpeg -i rtsp://192.168.18.119/live/test -f segment -strftime 1 -segment_time 2 -reset_timestamps 1 -an -vcodec copy ./%Y-%m-%d-%H.%M.%S.mp4

# execute result
2022-08-22-17.42.36.mp4 duration:00:03
2022-08-22-17.42.37.mp4 duration:00:03
2022-08-22-17.42.41.mD4 duration:00:03
2022-08-22-17.42.44.mp4 duration:00:03
2022-08-22-17.42.48.mp4 duration:00:03
2022-08-22-17.42.51.mp4 duration:00:03
# file names are not time aligned


    


    Expect to generate video

    


    2022-08-22-17.50.00.mp4 时长:00:02
2022-08-22-17.50.02.mp4 时长:00:02
2022-08-22-17.50.04.mD4 时长:00:02
2022-08-22-17.50.06.mp4 时长:00:02
2022-08-22-17.50.08.mp4 时长:00:02
2022-08-22-17.50.10.mp4 时长:00:02
...


    


  • How can I get my saved mp4 to exactly match the output of plot.show() ?

    10 mai 2019, par Jimmy

    When I try to save the results of an animation to mp4 using ffmpeg, I am getting a jumbled mess.

    plt.show() shows exactly what I want it to show in the animation. However, when I save it using ffmpeg, the result is very different from what plt.show() returns. I have tried various arguments for fps etc. but nothing has helped.

    %matplotlib
    import pandas as pd
    import matplotlib as mpl ## uncomment this if you are running this on a Mac
    #mpl.use('TkAgg')         ## and want to use blit=True
    import matplotlib.pyplot as plt
    import matplotlib.animation as animation
    import numpy as np
    import csv

    people = ('','Jim', 'Dan')
    plt.rcdefaults()
    fig, ax = plt.subplots()
    y_pos = np.arange(len(people))

    ax.set_xlim(0,10)
    ax.set_yticks(y_pos)
    ax.set_yticklabels(people)
    ax.invert_yaxis()
    ax.set_xlabel('Skill')
    titleList=['Basketball','Hockey','Baseball']
    df=[[0,5,7],[0,4,9],[0,2,6]]
    def animate(i):
      # Example data
       while i<3:
           ax.set_yticks(y_pos)
           ax.set_yticklabels(people)
           ax.set_xlabel(titleList[i])
           performance=df[i]

           title = ax.text(0.5,0.95,str(titleList[i]), bbox={'facecolor':'w', 'alpha':0.5, 'pad':5},transform=ax.transAxes, ha="center")

           rects = ax.barh(y_pos, performance, align='center',
                   color='blue', ecolor='None')
           return [rect for rect in rects] + [title]


    ani = animation.FuncAnimation(fig,animate, frames=3, blit=True
                               ,interval=2000,repeat=False)

    plt.rcParams['animation.ffmpeg_path'] = 'C:\\ffmpeg\\bin\\ffmpeg.exe'
    Writer = animation.writers['ffmpeg']
    ani.save('test.mp4')
    plt.show()

    The result is a very fast video where all the data gets written over (similar to the plt.show() results when blit=False).

  • Input link in1:v0 parameters do not match the corresponding output link in0:v0 parameters (ffmpeg SAR error) [duplicate]

    4 décembre 2018, par this.lau_

    This question is an exact duplicate of :

    I’m getting an SAR error when using complex filters in ffmpeg and I can’t quite make sense of it. The input command is as follow (spread over multiple lines for clarity) :

    ffmpeg \
    -i '698cc30d2dc966eaf4dc4f6f3571df8d.mp4' \
    -i '76a2ffdd0d7e82d31731c6e2c0c6f4c9.mp4' \
    -filter_complex "\
       [0:v] setsar=sar=1,setpts=PTS-STARTPTS,scale=1080x1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2 [0v]; \
       [1:v] setsar=sar=1,setpts=PTS-STARTPTS,scale=1080x1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2 [1v]; \
       [0v][0:a][1v][1:a]concat=n=2:v=1:a=1[v][a]" \
    -map "[v]" -map "[a]" \
    -max_muxing_queue_size 500 \
    -strict -2 \
    out.mp4

    And I’m getting the following error :

    [Parsed_concat_8 @ 0x7fe35a70b100] Input link in1:v0 parameters (size 1080x1920, SAR 1:1) do not match the corresponding output link in0:v0 parameters (1080x1920, SAR 1216:1215)

    [Parsed_concat_8 @ 0x7fe35a70b100] Failed to configure output pad on Parsed_concat_8

    Error reinitializing filters !

    Failed to inject frame into filter network : Invalid argument

    Error while processing the decoded data for stream #1:0

    The complex filters basically scale the videos to the required dimensions (1080x1920) and add black borders below and above, or on the side to make it fit within the rectangle. It worked with some videos but not in this case for some reason and I can’t make sense of the error message.

    Any idea what it means and how to fix it ?