Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (111)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (9303)

  • Implementing picture zoom effect using Rmagick and FFmpeg

    26 juin 2013, par DenisKo

    I have a picture and I need to get zoom effect on the resulting video. I almost get the desired result.. but. The resulting picture looks a bit shaky. It's because of rounding on cropping and resizing.. so centre of the picture shifts slightly with each conversion. What can i do with that ? Or maybe there is some other method to implement it ?
    In the input I have
    picture,zoom_type,zoom_percent,zoom_duration,scene_duration
    Here is part of the code which making the job :

    img = Magick::ImageList.new(picture).first
    width, height = img.columns.to_f, img.rows.to_f
    img_fps = 30
    if width >= height
     aspect_ratio = (width / height)
     zoom_small_size = ((height * (100 - zoom_percent)) / 100).to_f
     small_size = height
    else
     aspect_ratio = (height / width)
     zoom_small_size = ((width * (100 - zoom_percent)) / 100).to_f
     small_size = width
    end
    factor = (((small_size - zoom_small_size) / (img_fps * zoom_duration))).to_f
    while factor < 2
     img_fps -= 1
     factor = ((small_size - zoom_small_size) / (img_fps * zoom_duration))
    end
    total_images = img_fps * scene_duration
    zoom_images = img_fps * zoom_duration_seed
    new_width =  width
    new_height =  height
    zoom_changed_small_size = small_size

    total_images.times do |i|
    if zoom_images > 0 && zoom_changed_small_size > zoom_small_size
     img_n = img.crop(new_width, new_height, true)
     new_width = (width <= height) ? (new_width - factor).round : (new_width-factor*aspect_ratio).round
     new_height = (width >= height) ? (new_height-factor).round : (new_height-factor*aspect_ratio).round
     zoom_changed_small_size = (width >= height) ? img_n.rows : img_n.columns
     img_n.resize_to_fill!(width, height)
     img_n.write("#{sprintf("img_%04d.jpg" % (i+1))}")
     zoom_images -= 1
     img = img_n.copy if zoom_images == 0 || zoom_changed_small_size <= zoom_small_size
     img_n.destroy!
    else
     img.write("#{sprintf("img_%04d.jpg" % (i+1))}")
     puts "Writing - #{img.filename}"
    end
    end

    Then ffmpeg -y -f image2 -r 30 -i img_%04d.jpg -crf 0 -preset ultrafast -tune stillimage -pix_fmt yuv420p out.mp4

  • avformat/argo_{asf,brp} : use variable frame sizes when (de)muxing adpcm_argo

    15 septembre 2020, par Zane van Iperen
    avformat/argo_asf,brp : use variable frame sizes when (de)muxing adpcm_argo
    

    Signed-off-by : Zane van Iperen <zane@zanevaniperen.com>

    • [DH] libavformat/argo_asf.c
    • [DH] libavformat/argo_brp.c
  • 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.

    &#xA;

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

    &#xA;

    Then I ran Image Magic to create the transparent frames.

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

    Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s&#xA;  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)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro H.265&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : GoPro H.265 encoder&#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      vendor_id       : [0][0][0][0]&#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro MET  &#xA;

    &#xA;

    Whereas the re-constructed video has the following data :

    &#xA;

    Duration: 00:00:08.13, start: 0.000000, bitrate: 763650 kb/s&#xA;  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)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : FFMP&#xA;      encoder         : Lavc58.134.100 hevc_videotoolbo&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    EDIT

    &#xA;

    I just compared the two video streams :

    &#xA;

    original:&#xA;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)&#xA;&#xA;Reconstructed:&#xA; 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)&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    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.

    &#xA;