Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (47)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (8732)

  • Different filesizes for images generated using octave and python

    22 février 2017, par Lakshay Garg

    I am using python (scikit-image) and octave to generate 200 images as follows

    Python3

    import numpy as np
    from skimage.io import imsave

    images = [255*np.ones((100,100), dtype=np.uint8),  # white
                np.zeros((100,100), dtype=np.uint8)]  # black

    for i in range(200): # save alternating black and white images
       imsave('%04d.png'%(i+1), images[i%2])

    Octave

    pkg load image;

    im1 = 255*ones(100,100); # white
    im2 = zeros(100,100);    # black
    for i=1:200
       name = sprintf('%04d.png', i);
       if mod(i,2) == 0
           imwrite(im1, name);
       else
           imwrite(im2, name);
       end
    end

    Next, I use ffmpeg to generate two videos (alternating white and black frames) from these two sets of images using the following command

    ffmpeg -r 10 -loglevel quiet \
          -i ./%04d.png -c:v libx264 \
          -preset ultrafast -crf 0 ./out.mkv
    1. Sizes of image files generated by both these codes are different.

      • Octave white : 192 bytes, black : 98 bytes
      • Python white : 120 bytes, black : 90 bytes
    2. Sizes of video files generated from these octave and python images are significantly different from each other.

      • Octave filesize : 60 kilobytes
      • Python filesize : 116 kilobytes

    Why do we have this apparently very strange behavior ?

    EDIT

    Since it was suggested that the behavior might be dues to octave and python using different bit-depths to store the images, I changes the octave code to use 8 bit numbers

    im1 = uint8(255*ones(100,100)); # white
    im2 = uint8(zeros(100,100));    # black

    and now the image file sizes are nearly the same

    • Octave white : 118 bytes, black : 90 bytes
    • Python white : 120 bytes, black : 90 bytes

    but the problem is still the same for video files, octave : 60K, python : 116K

  • ffmpeg one draw text to multiple outputs

    31 juillet 2023, par kRicha

    I've created command with ffmpeg-fluent, which connects video file with music, use shortest(video) duration, and output this to result file

    


    const newVideo = Ffmpeg(`./source/video/${category}/${dayNumber}.mp4`)
                .addInput(`./source/audio/${category}.mp3`)
                .addOption([
                    '-map 0:v:0',
                    '-map 1:a:0',
                    '-shortest'
                ]);

            newVideo.videoFilters({
                filter: 'drawtext',
                options: { ...FONT_OPTIONS, ...{ text: '1', boxcolor: 'black@1', y: 280 } }
            }).output('out1.mp4')
                .output('out2.mp4');


    


    generated command line :

    


    ffmpeg \
-i ./source/video/women/1.mp4 \
-i ./source/audio/women.mp3 -y \
-filter:v drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=1:boxcolor=black@1:y=280,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a0:boxcolor=black@0.8:enable='between(t,0,6.5)':y=700,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a1:boxcolor=black@0.8:enable='between(t,0,6.5)':y=800,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a2:boxcolor=black@0.8:enable='between(t,0,6.5)':y=900,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=a3:boxcolor=black@0.8:enable='between(t,0,6.5)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b0:boxcolor=black@0.8:enable='between(t,7,10)':y=1000,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b1:boxcolor=black@0.8:enable='between(t,7,10)':y=1100,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b2:boxcolor=black@0.8:enable='between(t,7,10)':y=1200,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b3:boxcolor=black@0.8:enable='between(t,7,10)':y=1300,drawtext=fontsize=80:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=b4:boxcolor=black@0.8:enable='between(t,7,10)':y=1400,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=c:enable='between(t,10.2,inf)':boxcolor=black@1:y=1500,drawtext=fontsize=30:fontcolor=white:x=(w-tw)/2:box=1:boxborderw=20:fontfile=./OpenSans-Light.ttf:text=d:enable='between(t,10.2,inf)':boxcolor=black@1:y=1550 \
-map 0:v:0 \
-map 1:a:0 \
-shortest out2/_.mp4


    


    if I add second output it works, but without audio and drawtext ? How could I fixe this and get draw text works on both outputs

    


  • Audio in ffmpeg

    1er octobre 2020, par Konduri Sai Aditya

    I need to add audio as an input to below command, How can I achieve it

    


    ffmpeg -i test.png -i test.mp4 -y -filter_complex "[1:v]scale=1422:800[scale1],[scale1]rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0],[0:v][rotate0]overlay=258.04:107.71[mediaoverlayout0],color=black@0:451x137[c1],[c1]setsar=1,drawtext=fontfile='/Windows/fonts/Peddana-Regular.ttf':text='ADITYA':fontsize=121.19999999999999:fontcolor=#1e8bc3:line_spacing=16.91,rotate=0:ow=rotw(0):oh=roth(0):c=black@0[rottext1],[mediaoverlayout0][rottext1]overlay=x=544.63:y=263.076:shortest=1" -pix_fmt yuv420p op.mp4