Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (14)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

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

  • ffmpeg video and audio out of sync, slower (44100 to 48000)

    11 janvier 2021, par Derel

    I downloaded few live videos from Twitch using a youtube-dl command, but in the original video the audio have sampling rate in 48000 and youtube-dl saved the video in 44100, turning the video slower and the audio pitched. When i opened the audio on audacity and change the sampling rate 44100 to 48000, the timing and pitch of the audio was fixed, but my question is : Someone here knows how to fix it these files using ffmpeg, fixing the video running time and the audio pitch ?

    


    Well, I would like to have a command that I could fix just by rendering without converting the file, but if it's the only solution is converting, I accept.

    


    Thank you for you time, and I appreciate your attention !

    


  • Best way to precisely trim and concatenate with ffmpeg

    24 janvier 2021, par TommyG

    I'm trying to find the most efficient way to cut up a video with frame precision then join the pieces together and have it play without any issues or glitches. But so far my experiments have failed and I can't figure out where I'm going wrong. First of all I understand that the only way to get the video cut precisely unless all frames are I-frames is to re-encode it and that's fine except to my surprise the cuts on the clips I tried are not accurate despite of re-encoding. Here's my code.

    


    ffmpeg -i input.mp4 -filter_complex \
"[0:v]trim=start_frame=23:end_frame=343,setpts=PTS-STARTPTS[cp1]; \ 
[0:v]trim=start_frame=2905:end_frame=3248,setpts=PTS-STARTPTS[cp2]; \
[cp1][cp2]concat[out]" -map [out] -c:v libx264 -crf 8 -preset ultrafast -fflags +genpts output.mkv -y


    


    When I play this the second clip [cp2] appears like it's been cut at least one frame earlier resulting in an unwanted flash. So for my second test I tried something simpler. First I opened the input file in MPC to get timing info for frames of cp2 start_frame=2905 is 00:02:01.162 and end_frame=3248 is 00:02:15.512. So I tried the following.

    


    ffmpeg -i input.mp4 -ss 00:02:01.162 -to 00:02:15.512 -c:v libx264 -crf 8 -preset ultrafast -fflags +genpts output.mkv -y


    


    The result was exactly the same with cut happening earlier than specified. Note : the -to time is actually the end of the clip. Finally someone has suggested to force key frames by specifying your cuts time stamps first like :

    


    ffmpeg -i input.mp4 -force_key_frames 00:02:01.162,00:02:15.512 output.mp4


    


    Then take the output.mp4 and feed it as input to the code where I use the filter_complex but unfortunately this returned the same results.

    


    I'm still very new to ffmpeg. What can I try next ?

    


  • How to execute fluent-ffmpeg commands from express router ?

    27 janvier 2021, par Chris

    so I'm trying to control and m3u8 playlist using data sent in thru an express route and keep getting the same error "Error : ffmpeg exited with code 1 : Conversion failed !" when attempting.

    


    My code looks like this

    


    ch1Router
    .route("/source")
    .post(jsonBodyParser, (req, res, next) => {
        //video url from request body
        const { url } = req.body;
        
        //test console log
        console.log(req.body);

        //ffmpeg commands
        ffmpeg(url)
            .output('videos/Ch1.m3u8')
            .on('error', (err) => {
                console.log("Something Happened:", err.message)
                res.send("Error changing input!")
            })
            .run()
            

        
        res.send("hi")
    })


    


    When I run this exact command in a separate file using Node, the command executes and I only need to refresh my browser to see the new video file. When trying to chain it to a post request containing the video URL I get the conversion error. Any help would be appreciated.

    


    **Updated my code to prevent the server from crashing and respond with an error message but still don't understand the conversion error.