Recherche avancée

Médias (91)

Autres articles (79)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (10318)

  • Overlay a 16/9 video to a 9/16 ratio and shrink the original video [closed]

    6 avril 2024, par thanhbo

    I assume the video has an aspect ratio of 16/9 (size 1920:1080). I want to convert it to 9/16 ratio and shrink the original video. The formula I wrote is as follows but there is an error. I hope someone can help, thank you.

    


    ffmpeg -y -i A1.mp4 -filter_complex "split[crp0][crp1];[crp0]scale=iw:2*trunc(iw*16/18),boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=11,setsar=1[bg],[1:v]scale=(iw-100):-1[bg2];[bg][bg2]overlay=(W-w)/2:(H-h)/2[bg3]" -map "[bg3]" bg3.mp4

ffmpeg -y -i A1.mp4 -filter_complex "split[crp0][crp1];[crp0]scale=iw:2*trunc(iw*16/18),boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=11,setsar=1[bg],[1:v]scale=(iw-100):-1[bg2];[bg][bg2]overlay=(W-w)/2:(H-h)/2[bg3]" -map "[bg3]" bg3.mp4


    


  • ffmpeg video freezes some seconds the output video

    7 septembre 2022, par FreddicMatters

    I'm using the program ffmpeg on windows, I just downloaded the binaries setted the path variable of windows to be able of use it.

    


    I'm ran ffmpeg with python and also just running the command in the cmd

    


    #videos.txt

    


    file C:/Users/freddydev/Videos/video1.mp4
file C:/Users/freddydev/Videos/video2.mp4
file C:/Users/freddydev/Videos/video3.mp4
file C:/Users/freddydev/Videos/video4.mp4


    


    #python script :

    


    import subprocess
import shlex

subprocess.run(shlex.split('ffmpeg -f concat -safe 0  -i videos.txt -c:v libx264 -c copy output.mp4'))


    


    #cmd

    


    ffmpeg -f concat -safe 0  -i videos.txt -c:v libx264 -c copy output.mp4


    


    The output video plays fine the half of the video and after some 5 seconds it freezes and the final seconds of the video there is not sound.

    


    I have downloaded multiple ffmpeg binaries from https://ottverse.com/ffmpeg-builds and I'm getting the same result.

    


    My laptop is a core i5 with 12GB of RAM.
The rendering is very fast only takes 2 seconds, I also used moviepy library with python and it takes more than 20sg to render the video but when I concatenate large videos this give me wrong frames in the video at the end.

    


    What could I do to fix this problem with ffmpeg.
Thanks so much.

    


  • ffmpeg : is there a fast way for extracting several thumbnails from a video without parsing the video from the beginning every time ?

    18 mars, par archie

    I tried several ways for extracting sample frames from a video file with ffmpeg. I found out that the fastest way is by placing the following command in a loop :

    


    ffmpeg -ss $frame_time -i "$input_video" -frames:v 1 -vf scale=256:-1 "$Work_dir/thumb$thumb_index.jpg"


    


    (I have omitted the parts of the command that are not relevant to the question, such as drawtext, hide_banner, loglevel). The variables frame_time and thumb_index are initialized before the loop and incremented by a fixed amount at every step : +1 for thumbs_index and $duration/25 for frame_time. I read in the ffmpeg documentation (https://trac.ffmpeg.org/wiki/Seeking) that having the -ss part before the -i part is very fast because the input is parsed by keyframe. For the same reason, the loop containing the command above is also much faster than commands based on "-vf fps=$thumbs_number/$duration".

    


    In fact, the code works pretty well. However, I can't escape a feeling of programming discomfort, because ffmpeg is called several times for each video file, and every time it has to parse the file from the beginning. I mean, if I had a function doing the same as the command above — it would parse a video from the beginning to search for a frame at a certain time — calling it n times to extract a regular sequence of n frames would be bad programming. I should change the function to parse the video file once and get all the frames I need in a single pass.

    


    My question is : is there a fast way for having ffmpeg parse a video file a single time, searching by keyframes and extracting a given number of frames at a given distance from one another ? I am ready to take No for an answer, but one who is deeper into ffmpeg than I am might know a way. Thanks