Recherche avancée

Médias (91)

Autres articles (49)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (5608)

  • FFmpeg - add an animated gif (cropped by mask) to the video

    11 mars 2021, par zeromodule

    I have 3 inputs :

    


      

    1. Video file : https://file.io/6jtUlnZ7TGmT
    2. 


    3. Animated GIF with transparent background https://i.imgur.com/Vo3KHZm.gif
    4. 


    5. Mask file (BW) the same resolution as the video https://i.imgur.com/YJXUUrZ.png
    6. 


    


    I want to put the image on the video, but throw out all GIF pixels that are transparent in the mask (replace them with transparent ones).

    


    Video
    
Mask
    
Image
    
Result

    


    My current command, without masking (it works fine) :

    


    ffmpeg -i input.mp4 -ignore_loop 0 -i animation.gif \
-filter_complex "[1]scale=700x700[scaled_gif];\
[0][scaled_gif]overlay=50:30:shortest=1" \
-codec:a copy output.mp4


    


    UPDATE #1

    


    I managed to get closer to my goal with this command :

    


    ffmpeg -y -i input.mp4 -loop 1 -i mask.png \ 
-filter_complex "[1:v]alphaextract[mask]; \
movie=animation.gif,scale=1920x1080[scaled_gif]; \
[scaled_gif][mask]alphamerge[masked]; \
[0:v][masked]overlay=0:0" \
-c:a copy output_masked.mp4


    


    but it has 2 problems :

    


      

    1. GIF loses it's transparency. Transparent pixels become white.
    2. 


    3. GIF plays only once (i.e. no loop)
    4. 


    


    Output : https://file.re/2021/03/11/outputmasked/

    


  • Using `grab_frame` with `FFMpegFileWriter` Yields Error in the Figure Argument to Subprocess

    7 juillet 2024, par GPU Programmer

    I want to generate an MP4 file using frames produced by a rather complicated simulation. If I have to watch the movie as a side affect of generating it I will not complain too much, but would rather not "show" anything on the screen. The overhead of making the movie is trivial compared to the simulations, so I care much more about clean simple code than about performance.

    


    It seemed natural to use grab_frame with FFMpegFileWriter. The following code seemed right.

    


    fig, ax = plot.subplots(figsize=(6.5, 6.5))

assert(animation.FFMpegFileWriter().isAvailable())
writer = animation.FFMpegFileWriter(fig)
writer.setup(fig, "test1.mp4",224)

with writer.saving(fig,"test1.mp4", dpi=224):
    for i in range(len(frameSeg)):
        PlotFrame(i)
        writer.grab_frame()

# writer.finish()

print("done")


    


    It runs, but yeilds the following error

    


    


    [image2 demuxer @ 0000021fab8c1000] Unable to parse option value "Figure(650x650)" as video rate
[image2 demuxer @ 0000021fab8c1000] Error setting option framerate to value Figure(650x650).
[in#0 @ 0000021fab8c1e00] Error opening input : Invalid argument
Error opening input file ... AppData\Local\Temp\tmpe19ci2wz\tmp%07d.png.
Error opening input files : Invalid argument

    


    


    


    subprocess.CalledProcessError : Command '['ffmpeg', '-framerate', 'Figure(650x650)', '-i', 'F :\Users\Kenne.DESKTOP-BT6VROU\AppData\Local\Temp\tmpe19ci2wz\tmp%07d.png', '-loglevel', 'error', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', 'test1.mp4']' returned non-zero exit status 4294967274.

    


    


    Did I miss something in setup, is it an installation problem, or is it a bug ?

    


    By the way using FFMpegWRiter with FuncAnimation works ...

    


  • Python script creates too short video using ffmpeg

    25 mai 2014, par Majzlik

    I use python script to create multiple pictures and call ffmpeg to create video. But there is a problem, because ffmpeg use just few pictures (about 7 - 10 from 160), but throws no error. I’ve tried the same command from commandline and video was correct. I’m calling ffmpeg this way :

    ffmpeg_call = ["ffmpeg", "-r", str(FPS), "-b", "16777216", "-y", "-i", "./sample_%05d.png", FILEOUTNAME + ".mp4"]
    subprocess.call(ffmpeg_call)

    and this was command in commandline :

    ffmpeg -r 25 -b 16777216 -y -i ./sample_%05d.png animation.mp4

    I’ve printed these commands to compare and they were the same, so there has to be problem in ffmpeg + python cooperation. Don’t you know, how to fix it ?

    UPDATE :

    this is log from ffmpeg :

    ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav     developers
     built on Feb  6 2014 20:56:59 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    Input #0, image2, from '/tmp/tmpRKxT6s/ampgraph/tmp/sample_%05d.png':
    Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, pal8, 640x480, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Incompatible pixel format 'pal8' for codec 'mpeg4', auto-selecting format 'yuv420p'
    [buffer @ 0x19e18a0] w:640 h:480 pixfmt:pal8
    [avsink @ 0x19ee1c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x19e2fc0] w:640 h:480 fmt:pal8 -> w:640 h:480 fmt:yuv420p flags:0x4
    Output #0, mp4, to './ampgraph/animation.mp4':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    frame=   11 fps=  0 q=2.5 Lsize=      46kB time=0.44 bitrate= 859.1kbits/s    
    video:45kB audio:0kB global headers:0kB muxing overhead 1.906569%