Recherche avancée

Médias (91)

Autres articles (87)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

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

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (4286)

  • Brute Force Dimensional Analysis

    15 juillet 2010, par Multimedia Mike — Game Hacking, Python

    I was poking at the data files of a really bad (is there any other kind ?) interactive movie video game known simply by one letter : D. The Sega Saturn version of the game is comprised primarily of Sega FILM/CPK files, about which I wrote the book. The second most prolific file type bears the extension ’.dg2’. Cursory examination of sample files revealed an apparently headerless format. Many of the video files are 288x144 in resolution. Multiplying that width by that height and then doubling it (as in, 2 bytes/pixel) yields 82944, which happens to be the size of a number of these DG2 files. Now, if only I had a tool that could take a suspected raw RGB file and convert it to a more standard image format.

    Here’s the FFmpeg conversion recipe I used :

     ffmpeg -f rawvideo -pix_fmt rgb555 -s 288x144 -i raw_file -y output.png
    

    So that covers the files that are suspected to be 288x144 in dimension. But what about other file sizes ? My brute force approach was to try all possible dimensions that would yield a particular file size. The Python code for performing this operation is listed at the end of this post.

    It’s interesting to view the progression as the script compresses to different sizes :



    That ’D’ is supposed to be red. So right away, we see that rgb555(le) is not the correct input format. Annoyingly, FFmpeg cannot handle rgb555be as a raw input format. But this little project worked well enough as a proof of concept.

    If you want to toy around with these files (and I know you do), I have uploaded a selection at : http://multimedia.cx/dg2/.

    Here is my quick Python script for converting one of these files to every acceptable resolution.

    work-out-resolution.py :

    PYTHON :
    1. # !/usr/bin/python
    2.  
    3. import commands
    4. import math
    5. import os
    6. import sys
    7.  
    8. FFMPEG = "/path/to/ffmpeg"
    9.  
    10. def convert_file(width, height, filename) :
    11.  outfile = "%s-%dx%d.png" % (filename, width, height)
    12.  command = "%s -f rawvideo -pix_fmt rgb555 -s %dx%d -i %s -y %s" % (FFMPEG, width, height, filename, outfile)
    13.  commands.getstatusoutput(command)
    14.  
    15. if len(sys.argv) <2 :
    16.  print "USAGE : work-out-resolution.py <file>"
    17.  sys.exit(1)
    18.  
    19. filename = sys.argv[1]
    20. if not os.path.exists(filename) :
    21.  print filename + " does not exist"
    22.  sys.exit(1)
    23.  
    24. filesize = os.path.getsize(filename) / 2
    25.  
    26. limit = int(math.sqrt(filesize)) + 1
    27. for i in xrange(1, limit) :
    28.  if filesize % i == 0 and filesize & 1 == 0 :
    29.   convert_file(i, filesize / i, filename)
    30.   convert_file(filesize / i, i, filename)
  • Apache doesn't load while ffmpeg is working

    21 janvier 2017, par mrcatmann

    I’m using Apache and PHP on a VPS for my site and also FFMPEG for converting the videos on it. But while FFMPEG is converting a video, the site is not loading at all. Is there a way to share server’s resources ? Tried to use "-threads 1" parameter in ffmpeg (the server has 4 cores), but still got the same result.

  • Evolution #4565 (Nouveau) : Traduction des mois ave affdate

    2 octobre 2020, par Laurent Lefebvre

    Une petite idée d’évolution :

    Traduire le mois dans la langue du site lorsque l’on utilise un formatage de type php date (ex : pour le 2/10/2020, [(#DATE|affdated F Y)] donnerait "2 octobre 2020" sur un site francophone.