Recherche avancée

Médias (0)

Mot : - Tags -/acrobat

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (68)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11190)

  • Fill patterns

    26 avril 2008, par Mikko Koppanen — Imagick, PHP stuff

    My work life has been quite busy lately and I haven’t had a chance to sit down and blog. I have been touring around London and some parts of the northern England consulting and organizing some training here and there. Luckily I have had the chance to do some work on Imagick and the 2.2.0 beta release is getting closer. The internal structure was completely restructured and broken down into several smaller files. During this time Imagick was adapted to follow the PHP Coding Standards more closely. Still a work in progress :)

    I committed slightly modified version of this example to PHP Manual http://uk.php.net/manual/en/imagick.examples.php page a few days ago. The example illustrates using an image as a part of a named fill pattern. The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc). The code itself is pretty straight forward : Read the image, create the pattern and use the pattern as a fill.

    The ice formations image is from http://www.photoeverywhere.co.uk/west/winterholiday/slides/iceformations5679.htm.

    1. < ?php
    2.  
    3. /* Create a new imagick object */
    4. $im = new Imagick( ’iceformations5679.JPG’ ) ;
    5.  
    6. /* Create imagickdraw object */
    7. $draw = new ImagickDraw() ;
    8.  
    9. /* Start a new pattern called "ice" */
    10. $draw->pushPattern( ’ice’ , 0 , 0 , 50 , 50 ) ;
    11.  
    12. /* Composite the image on the pattern */
    13. $draw->composite( Imagick: :COMPOSITE_OVER, 0, 0, 50, 50, $im ) ;
    14.  
    15. /* Close the pattern */
    16. $draw->popPattern() ;
    17.  
    18. /* Use the pattern called "ice" as the fill */
    19. $draw->setFillPatternURL( ’#ice’ ) ;
    20.  
    21. /* Set font size to 52 */
    22. $draw->setFontSize( 52 ) ;
    23.  
    24. /* Annotate some text */
    25. $draw->annotation( 5, 50, "Hello World !" ) ;
    26.  
    27. /* Create a new canvas and white image */
    28. $canvas = new Imagick() ;
    29. $canvas->newImage( 310, 70, "white" ) ;
    30.  
    31. /* Add black border around the resulting image */
    32. $canvas->borderImage( ’black’, 1, 1 ) ;
    33.  
    34. /* Draw the ImagickDraw on to the canvas */
    35. $canvas->drawImage( $draw ) ;
    36.  
    37. /* Set the format to PNG */
    38. $canvas->setImageFormat( ’png’ ) ;
    39.  
    40. /* Output the image */
    41. header( "Content-Type : image/png" ) ;
    42. echo $canvas ;
    43.  ?>

    And the result is here :

  • Fill patterns

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

    My work life has been quite busy lately and I haven’t had a chance to sit down and blog. I have been touring around London and some parts of the northern England consulting and organizing some training here and there. Luckily I have had the chance to do some work on Imagick and the 2.2.0 beta release is getting closer. The internal structure was completely restructured and broken down into several smaller files. During this time Imagick was adapted to follow the PHP Coding Standards more closely. Still a work in progress :)

    I committed slightly modified version of this example to PHP Manual http://uk.php.net/manual/en/imagick.examples.php page a few days ago. The example illustrates using an image as a part of a named fill pattern. The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc). The code itself is pretty straight forward : Read the image, create the pattern and use the pattern as a fill.

    The ice formations image is from http://www.photoeverywhere.co.uk/west/winterholiday/slides/iceformations5679.htm.

    1. < ?php
    2.  
    3. /* Create a new imagick object */
    4. $im = new Imagick( ’iceformations5679.JPG’ ) ;
    5.  
    6. /* Create imagickdraw object */
    7. $draw = new ImagickDraw() ;
    8.  
    9. /* Start a new pattern called "ice" */
    10. $draw->pushPattern( ’ice’ , 0 , 0 , 50 , 50 ) ;
    11.  
    12. /* Composite the image on the pattern */
    13. $draw->composite( Imagick: :COMPOSITE_OVER, 0, 0, 50, 50, $im ) ;
    14.  
    15. /* Close the pattern */
    16. $draw->popPattern() ;
    17.  
    18. /* Use the pattern called "ice" as the fill */
    19. $draw->setFillPatternURL( ’#ice’ ) ;
    20.  
    21. /* Set font size to 52 */
    22. $draw->setFontSize( 52 ) ;
    23.  
    24. /* Annotate some text */
    25. $draw->annotation( 5, 50, "Hello World !" ) ;
    26.  
    27. /* Create a new canvas and white image */
    28. $canvas = new Imagick() ;
    29. $canvas->newImage( 310, 70, "white" ) ;
    30.  
    31. /* Add black border around the resulting image */
    32. $canvas->borderImage( ’black’, 1, 1 ) ;
    33.  
    34. /* Draw the ImagickDraw on to the canvas */
    35. $canvas->drawImage( $draw ) ;
    36.  
    37. /* Set the format to PNG */
    38. $canvas->setImageFormat( ’png’ ) ;
    39.  
    40. /* Output the image */
    41. header( "Content-Type : image/png" ) ;
    42. echo $canvas ;
    43.  ?>

    And the result is here :

  • Ffmpeg video output is 0 seconds with correct filesize when uploading to google cloud bucket

    22 août 2022, par Turgut

    I've made a C++ program that lives in gke and takes some videos as input using ffmpeg, then does something with that input using opengl(not relevant), then finally encodes those edited videos as a single output. Normally the program works perfectly fine on my local machine, it encodes just as I want it to with no warnings or valgrind errors whatsoever. Then, after encoding the said video, I want my program to upload that video to the google cloud storage. This is where the problem comes, I have tried 2 methods for this : First, I tried using curl to upload to the cloud using a signed url. Second, I tried mounting the google storage using gcsfuse(I was already mounting the bucket to access the inputs in question). Both of those methods yielded undefined, weird behaviour's ranging from : Outputing a 0byte or 44byte file, (This is the most common one :) encoding in the correct file size 500mb but the video is 0 seconds long, outputing a 0.4 second video or just encoding the desired output normally (really rare).

    &#xA;

    From the logs I can't see anything unusual, everything seems to work fine and ffmpeg does not give any errors or warnings, so does valgrind. Everything seems to work normally, even when I use curl to upload the video to the cloud the output is perfectly fine when it first encodes it (before sending it with curl) but the video gets messed up when curl uploads it to the cloud.

    &#xA;

    I'm using the muxing.c example of ffmpeg to encode my video with the only difference being :

    &#xA;

    void video_encoder::fill_yuv_image(AVFrame *frame, struct SwsContext *sws_context) {&#xA;    const int in_linesize[1] = { 4 * width };&#xA;    //uint8_t* dest[4] = { rgb_data, NULL, NULL, NULL };&#xA;    sws_context = sws_getContext(&#xA;            width, height, AV_PIX_FMT_RGBA,&#xA;            width, height, AV_PIX_FMT_YUV420P,&#xA;            SWS_BICUBIC, 0, 0, 0);&#xA;&#xA;    sws_scale(sws_context, (const uint8_t * const *)&amp;rgb_data, in_linesize, 0,&#xA;            height, frame->data, frame->linesize);&#xA;}&#xA;

    &#xA;

    rgb_data is the data I got after editing the inputs. Again, this works fine and I don't think there are any errors here.

    &#xA;

    I'm not sure where the error is and since the code is huge I can't provide a replicable example. I'm just looking for someone to point me to the right direction.

    &#xA;

    Running the cloud's output in mplayer wields this result (This is when the video is the right size but is 0 seconds long, the most common one.) :

    &#xA;

    MPlayer 1.4 (Debian), built with gcc-11 (C) 2000-2019 MPlayer Team&#xA;do_connect: could not connect to socket&#xA;connect: No such file or directory&#xA;Failed to open LIRC support. You will not be able to use your remote control.&#xA;&#xA;Playing /media/c36c2633-d4ee-4d37-825f-88ae54b86100.&#xA;libavformat version 58.76.100 (external)&#xA;libavformat file format detected.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f2cba1168e0]moov atom not found&#xA;LAVF_header: av_open_input_stream() failed&#xA;libavformat file format detected.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f2cba1168e0]moov atom not found&#xA;LAVF_header: av_open_input_stream() failed&#xA;RAWDV file format detected.&#xA;VIDEO:  [DVSD]  720x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)&#xA;X11 error: BadMatch (invalid parameter attributes)&#xA;Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory&#xA;[vdpau] Error when calling vdp_device_create_x11: 1&#xA;==========================================================================&#xA;Opening video decoder: [ffmpeg] FFmpeg&#x27;s libavcodec codec family&#xA;libavcodec version 58.134.100 (external)&#xA;[dvvideo @ 0x7f2cb987a380]Requested frame threading with a custom get_buffer2() implementation which is not marked as thread safe. This is not supported anymore, make your callback thread-safe.&#xA;Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV)&#xA;==========================================================================&#xA;Load subtitles in /media/&#xA;==========================================================================&#xA;Opening audio decoder: [libdv] Raw DV Audio Decoder&#xA;Unknown/missing audio format -> no sound&#xA;ADecoder init failed :(&#xA;Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders&#xA;[dvaudio @ 0x7f2cb987a380]Decoder requires channel count but channels not set&#xA;Could not open codec.&#xA;ADecoder init failed :(&#xA;ADecoder init failed :(&#xA;Cannot find codec for audio format 0x56444152.&#xA;Audio: no sound&#xA;Starting playback...&#xA;[dvvideo @ 0x7f2cb987a380]could not find dv frame profile&#xA;Error while decoding frame!&#xA;[dvvideo @ 0x7f2cb987a380]could not find dv frame profile&#xA;Error while decoding frame!&#xA;V:   0.0   2/  2 ??% ??% ??,?% 0 0 &#xA;&#xA;&#xA;Exiting... (End of file)&#xA;&#xA;&#xA;

    &#xA;

    Edit : Since the code runs on a VM, I'm using xvfb-run ro start my application, but again even when using xvfb-run it works completely fine on when not encoding to the cloud.

    &#xA;