Recherche avancée

Médias (91)

Autres articles (47)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

  • Typesetting

    9 juin 2010, par Mikko Koppanen — Imagick, PHP stuff

    Ever had the situation where you have a piece of string which you need to overlay on an image ? Maybe a situation where the area reserved for the string is known in pixels but you need to know the font size to fill most of the area ? Think no more !

    Here is a small example of how to fit a certain piece of a string on to an area of which you know the width and the height or only the width. The magic happens through the ImageMagick CAPTION : format. You can see from the example images how the parameters actually affect the image.

    1. < ?php
    2.  
    3. /* How wide is our image */
    4. $image_width = 200 ;
    5.  
    6. /* Give zero for autocalculating the height */
    7. $image_height = 200 ;
    8.  
    9. /* Specify the text */
    10. $text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    11.     Mauris lectus mi, mattis non, euismod vel, sagittis nec, ipsum." ;
    12.  
    13. /* Instanciate imagick */
    14. $im = new Imagick() ;
    15.  
    16. /* Create new image using caption : pseudo format */
    17. $im->newPseudoImage( $image_width, $image_height, "caption :" . $text ) ;
    18.  
    19. /* Put 1px border around the image */
    20. $im->borderImage( ’black’, 1, 1 ) ;
    21.  
    22. /* PNG format */
    23. $im->setImageFormat( "png")  ;
    24.  
    25. /* Output */
    26. header( "Content-Type : image/png" ) ;
    27. echo $im ;
    28.  
    29.  ?>

    Here is image with width 100 and height 0 :

    width_100_height_0.png

    Width 100 Height 50 :

    width_100_height_50.png

    Width 200 Height 200 (as you can see the font size is now larger) :

    width_200_height_200.png

  • ffmpeg m3u8 segment file and relative path for file names

    15 mars 2013, par Luuk D. Jansen

    This must be a simple issue, but I have a difficulty with the M3U8 file created by FFMPEG as it contains the absolute path to the files, and not just the file names which I need. I am trying to be able to view the stream while it is encoded, and this seems the last hurdle.

    My FFMPEG command is (ignore the comma's) :

    ffmpeg, -i, /Users/User/Documents/Java/server/data/media/1/1/Promo-2013.mov, -dn, -y, -f, mpegts, -c:a, libfdk_aac, -strict, -2, -ar, 48000, -b:a, 128000, -s, 640x360, -c:v, libx264, -b:v, 700000, -aspect, 640:360, -r, 25, -level, 3.0, -vprofile, baseline, -flags, +loop, -cmp, chroma, -coder, 0, -me_range, 16, -keyint_min, 25, -sc_threshold, 40, -i_qfactor, 0.71, -bt, 200k, -maxrate, 700000, -bufsize, 700000, -rc_eq, &#39;blurCplx^(1-qComp)&#39;, -qcomp, 0.6, -qmin, 10, -qmax, 51, -qdiff, 4, -level, 30, -g, 30, -async, 2, -partitions, +parti4x4+partp8x8+partb8x8, -subq, 5, -trellis, 1, -refs, 1, -vbsf, h264_mp4toannexb, -flags, -global_header, -map, 0, -f, segment, -segment_time, 10, -segment_list, /Users/User/Documents/Java/server/data/media/1/3/prog_index.m3u8, -segment_list_flags, +live, -segment_format, mpegts, /Users/User/Documents/Java/server/data/media/1/3/segment_%05d.ts

    The resulting file is :

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-ALLOW-CACHE:YES
    #EXT-X-TARGETDURATION:12
    #EXTINF:10.005333,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00000.ts
    #EXTINF:11.952000,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00001.ts
    #EXTINF:10.002667,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00002.ts
    #EXTINF:10.008000,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00003.ts
    #EXTINF:0.266667,
    /Users/User/Documents/Java/server/data/media/1/10/segment_00004.ts
    #EXT-X-ENDLIST

    It all works perfect, but I only want e.g. 'segment_00000.ts, and not the complete absolute path, as that is of no use for live streaming. As this is a very ordinary application, I must do something wrong.

  • Retrieving RTP time from an IP camera programatically using FFMPEG

    22 novembre 2013, par Dídac Pérez

    I am using the ffmpeg C/C++ library to get the video stream from an IP camera using methods such as avformat_open_input(), av_read_frame(), etc... I would like to get the RTP time from the camera. pts and dts values give me the relative timestamp to the first frame, but I need the absolute date (i.e. 2013/11/22 12:40:30.123) and time since as I read, at the RTP layer the time is sent by the camera, and I have also configured the camera to use the dime from an NTP server.

    Please, I am really confused and I have tried everything without success, I am not able to find this date and time. Any help will be really appreciated, thank you so much.