Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (111)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (4525)

  • fluent-ffmpeg concatenate audio files

    8 septembre 2020, par Martin

    I am trying to use fluent-ffmpeg with my electron app to concatenate multiple audio files together with an image in a video. So if i have three files :

    


    song1.mp3 1:00
song2.mp3 0:30
song3.mp3 2:00
front.jpg

    


    I could create output.mp4 which would be 3:30 seconds long, and play each file one after the other in order. With front.jpg set as the background image.

    


    I have succesfully been able to render a single audio file with an image file, but havent been able to render multiple audio files together yet into a video.

    


    Here is my concat attempt :

    


    const command = ffmpeg();
       
            const audioFiles = ['C:\\Users\\marti\\Documents\\martinradio\\uploads\\Movers - 1970 greatest hits vol. 2\\01 back from the moon.mp3', 'C:\\Users\\marti\\Documents\\martinradio\\uploads\\Movers - 1970 greatest hits vol. 2\\02 love me not.mp3'];
            audioFiles.forEach((fileName)=>{
                command.input(fileName);
            })
            command
                    .complexFilter([
                        '[0]adelay=1000|1000[a]',
                        '[1]adelay=4000|4000[b]',
                        '[a][b]amix=2'
                    ])
                    .input(imgPath)
                    .videoCodec('copy')
                    .save('C:\\Users\\marti\\Documents\\martinradio\\uploads\\Movers - 1970 greatest hits vol. 2\\concat-autio.mp4')
                    .on('codecData', function(data) {
                        console.log('codecData=',data);
                    })
                    .on('progress', function({ percent }) {
                        console.log('progress percent: ' + percent);
                    })
                    .on('end', function() {
                        console.log('file has been converted succesfully');
                    })
                    .on('error', function(err) {
                        console.log('an error happened: ' + err.message);
                    })
                    command.run()


    


    When I run it I can see in my console it start, run, and end.

    


    enter image description here

    


    My example uses two audio files :

    


    01 back from the moon.mp3 02:31
02 love me not.mp3' 02:35

    


    So my output file should be 05:06 in length, but my output is only 02:39 in length
enter image description here

    


  • Combining multiple mp4s with python-ffmpeg wrapper

    30 août 2020, par Perchful

    So I'm working on a program that downloads multiple mp4s to a folder and then concats them together. I've run into a few problems while using the FFMPEG python wrapper. At first, I was able to combine the videos using the code, but there is no audio for some reason.

    


        filenames = []
        inputs = []



        dlnumber = 1

        #Actual downloading of mp4s

        while dlnumber <= len(user_timeline):
            subprocess.call(r'youtube-dl.exe ' + user_timeline[dlnumber-1]['url'] + ' -o' + str(os.getcwd()) + r'\DLvideo' '\\u' + str(dlnumber) + '.%(ext)s')
            subprocess.call('ffmpeg -i ' + str(os.getcwd()) + r'\DLvideo\u' + str(dlnumber) + '.mp4' + ' -r 60 -vf scale=1920:1080 -ar 44100 ' + str(os.getcwd())+ r'\DLvideo\f' + str(dlnumber) +'.mp4')


            filenames.append(str(os.getcwd())+ r'\DLvideo\f' + str(dlnumber) +'.mp4')
            os.remove(str(os.getcwd()) + r'\DLvideo\u' + str(dlnumber) + '.mp4')

            dlnumber +=1

        for filename in filenames:
            inputs.append(ffmpe.input(filename))

#FFMPEG CONCAT
        (   ffmpeg
            .concat(*inputs)
            .output('TEST.mp4')
            .run()
        )


    


    I've also heard about separating the audio and video, making changes, and then combining them together again, and while I was able to separate the audio and the video, I couldn't exactly figure out how to combine them individually, and then together again. Would love some help. Thanks.

    


  • FFmpeg live rtmp capture to segments and encoding to mp4 is causing time glitches in the output

    19 août 2020, par ezwrighter

    I am having issues with capturing live video and converting the latest x minutes to a useable mp4 on demand.

    


    Currently i am capturing the latest 15m of a live rtmp stream and recording it with visual timestamp on it and saving it to segment files like this :

    


    ffmpeg -i rtmps://domain/myawesomestream.stream -map 0 -vf drawtext=x=10:y=10:shadowcolor=white:shadowx=1:shadowy=1:text='%{localtime\:%m/%d/%Y %H\\\:%M\\\:%S MST}' -vcodec libx264 -crf 21 -acodec copy -an -start_at_zero -f segment -segment_time 15 -segment_wrap 61 -segment_list_type ffconcat -segment_list_size 60 -segment_list bufferTime.ffcat -segment_format mpegts /dvr/captureTime-%03d.ts

    


    This works and allows me to always have the latest 15m of video captured with usable segments that I can then roll into mp4 files on demand like this without any re-encoding :

    


    /usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 /var/www/chat/dvr/ugb/fifteenminutesofvideo.mp4

    


    This does a great job of giving me the last 15 minutes of video from the live stream at any given moment. However, I would like to be able to get the last X minutes of video from the current segments instead of having to get the whole 15m minutes, without more encoding. I can sort of do it with two passes like this :

    


    /usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 -y /dvr/tmp/mywhole15minutes.mp4
/usr/bin/ffmpeg -sseof -120 -i /dvr/tmp/myshole15minutes.mp4 -c copy -f mp4 -y /dvr/my120secondsofvideo.mp4

    


    This gives me the last 120 seconds of video, but the front of the video has timestamp or keyframe issues at the front of it. It shows the visual timestamp between 5-12 seconds behind and then pauses or jumps the empty frames (Depending on the player) and then starts to play normally. I would love to fix the front of this video and have played with genpts and other flags to no avail :-( Any hints that might push me in the right direction ? Thanks ffmpeg pros out there ! I don't have a great place to publicly host the bad encoded video file, but would be happy to PM a link.