Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (91)

Sur d’autres sites (16689)

  • Quickly split videos into parts with ffmpeg

    20 avril 2021, par RewossKy

    I'm doing splitting on FFMPEG. I divide 1.5 hour videos into 30 minutes. I have two ways of partitioning, the first is the method of rendering by recodecing on the top, I do not have any problem in this, but the time is quite long despite the GTX 1660s graphics card and the ryzen5 3500x processor.

    


    At the bottom, the time is short, but the first 3-4 seconds of the second part videos are frozen. Sometimes this causes problems like not reading in video editing programs.

    


    With recodec (slow, no problem)
ffmpeg -i 1.mp4 -vcodec libx264 -crf 30 -ss 00:00:00 -t 00:29:30 s1.mp4
ffmpeg -i 1.mp4 -vcodec libx264 -crf 30 -ss 00:29:31 -t 00:29:30 s2.mp4
ffmpeg -i 1.mp4 -vcodec libx264 -crf 30 -ss 00:59:01 -t 00:29:30 s3.mp4
ffmpeg -i 1.mp4 -vcodec libx264 -crf 30 -ss 01:28:30 -t 00:29:30 s4.mp4

    


    Without recodec (fast but have problem sometimes)
ffmpeg -i 1.mp4 -vcodec copy -ss 00:00:00 -t 00:29:30 s1.mp4
ffmpeg -i 1.mp4 -vcodec copy -ss 00:29:31 -t 00:29:30 s2.mp4
ffmpeg -i 1.mp4 -vcodec copy -ss 00:59:01 -t 00:29:30 s3.mp4
ffmpeg -i 1.mp4 -vcodec copy -ss 01:28:30 -t 00:29:30 s4.mp4

    


  • Playing Several Videos in a Row From a Browser

    2 août 2014, par user18490

    It’s simple to play 1 video (using HTML5), but my question is, can you play 2 or more videos in a row.

    Basically I’d like to let the user select as many clips as he/she wants, and let him/her play them in the browser (or potentially an external player such as FFplay, but the browser is my goal for now). It’s similar to the concept of playlist in Youtube, ... there should be no cut between two consecutive clips (which is the case right now with playlist in Youtube).

    Is that possible with existing API/tools/techniques ?

  • Merge Videos using fluent-ffmpeg

    25 octobre 2023, par Andronik Nazaryan

    I'm trying to merge two videos, the following code works perfectly on windows 10, but it gives me an error when trying to run it on linux/ubuntu, same on wsl

    


        async joinVideo(): Promise<boolean> {&#xA;        return new Promise((resolve, reject) => {&#xA;            signale.info(&#x27;Joining video&#x27;)&#xA;            const profile = path.join(__dirname, &#x27;../videos/input/profile.mp4&#x27;)&#xA;            const sb = path.join(__dirname, &#x27;../videos/input/sb.mp4&#x27;)&#xA;&#xA;            const joined = path.join(__dirname, &#x27;../videos/profile-sb.mp4&#x27;)&#xA;            const tempFolder = path.join(__dirname, &#x27;../videos/temp&#x27;)&#xA;&#xA;            ffmpeg({ source: profile })&#xA;                .input(sb)&#xA;                .on(&#x27;end&#x27;, () => {&#xA;                    signale.success(&#x27;Video joined&#x27;)&#xA;                    resolve(true)&#xA;                })&#xA;                .on(&#x27;error&#x27;, err => {&#xA;                    signale.error(err)&#xA;                    reject(false)&#xA;                })&#xA;                .mergeToFile(joined, tempFolder)&#xA;        })&#xA;    }&#xA;</boolean>

    &#xA;

    The error i get

    &#xA;

    Error: ffmpeg exited with code 1: Error reinitializing filters! &#xA;Failed to inject frame into filter network: Invalid argument&#xA;Error while processing the decoded data for stream #1:0&#xA;Conversion failed!&#xA;&#xA;    at ChildProcess.<anonymous> (/mnt/c/Users/Anri/Desktop/lead-gif-generator/node_modules/.pnpm/fluent-ffmpeg@2.1.2/node_modules/fluent-ffmpeg/lib/processor.js:182:22)&#xA;    at ChildProcess.emit (node:events:517:28)&#xA;    at ChildProcess.emit (node:domain:489:12)&#xA;    at Process.ChildProcess._handle.onexit (node:internal/child_process:292:12)&#xA;</anonymous>

    &#xA;

    the installation of fluent-ffmpeg should be correct as other operations are working, only mergeToFile function is erroring out

    &#xA;

    also strange thing is that if i put same file in both inputs it works fine, my guess it happens because of differance between videos, but why it works on windows

    &#xA;