Recherche avancée

Médias (0)

Mot : - Tags -/albums

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

Autres articles (47)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (5403)

  • how to get 120fps encoded video to play at "normal" speed instead of slow mo

    1er mars 2023, par Patrick Vellia

    I used my GoPro Hero10 to record at 4k 120fps on a green screen. This original video plays slo-mo in QuickTime but "normal" speed in the browser. I want it playing normal speed, and if end user wants to slow it down they have the extra frames for that to maintain clarity, which is why I record at 120.

    


    I then used FFMPEG to create an image sequence of the video.

    


    Then I ran Image Magic to create the transparent frames.

    


    Then I put it back together with the following command for a HEVC mov file :

    


    ffmpeg -r 120 -f image2 -i transparent/image_transparent_%08d.png -vcodec hevc_videotoolbox -crf 28 -alpha_quality 1  -tag:v hvc1 output.mov


    


    I am still on an Intel MacBook Pro running FFMPEG 4.6 (as I've found 5+ was buggy with one of my commands a few months ago but can't remember which one, I think it was the videotoolbox).

    


    The GoPro video has the following stream data as input to the FFMPEG :

    


    Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
      timecode        : 19:05:32:105
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro TCD  
      timecode        : 19:05:32:105
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro MET  


    


    Whereas the re-constructed video has the following data :

    


    Duration: 00:00:08.13, start: 0.000000, bitrate: 763650 kb/s
  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc58.134.100 hevc_videotoolbo


    


    When this re-constructed video plays in the browser, it is in slow-mo and I need to set the playbackRate to 4.0 for it to play "normally".

    


    Is there something I need to add to the video for the browser to play it at "normal" speed ?

    


    EDIT

    


    I just compared the two video streams :

    


    original:
Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)

Reconstructed:
 Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)


    


    I don't quit understand all of this though. so here's what I notice :

    


    original.         reconstructed
--------------------------------
bt709             progressive
89871 kb/s.       763696 kb/s
119.88 fps.       120 fps
119.88 tbr.       120 tbr
120k tbr.         15360 tbr
11960 tbr.        15360 tbc


    


    Hmm. I suspect it has something to do with tbr and tbc whatever those are, or perhaps the progressive vs the bt709 ? the pirates are also vastly different.

    


  • Playing 120fps in browser between original and re-made video, original is normal speed, new video is slo-mo

    1er mars 2023, par Patrick Vellia

    I used my GoPro Hero10 to record at 4k 120fps on a green screen. This original video plays slo-mo in QuickTime but "normal" speed in the browser. I want it playing normal speed, and if end user wants to slow it down they have the extra frames for that to maintain clarity, which is why I record at 120.

    


    I then used FFMPEG to create an image sequence of the video.

    


    Then I ran Image Magic to create the transparent frames.

    


    Then I put it back together with the following command for a HEVC mov file :

    


    ffmpeg -r 120 -f image2 -i transparent/image_transparent_%08d.png -vcodec hevc_videotoolbox -crf 28 -alpha_quality 1  -tag:v hvc1 output.mov


    


    I am still on an Intel MacBook Pro running FFMPEG 4.6 (as I've found 5+ was buggy with one of my commands a few months ago but can't remember which one, I think it was the videotoolbox).

    


    The GoPro video has the following stream data as input to the FFMPEG :

    


    Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
      timecode        : 19:05:32:105
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro TCD  
      timecode        : 19:05:32:105
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro MET  


    


    Whereas the re-constructed video has the following data :

    


    Duration: 00:00:08.13, start: 0.000000, bitrate: 763650 kb/s
  Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 763696 kb/s, 120 fps, 120 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc58.134.100 hevc_videotoolbo


    


    When this re-constructed video plays in the browser, it is in slow-mo and I need to set the playbackRate to 4.0 for it to play "normally".

    


    Is there something I need to add to the video for the browser to play it at "normal" speed ?

    


  • Can I know which byte range to read from a remote mp4 file for FFMpeg to decode a keyframe ?

    12 octobre 2023, par db9117

    I need to decode a of keyframe of a video file (mp4, h264 encoded). I know the timestamp of the keyframe I want to extract/decode. I want to minimize amount of data being read in memory. For this, I need to know beforehand exactly the minimal byte range I would require that encompasses this keyframe. How do I know what is the minimal byte range in the whole mp4 byte stream I need to read in order to be able to decode the keyframe ?

    


    I currently find the appropriate keyframe in the index_entries contained in the header. I get its byte position (pos attribute) and timestamp (timestamp attribute). I calculate the range as follows :

    


    startBytes : minimum of :

    


      

    1. the pos of the keyframe
    2. 


    3. the pos of the nearest index entry in the audio stream happening at or before the keyframe's timestamp.
    4. 


    


    This way when it's decoding the frame, if it also needs the audio content for demuxing, it would have it.

    


    endBytes : maximum of :

    


      

    1. the pos of the next frame in the video stream's index, after the keyframe
    2. 


    3. the pos of the next frame in the audio stream's index after the timestamp of the wished keyframe.
    4. 


    


    This way I know that I have everything up until the next frame in the index, which theoretically should be enough to decode the keyframe only.

    


    I then read the appropriate byte range.

    


    When I try to decode the frame, I run in a loop until I succeed :

    


      

    • avcodec_read_frame
    • 


    • avcodec_send_packet
    • 


    • avcodec_receive_frame
    • 


    


    I ignore AVERROR(EAGAIN) errors.

    


    avcodec_receive_frame fails multiple times with error AVERROR(EAGAIN) which I ignore, until it fails saying that the memory it wants to read isn't available (wants to read after endBytes). I explicitly tell it to fail if it wants to read more than it has already read.

    


    Note : for other keyframes at other positions in other videos, it sometimes succeeds (probably because the range is big enough by chance), but it fails more often than not.

    


    My question is : Why is the end of the range not enough to be able to decode only the one keyframe ? Is there any way to more precisely calculate the exact range in bytes I would need in order to decode a particular keyframe ?