Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (63)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (6643)

  • Core : Update elementValue method to deal with type="number" fields

    29 avril 2014, par jamierytlewski
    Core : Update elementValue method to deal with type="number" fields
    

    The HTML5 draft defines, for type="number" inputs : "The value
    sanitization algorithm is as follows : If the value of the element is not
    a valid floating-point number, then set it to the empty string instead."
    If the constraint validation considers the input invalid, return false
    as the value, instead of the empty string, for the number and digit
    methods to output their messages.

    This would break in browsers that support type="number", but not the
    constraint validation API. I don’t know of any existing browser where
    that applies.

    Fixes #858
    Fixes #922
    Closes #1093

  • Estimating number of frames and fps in opencv

    11 mai 2021, par mrgloom

    I have some .mp4 video, ffmpeg shows me this info :

    


      Duration: 00:00:07.02, start: 0.000000, bitrate: 18001 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709/bt709/iec61966-2-1, progressive), 886x1920, 14299 kb/s, 22.54 fps, 60 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      rotate          : 270
      creation_time   : 2021-04-30T13:56:51.000000Z
      handler_name    : Core Media Video
      encoder         : 'avc1'
    Side data:
      displaymatrix: rotation of 90.00 degrees


    


    So as I understand it should be 7.02 sec * 22.54 fps 158 frames

    


    When I try to read it in opencv :

    


    def print_info_cap_reading(video_filepath):
    cap = cv2.VideoCapture(video_filepath)

    fps = cap.get(cv2.CAP_PROP_FPS)
    n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))

    print('fps:', round(fps, 2))
    print('n_frames', n_frames)

    counter = 0
    while True:
        ret, frame = cap.read()
        if ret == False:
            break
        counter += 1

    print('counter:', counter)


    


    It shows me

    


    # fps: 22.54
# n_frames 199
# counter: 175


    


    When I tried to convert it to separate frames via ffmpeg it produce 422 frames :

    


    ffmpeg -i source1.mp4 tmp/img%03d.jpg


    


    So I wonder :

    


      

    1. Why fps is float value and not int value ?
    2. 


    3. What is the right way to estimate fps and number of frames ?
    4. 


    5. Why cv2.CAP_PROP_FRAME_COUNT in opencv and actually reading frames produce different number of frames ?
    6. 


    


    Update :

    


    -ignore_editlist 1 not helped, ffmpeg still produce 422 frames :

    


     ffmpeg -i source1.mp4 tmp1/img%03d.jpg
 ffmpeg -i source1.mp4 -ignore_editlist 1 tmp2/img%03d.jpg


    


    Here is some ffmpeg output :

    


    Output #0, image2, to 'tmp1/img%03d.jpg':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    com.apple.quicktime.author: ReplayKitRecording
    encoder         : Lavf58.45.100
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1920x886, q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)
    Metadata:
      encoder         : Lavc58.91.100 mjpeg
      creation_time   : 2021-04-30T13:56:51.000000Z
      handler_name    : Core Media Video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
      displaymatrix: rotation of -0.00 degrees
frame=  422 fps=224 q=24.8 Lsize=N/A time=00:00:07.03 bitrate=N/A dup=247 drop=0 speed=3.74x
video:13709kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


    


    Update :

    


    mkdir tmp3 && ffmpeg -ignore_editlist 1 -i source1.mp4 tmp3/img%03d.jpg produce even more frames - 529.

    


    Output #0, image2, to 'tmp3/img%03d.jpg':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    com.apple.quicktime.author: ReplayKitRecording
    encoder         : Lavf58.45.100
    Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1920x886, q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)
    Metadata:
      encoder         : Lavc58.91.100 mjpeg
      creation_time   : 2021-04-30T13:56:51.000000Z
      handler_name    : Core Media Video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
      displaymatrix: rotation of -0.00 degrees
frame=  529 fps=221 q=24.8 Lsize=N/A time=00:00:08.81 bitrate=N/A dup=330 drop=0 speed=3.68x
video:16178kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


    


  • Extracting number of duplicate (or dropped) frames in ffmpeg via C/C++ API

    20 septembre 2023, par userDtrm

    Is there a way to extract number of duplicated or dropped video frames during the decoding of a .mp4 or .ts file through ffmpeg's C/C++ API ?

    


    This information is reported by ffmpeg when using the command line tool. However, I have a requirement that I need this information to be extracted in C/C++.