Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (67)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (13687)

  • Total number of frames with ffmpeg

    7 juillet 2012, par Utkarsh Sinha

    How do I find the total number of frames in a video with ffmpeg ?

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

    


  • 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