Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (76)

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

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (8569)

  • What is the correct way to calculate SSIM ?

    19 mai 2023, par jamacoe

    On Windows 10, I have installed ImageMagick, Version 7.1.1-Q16-HDRI.

    


    I have a high resolution .png image that I convert to jpg with 75% quality :

    


    magick myImage.png -quality 75 myImage.jpeg


    


    Now I want to calculate SSIM to judge the quality of the .jpeg in comparison to the original .png.

    


    First, I am using ffmpeg.exe version 4.2.3 from the very same ImageMagick installation :

    


    ffmpeg.exe -i myImage.jpeg -i myImage.png -lavfi ssim=stats_file=ssim_logfile.txt -f null -


    


    Results in ssim_logfile.txt :

    


    n:1 Y:0.959684 U:0.957603 V:0.976335 All:0.962112 (14.215018)


    


    So I assume that the SSIM value has been calculated as 0.962112

    


    Now I'll use magick to calculate the same metric :

    


    magick myImage.jpeg myImage.png -metric SSIM -compare -format "%[distortion]" info:


    


    Output is :

    


    0.925167


    


    That's a huge difference ! So I think I'm making an error here with one or the other way.

    


    What is the correct way to calculate SSIM ?

    


  • How to find the offset by which the each video must be delayed to sync them perfectly ?

    19 janvier 2023, par PirateApp

    enter image description here

    


    Let me explain my use case a bit here

    


      

    • We are 4 of us playing the same game

      


    • 


    • 3 of us recording mkv using OBS studio at 60 fps, 4th guy recording with some other tool at 30 fps

      


    • 


    • Each mission starts at a cutscene and ends with a cutscene

      


    • 


    • I would like to create a video like the image you see above starting at ending at the same points but the intermediate stuff is basically what each player is doing in the game

      


    • 


    • Currently, I follow a process slightly complicated to achieve this and was wondering if there is an easier way to do this

      


    • 


    • My current process

      


    • 


    • Take a screenshot from one of the videos of the cutscene

      


    • 


    


    Run a search for this screen inside the other videos using the command below

    


    ffmpeg 
  -i "video1.mkv"
  -r 1
  -loop 1
  -i 1.png
  -an -filter_complex "blend=difference:shortest=1,blackframe=90:32"
  -f null -


    


      

    • It gives me a result like this in each video

      


      [Parsed_blackframe_1 @ 0x600000c9c000] frame:263438 pblack:91 pts:4390633 t:4390.633000 type:P last_keyframe:263400

      


    • 


    


    Use the start time from each of the results to create a split screen video using the command below

    


    ffmpeg 
  -i first.mkv
  -i second.mkv
  -i third.mkv
  -i fourth.mp4
  -filter_complex " 
    nullsrc=size=640x360 [base];
    [0:v] trim=start=35.567,setpts=PTS-STARTPTS, scale=320x180 [upperleft]; 
    [1:v] trim=start=21.567,setpts=PTS-STARTPTS, scale=320x180 [upperright];
    [2:v] trim=start=41.233,setpts=PTS-STARTPTS, scale=320x180 [lowerleft]; 
    [3:v] trim=start=142.933333,setpts=PTS-STARTPTS, scale=320x180 [lowerright];
    [0:a] atrim=start=35.567,asetpts=PTS-STARTPTS [outa]; [base][upperleft] overlay=shortest=1 [tmp1];


    


      

    • As you can see, it is a complex process and depends completely a lot on what image I am capturing. Sometimes, I find out that stuff is still slightly off in the beginning or end because the images dont match a 100%. My guess is that the frame rate is different for each video not to mention 3 of them are mkv inputs and one is an mp4 input

      


    • 


    • Is there a better way to get the offset by how much each video should be moved to sync them perfectly ?

      


    • 


    • The only way that I can think of is to take 1 video

      


    • 


    • Take a starting timestamp and an ending timestamp, say with a total duration of 30s

      


    • 


    • Take the second video

      


    • 


    • Start from 0 to 30s and compare the frames in both videos, set a score

      


    • 


    • start from 0.001 to 30.001 and compare the frames, set a score

      


    • 


    • start from 0.002 to 30.002 and compare the frames, set a score

      


    • 


    • Basically increment the second video by 0.001 second each time and find out the part with the highest score

      


    • 


    • Any better way of doing this ? I need to run this on 100s if not 1000s of videos

      


    • 


    


  • audio is not exact copy in ffmpeg proxies

    9 mars 2023, par 5Diraptor

    I always work with proxy footage in Premiere Pro, so I have a batch file set up to run any new raw footage through ffmpeg and produce a proxy version. I avoid creating proxies through Premiere Pro as it's slow, I have little control over the output, and often the proxies aren't compressed as much as they could be.

    


    This is the command I run to create proxies. It also overlays a watermark so that it is obvious when proxies are used.

    


    ffmpeg -i "original.MOV" -i "proxy_overlay.png" -filter_complex "overlay=0:0" -crf 20 -c:v libx264 -c:a copy "Proxy/proxy_for_original.mov"


    


    This has always been fine, but I've received some footage to work on from a different camera, and when I create proxies and try to attach them in Premiere Pro, I get the error : "Proxy Media and Full Resolution Media must have matching audio channels."

    


    enter image description here

    


    When I compare the file properties in Premiere Pro, I see this :

    


    Original :

    


    enter image description here

    


    Proxy :

    


    enter image description here

    


    As you can see, the original contains 8x audio tracks and a timecode track, but the proxy version doesn't state this.

    


    I've been working on the ffmpeg command to try and retain the original audio details, but nothing I do seems to work. I thought that the command -c:a copy would copy the audio tracks across without any changes at all. However I can't seem to find a command that creates an exact copy of all audio tracks. Also does the timecode track matter, should I map this to the proxy as well ?