Recherche avancée

Médias (91)

Autres articles (54)

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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

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

  • Using an actual audio recording to filter out noise from a video

    9 mars 2021, par user2751530

    I use my laptop (Ubuntu 18.04 LTS derivative on a Dell XPS13) for recording videos (these are just narrated presentations) using OBS. After a presentation is done (.flv format), I process it using ffmpeg using filters that try to reduce background noise, reduce the size of the video, change encoding to .mp4, insert a watermark, etc. Over several months, this system has worked well.

    


    However, my laptop is now beginning to show its age (it is 4 years old). That means that the fan becomes loud - loud enough to notice in a recording, not loud enough to notice when you are working. So, even after filtering for low frequency in ffmpeg, there are clicking and other type of sounds that are left in the video. I am a scientist, though not an audio/video expert. So, I was thinking - is it possible for me to simply record the noise coming out of my machine when I am not presenting, and then use that recording to filter out the noise that my machine makes during the presentation ?

    


    Blanket approaches like filtering out certain ranges of the audio spectrum, etc. are unlikely to work, as the power spectrum of the noise likely has many peaks, and these are likely to extend into human voice range as well (I can hear them). Further, this is a moving target - the laptop is aging and in any case, the amount and type of noise it makes depends on the load and how long it has been on. Algorithm :

    


      

    1. Record actual computer noise (with the added bonus of background noise) while I am not recording. Ideally, just before starting to record the presentation. This could take the form of a 1-2 minute audio sample.
    2. 


    3. Record the presentation on OBS.
    4. 


    5. Use 1 as a filter to get rid of noise in 2. I imagine it would involve doing a Fourier analysis of 1, and then removing those peaks from the spectrum of 2 at each time epoch.
    6. 


    


    I have looked into sox, which is what people somewhat flippantly point you to without giving any details. I do not know how to separate out audio channels from a video and then interleave them back together (not an expert on the software here). Other than RTFM, is there any helpful advice anyone could offer ? I have searched, but have not been able to find a HOWTO. I expect that that is probably the fault of my search since I refuse to believe that this is a new idea - it is a standard method used in many fields to get rid of noise, including astronomy.

    


  • FFMPEG and libx264, WMP and QT playback at different res/aspect than specified

    10 septembre 2013, par Foltz

    So, for a little context. I'm trying to convert a JPEG2000 in .mxf video to an h264 in .mp4, maintaining its resolution/frame-size/aspect ratio. I'll say up front I'm not 100% sure on how all these ratios tie together.

    So, my input file is 720x486. I have a sample h264 file with specs I'm trying to emulate (from an OpenCube video ingest machine) with ffmpeg. The OpenCube file plays back at 720x486 in both Quick Time 7 and Windows Media Player 12. It reports a PAR of 9:10 and DAR of 4:3 (Using VideoSpec to see these values).

    When I make my derivative h264 using ffmpeg I can run the command :

    ffmpeg -i lac-test.mxf -vcodec libx264 -s 720x486 -aspect 4:3 -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    The output file reports the correct values in VideoSpec (720x486, DAR 4:3, PAR 9:10), but plays back in QT at 648x486. Weirder, the video plays back at the proper resolution (that is, same size as the sample OpenCube file).

    Now, an alternative command creates yet another predicament :

    ffmpeg -i lac-test.mxf -vcodec libx264 -s 720x486 -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    So omitting the aspect ratio gives me an output file that plays at 720x486 in QT7 (good !) but reports a DAR of 1.481 and an Undefine PAR. Unfortunately, THIS file plays back slightly too wide in WMP12.

    I've tried a slew of different strings to try and get something that plays back correctly. I've tried using various filters with the -fv flag such as :

    ffmpeg -i lac-test.mxf -vcodec libx264 -vf "scale=720x486,setsar=9:10,setdar=4:3" -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    This results in a video that shows all the correct specs in VideoSpec, and plays back correctly in WMP12 (same size as OpenCube file), but still plays back at 648x486 in QT7.

    What gives ?

  • Roadmap #3844 : Gérer la parenté dans la déclaration d’un objet éditorial.

    12 mars 2018, par RastaPopoulos ♥

    J’ai continué dans la réflexion, ayant besoin de parent et enfants dans le plugin Duplicator. J’ai expliqué différents problèmes dans la liste Zone, mais pour pas le perdre, je vais copier ça dans ce ticket.

    Proposition de deux fonctions d’API génériques

    À mon avis il faut aller stable et plus abstrait que juste la déclaration dans l’objet, car
    1) ça peut éventuellement changer
    2) il faudrait pouvoir prendre en compte les cas courants magiquement même quand ya pas eu de déclaration explicite (id_rubrique, id_parent…)
    3) ça donne le parent d’un type d’objet pour remonter, mais ça ne donne pas l’inverse, les enfants

    Donc dans tous les cas il faudrait sûrement une fonction du genre
    array objet_info_parent($objet)
    dont l’algorithme serait :
    - s’il y a une déclaration explicite, c’est ça qu’on utilise
    - s’il y a un champ id_rubrique, on fait comme si ça avait été déclaré avec la rubrique array(type=>rubrique, champ=>id_rubrique)
    - s’il y a un champ id_parent, on considère que l’objet est arborescent de lui-même, et donc comme si ça avait été déclaré comme ça array(type=$objet, champ=>id_parent)

    Mais je pense aussi une fonction cette fois un peu plus longue, qui donnerait l’ensemble des enfants directs qu’on a réussi à trouver
    array objet_info_enfants($objet)
    dont l’algorithme serait :
    - un tableau de résultats en static pour toujours faire qu’une fois par hit
    - si $enfants[$objet] déjà rempli en renvoie
    - sinon on boucle sur tous les objets déclarés
    - pour chaque, si on trouve que l’objet peut avoir comme parent direct le $objet qu’on cherche, alors on l’ajoute à son tableau des enfants possibles
    - donc soit si dans sa clé "parent" ya $objet, soit s’il a un id_rubrique et qu’on cherchait pour "rubrique", soit s’il a un id_parent et qu’on cherchait pour son type

    Un parent direct dont l’objet n’est pas fixe

    Encore autre chose, je ne sais pas si c’est prévu, mais il faudrait pouvoir gérer les cas où le parent direct (on parle bien toujours de parentée directe, pas de liens multiples) peut être n’importe quel objet. Dans ce cas, il y a les champs objet et id_objet directement dans la table de l’objet.

    Un parent encore plus compliqué avec deux cas à tester pour le même contenu

    Mais il y a encore plus compliqué, et c’est le cas pour mes Chapitres, mais aussi le cas pour les Forums fournit par SPIP : le parent direct
    peut être
    - SOIT l’objet lui-même car il est arborescent avec un id_parent
    - SOIT n’importe quel autre contenu SI ET SEULEMENT SI le champ id_parent=0 !

    C’est bien le cas pour les forums :
    - le premier forum d’un fil a pour parent un objet SPIP, avec objet et id_objet remplis dans sa table ET id_parent=0
    - les sous-forums ont AUSSI gardé en mémoire objet et id_objet du forum racine, mais avec id_parent rempli avec l’identifiant id_forum de leur parent

    Dans ce cas on ne peut pas se baser uniquement sur le fait que objet et id_objet sont remplis. Le parent est un objet SPIP quelconque si objet et id_objet remplis ET id_parent=0. Et dès que id_parent>0 alors le parent direct est le même objet (forum, chapitre ou autre).

    Bref ya des cas comme ça qui sont plus complexes, mais pourtant légitimes, et en plus fournis dans la dist, maintenus par le core, donc il faut savoir les gérer aussi.

    Du coup pour conclure, j’ai pas forcément de solution directe pour la déclaration générique qui doit intégrer le noyau au final, mais c’est pour expliquer pourquoi peut-être, possiblement, il y aurait besoin d’un pipeline dédié dans Duplicator pour gérer ces enfantillages compliqués tant que dans l’API de parent c’est pas encore résolu.

    En tout cas ça fait avancer la réflexion :)