Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (88)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (8599)

  • AWS Lambda function, API gateway and ffmpeg timeout issue

    3 novembre 2022, par Georgi Stoyanov

    I have created a lambda function, that is extracting the audio stream from a video file using ffmpeg. I have also configured API gateway as a trigger, where I am passing the file to the lambda function in the request body.

    


    The lambda function is working perfectly well with small files, but with bigger files, it needs a bit more time and then I am running into the API gateway timeout, which according to my understanding is set to 29 seconds max.

    


    So when I trigger audio extraction from a bigger file, I am hitting this timeout and my API request fails to return any result even though the transcoding still runs in the background and the file is extracted, so I was wondering what is the best approach to handle those cases, where the execution of the lambda function is taking longer ?

    


    I was thinking to start the transcoding in the background and simply return a JSON with a message that the transcoding might take a couple of minutes, depending on the input file duration, but if I try to push the ffmpeg to the background I am being presented with an error, that the destination file doesn't exist.

    


    os.system(f"{ffmpeg} -loglevel panic -nostdin -i {in_video} -vn -c:a aac -ar 48000 -b:a 192K {out_audio} 2> /dev/null &")


    


    This is the ffmpeg command extracting the audio and transcoding it to AAC.

    


    If I remove the 2> /dev/null & part of the command, it runs just fine, but if I keep it, I get an error :

    


    


    "errorMessage" : "[Errno 2] No such file or directory : 'output_audio.aac'"

    


    


    


    "errorType" : "FileNotFoundError"

    


    


    So I was wondering what is the preferred way to run processes in the background.

    


  • How to extract time-accurate video segments with ffmpeg ?

    30 octobre 2023, par Jim Miller

    This is not a particularly new question area around here, but I've tried what's been suggested there without much luck. So, my story :

    


    I've got a hunk of 15 seconds of straight-from-the-camera.mov video out of which I want to extract a specific chunk, which I can identify by start time and stop time, in seconds. I started by trying to do what I'll call a "copy extraction" : to get seconds 9 to 12,

    


    ffmpeg -i test.mov -vcodec copy -acodec copy -ss 9 -to 12 test-copy.mov


    


    This was a not-bad start, but there are some black frames at the beginning and end of the clip, which I can't have — it has to be a clean edit from the original. So, I tried recoding the original into a new, trimmed clip :

    


    ffmpeg -i test.mov -ss 00:00:09 -t 00:00:03 test-out.mov


    


    This is better, but not quite : There are no longer any black frames at the beginning of the clip, but they're still there at the end.

    


    After some more browsing and reading, I then suspected that the problem is that ffmpeg is having trouble finding the proper points because of a lack of keyframes in the original video. So I recoded the original video to (presumably) add keyframes, in a couple of different ways. Since I want to be able to pick video at boundaries of a second ("from 9 seconds to 12 seconds"), I tried, copying various suggestions around the web,

    


    ffmpeg -i test.mov -force_key_frames "expr:gte(t, n_forced)" test-forced.mp4


    


    and

    


    ffmpeg -i test.mov -g 1 test-g-inserted.mp4


    


    (I built these as mp4's based on some comments about an mp4 container being needed to support the keyframe search, but I'm honestly just hacking here.) I then tried the extraction as before, but on these new videos that presumably now have keyframes in them. No luck — both seem to be about the same ; the start is OK but there are still black frames at the end. (FWIW, both test-forced.mp4 and test-g-inserted.mp4 also have trailing black frames.)

    


    So : I'm still stuck, and would like to not be. Any insights out there as to what I'm doing wrong ? I feel like I'm close, but I really need to get rid of those trailing black frames....

    


  • ffmpeg - recode to lower bitrate + remove audio + watermark

    26 avril 2014, par Ove Sundberg

    I’m a complete noob to ffmpeg and I’m trying to do a couple of things in the same call :

    1) recode a video to a lower bitrate

    2) remove audio

    3) add a watermark center bottom

    4) save output as .webm

    With a bit of RTFM and scouring for examples I have managed to achieve of 1, 2 and 4 with :

    ffmpeg -i hires.mp4 -c:v libvpx -crf 10 -b:v 128k -r 24 -an -c:a libvorbis output-file.webm

    This call adds a watermark center bottom :

    ffmpeg -i hires.mp4 -i watermark.png -filter_complex "overlay=main_w/2-overlay_w/2:main_h-overlay_h-10" output-file.webm

    Now I struggle to combine the two. The second -i option is the watermark. Therefore I would have thought that

    ffmpeg -i hires.mp4 -c:v libvpx -crf 10 -b:v 128k -r 24 -an -c:a libvorbis -i watermark.png -filter_complex "overlay=main_w/2-overlay_w/2:main_h-overlay_h-10"  output-file.webm

    would do the trick. It does not off course, the error I get is

    Option b:v (video bitrate (please use -b:v)) cannot be applied to input file watermark.png -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to. Error parsing options for input file watermark.png. Error opening input files: Error number -22 occurred

    So I have the options all messed up. I’ve tried moving the options around but with no luck. I’d really appreciate some help here.