Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (97)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

Sur d’autres sites (10043)

  • Detect scene change on part of the frame

    16 juin 2021, par user18130814200115

    I have a video file of an online lecture cosisting of a slideshow with audio in the background.
    
I want to save images of each slide as well as the timestamp of that slide.
I do this using the scene and metadata filters :

    


    ffmpeg -i week-01.mp4 -filter_complex "select='gt(scene,0.011)',metadata=print:file=frames/time.txt" -vsync vfr frames/img%03d.jpg


    


    This works fine exept for one thing, there is a timer onscreen on the right in the video file.
If i set the thershold small enough to pick up all the slide changes, it also picks up the timer changes.

    


    So here is my question, Can I ask ffmpeg to :

    


      

    1. analize part of the frame (only the right side till roughly 75% to the left).
    2. 


    3. Then, on detecting a scene change in this area, save the entire frame and the timestamp.
    4. 


    


    I though of making a script that

    


      

    1. crops the video and saves it alongside the origional
    2. 


    3. analize the cropped video for scene changes and save the timestamps
    4. 


    5. extract the frames from the origional video using the timestamps
    6. 


    


    Is there a better/faster/shorter way to do this ?
Thanks in advance !

    


  • Importing PIL images into FFMPY/FFMPEG to save as GIF/video

    24 mai 2023, par Tricky Devil

    I would like to know how I can transfer PIL images to FFMPY to save it as video, or gif, since the PIL library's quantization method has strong quality losses in certain cases. I first do some modifications with PIL, and then want to export and save the result.

    


    I did not find any information on the topic online, beside one post with PIL to FFMPEG :
Pipe PIL images to ffmpeg stdin - Python
How could I implement something similar in FFMPY ?

    


    If I have for example this setup to begin with :

    


    import ffmpy
import PIL
from PIL import Image as Img

images = [Img.open('frame 1.png'),Img.open('frame 2.png')]#How do I convert them to FFMPEG?

#Here I modify the images using PIL

#Save with FFMPEG:
ff = ffmpy.FFmpeg(
    inputs={images ?: None},#How do I insert PIL images here?
    outputs={'output.gif': None},
    executable='ffmpeg\\bin\\ffmpeg.exe')
ff.run()


    


    How would I proceed to convert and save the images as a video using FFMPY ?
Is it possible by adding some steps inbetween ? I wouldn't want to have to save all PIL images first as images, and then import them and save them with FFMPY a second time, since that would be very time consuming with larger files.

    


  • Converting WebM audio to mp3 using ffmpeg and Rails

    30 avril 2021, par Garrett Bodley

    I created an online step sequencer and want to add functionality so that users can record the audio and save it as an mp3 on their local machine. I've been able to use the WebAudioAPI to record the sound generated in the browser window and send it to my Rails backend as a WebM blob. I am attempting to incorporate ffmpeg using the Streamio gem.

    


    How do I convert that blob to mp3 ? I'm planning on making a Recording model that belongs_to :user and has_one_attached :audio. I imagine I should use a before_save callback to process the blob ? What's confusing to me is that it seems streamio creates a new copy of the file when transcoding. How do I convert the blob to mp3 in place ?

    


    I've seen some posts where people call ffmpeg using system("ffmpeg code goes here") but I don't really understand how to grab the output so that ActiveStorage can link the resulting file to my models and whatnot.

    


    To add complexity to all of this is that I ultimately want to host this publicly and store the audio in a Cloudinary folder, which I imagine would change the process quite a bit. As you can tell I'm a bit confused as to how best to approach this problem. Any help would be greatly appreciated !