Recherche avancée

Médias (91)

Autres articles (68)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (5208)

  • fate/cbs : simplify the filter_unit discard tests

    30 juin 2023, par James Almer
    fate/cbs : simplify the filter_unit discard tests
    

    No need to generate intermediate files and probe them. We only care to know that the
    output of the bsf excludes the frames in question, and a simple checksum is enough.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] tests/fate/cbs.mak
    • [DH] tests/ref/fate/cbs-h264-discard-bidir
    • [DH] tests/ref/fate/cbs-h264-discard-nonintra
    • [DH] tests/ref/fate/cbs-h264-discard-nonkey
    • [DH] tests/ref/fate/cbs-h264-discard-nonref
    • [DH] tests/ref/fate/cbs-hevc-discard-bidir
    • [DH] tests/ref/fate/cbs-hevc-discard-nonintra
    • [DH] tests/ref/fate/cbs-hevc-discard-nonkey
    • [DH] tests/ref/fate/cbs-hevc-discard-nonref
  • How do I extract color matrix from MP4 an x264 stream in Media Foundation

    23 août 2016, par Jules

    I am playing a video (mp4 containing x264 encoded video stream) with a custom player using media foundation.

    When I convert the YUV information into RGB I need to account for the color matrix and range used at encode time.

    Some of my videos have this information, I can use MediaInfo.exe or FFMPEG to see that it is present.

    However, for such videos if I look at the relevant Media Foundation properties (Extended Color Information) the properties are not present in the files.

    So, somehow I need to find a way to access the information.

    Media Foundation does provide access to MF_MT_MPEG4_SAMPLE_DESCRIPTION and MF_MT_MPEG_SEQUENCE_HEADER for the video stream but I can’t find descriptions of what these contain.

    I noticed that the MF_MT_MPEG_SEQUENCE_HEADER is much longer for the videos with the information present and this (MPEG Headers Quick Reference) seems to suggest headers might contain the information I need.

    I’m looking for Color Range (limited/full), Color Primaries, Transfer Characteristics and Matrix Coefficients (BT.709 etc).

    I’d greatly appreciate any help finding this information from a Media Foundation video stream.

    Thanks

    Jules


    Update - Sequence Header

    The sequence header appears to be a subset of MPEG4 sample description, though I can’t find anything that indicates what either bits of data actually contains / doesn’t contain specifically.

    The sequence header appears to contain data structured as an MP4 byte stream as described in the H264 Standards Document and includes the VUI (Video Usability Information - Annex E of document) which may then include the colour information I’m interested in.

    Given that it’s a byte stream I need to know where it starts and whether there’s some existing code I could use to decode it.

    In FFMPEG in libavcodec/h264_ps.c there is a function called ff_h264_decode_seq_parameter_set which ends up calling decode_vui_parameters. It seems possible that seq_parameter_set maps to MF_MT_MPEG_SEQUENCE_HEADER and it may be possible to use that code to decode the data.

    If anyone one has any direct experience with decoding this data it would be very useful.

    Thanks again


    Update - Related posts

    I found this How to decode sprop-parameter-sets in a H264 SDP ? and Possible Locations for Sequence/Picture Parameter Set(s) for H.264 Stream which are fairly helpful.

    The sequence header would appear to be Sequence or picture parameter set (pps) and the parameters I want are the VUI extension subset.

    Plus this post H.264 stream structure gives the high level of how the stream data is structured, and the MF_MT_MPEG_SEQUENCE_HEADER appears to start with a NAL 0x00 0x00 0x01 so I’m guessing it is a NAL containing the PPS.

  • Mangled output when printing strings from FFProbe STDERR

    9 février 2018, par spikespaz

    I’m trying to make a simple function to wrap around FFProbe, and most of the data can be retrieved correctly.

    The problem is when actually printing the strings to the command line using both Windows Command Prompt and Git Bash for Windows, the output appears mangled and out of order.

    Some songs (specifically the file Imagine Dragons - Hit Parade_ Best of the Dance Music Charts\80 - Beazz - Lime (Extended Mix).flac) are missing metadata. I don’t know why, but the dictionary the function below returns is empty.

    FFProbe outputs its results to stderr which can be piped to subprocess.PIPE, decoded, and parsed. I chose regex for the parsing bit.

    This is a slimmed down version of my code below, for the output take a look at the Github gist.

    #! /usr/bin/env python3
    # -*- coding: utf-8 -*-

    import os

    from glob import glob
    from re import findall, MULTILINE
    from subprocess import Popen, PIPE


    def glob_from(path, ext):
       """Return glob from a directory."""
       working_dir = os.getcwd()
       os.chdir(path)

       file_paths = glob("**/*." + ext)

       os.chdir(working_dir)

       return file_paths


    def media_metadata(file_path):
       """Use FFPROBE to get information about a media file."""
       stderr = Popen(("ffprobe", file_path), shell=True, stderr=PIPE).communicate()[1].decode()

       metadata = {}

       for match in findall(r"(\w+)\s+:\s(.+)$", stderr, MULTILINE):
           metadata[match[0].lower()] = match[1]

       return metadata


    if __name__ == "__main__":
       base = "C:/Users/spike/Music/Deezloader"

       for file in glob_from(base, "flac"):
           meta = media_metadata(os.path.join(base, file))
           title_length = meta.get("title", file) + " - " + meta.get("length", "000")

           print(title_length)

    Output Gist
    Output Raw

    I don’t understand why the output (the strings can be retrieved from the regex pattern effectively, however the output is strangely formatted when printing) appears disordered only when printing to the console using python’s print function. It doesn’t matter how I build the string to print, concatenation, comma-delimited arguments, whatever.

    I end up with the length of the song first, and the song name second but without space between the two. The dash is hanging off the end for some reason. Based on the print statement in the code before, the format should be Title - 000 ({title} - {length}) but the output looks more like 000Title -. Why ?