Recherche avancée

Médias (91)

Autres articles (66)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • Anomalie #3894 (Nouveau) : Jointures (erronées ?) avec les boucles documents et leurs critères

    26 janvier 2017, par marcimat ☺☮☯♫

    Soit le cas suivant :

    - une document A, attaché à une rubrique R1 et R2
    - <doca></doca> mis dans le texte de R1 (il est donc "vu" dans R1, mais pas dans R2)
    - une boucle documents simplifiée (issue de squelettes-dist/inclure/documents.html) dans le squelette test.html :

    Test

  • #FICHIER
  • Constats

    Paramètre id_rubrique :

    Si on appelle ?page=test&#38;id_rubrique=1 le document A sera retourné, malgré le critère {vu=non}.
    Effectivement la boucle effectue 2 jointures différentes sur spip_documents_liens, une pour lier le champ "vu" et l’autre pour lier objet/id_objet.
    Du coup, la requête SQL trouve effectivement un document A non vu (dans la rubrique 2) et le retourne (vu qu’il est lié aussi à la rubrique 1).

    On obtient la requête suivante :

    SELECT documents.fichier
    FROM spip_documents AS `documents`  
    INNER JOIN spip_documents_liens AS L2 ON ( L2.id_document = documents.id_document ) 
    INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document )
    WHERE (documents.statut = ’publie’)
        AND (documents.mode IN (’image’,’document’))
        AND (documents.taille > 0 OR documents.distant=’oui’)
        AND (L2.id_objet = 1)
        AND (L2.objet = ’rubrique’)
        AND (L1.vu = ’non’)
    GROUP BY documents.id_document
    

    Paramètres objet / id_objet :

    Si on appelle page=test&#38;objet=rubrique&#38;id_objet=1, soit logiquement la même chose, on obtient 3 jointures sur spip_documents_liens.
    Là, les documents retournés ne soient pas forcément ceux de l’objet demandé ! La jointure cherche des documents liés à objet=rubrique, id_objet=1, mais pas forcément dans la même liaison !
    Les documents retournés ici sont parfois un peu farfelus donc là.

    SELECT documents.fichier
    FROM spip_documents AS `documents`  
    INNER JOIN spip_documents_liens AS L4 ON ( L4.id_document = documents.id_document ) 
    INNER JOIN spip_documents_liens AS L3 ON ( L3.id_document = documents.id_document ) 
    INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document )
    WHERE (documents.statut = ’publie’)
        AND (documents.mode IN (’image’,’document’))
        AND (documents.taille > 0 OR documents.distant=’oui’)
        AND (L3.objet = ’rubrique’)
        AND (L4.id_objet = 1)
        AND (L1.vu = ’non’)
    GROUP BY documents.id_document
    

    Paramètre id_article

    Si on appelle page=test&#38;id_article=1, on obtient, ô magie, une seule jointure. La boucle est correcte cette fois-ci donc. Je n’ai pas encore cherché pourquoi ça marche avec id_article, et pas id_rubrique…

    SELECT documents.fichier
    FROM spip_documents AS `documents`  
    INNER JOIN spip_documents_liens AS L1 ON ( L1.id_document = documents.id_document )
    WHERE (documents.statut = ’publie’)
        AND (documents.mode IN (’image’,’document’))
        AND (documents.taille > 0 OR documents.distant=’oui’)
        AND (L1.id_objet = 1)
        AND (L1.objet = ’article’)
        AND (L1.vu = ’non’)
    GROUP BY documents.id_document
    
  • 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)
  • How to use output file in another powershell command ?

    11 février 2021, par user2900905

    I'm using auto-editor first to cut out motionless parts, then Mp4Box to add my intro.

    &#xA;

    I can't figure out how to automatically use the output from auto-editor into Mp4Box.

    &#xA;

    This is what I have so far.

    &#xA;

    Get-ChildItem -Filter *.mp4 | ForEach -Process {mp4box -add c:\intro.mp4 -cat $_ -new $a($_.BaseName &#x2B; &#x27;.mp4&#x27;) -force-cat &amp;&amp; del $_ &amp;&amp; auto-editor $a --edit_based_on motion --motion_threshold 0.000001% --no_open}&#xA;

    &#xA;

    I tried adding $a to make the output into a variable but that doesn't work. I have the script reversed for testing purposes as Mp4Box is a lot faster than auto-editor.

    &#xA;