Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: How do I concatenate videos, adding a gap between each, using ffmpeg?

  1. #11
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,336
    Distro
    Ubuntu

    Re: How do I concatenate videos, adding a gap between each, using ffmpeg?

    Quote Originally Posted by qyot27 View Post
    I'd probably re-encode…
    Thank you for that detailed response! Rebuilding apps is rather more than I feel capable of doing, so I shan't go down that route.

    TheFu also mentioned re-encoding; I think that ffmpeg can do that anyway, can't it? That's something that I might look at when I have a some time, because I don't fully understand how to use ffmpeg (my skills level is novice).

    Regarding the playback, the final product is intended to be played not only on a Linux system but also on a Windows system and an Android system, so it would have to work natively in them.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  2. #12
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    575
    Distro
    Ubuntu Budgie

    Re: How do I concatenate videos, adding a gap between each, using ffmpeg?

    Yes, FFmpeg can do re-encodes. The small primer there on AviSynth was mainly because that's one way you can ensure that everything looks correct before giving it to FFmpeg, because as far as FFmpeg knows, it's only getting one file, not several.

    But either way, the way you would go about encoding afterward is the same, whether you use a concat list file or an AviSynth script:
    Code:
    ffmpeg -f concat -safe 0 -i video.list -vcodec libx264 -crf 18 -acodec aac -b:a 192k 'Concatenated.mp4'
    or
    Code:
    ffmpeg -i video.avs -vcodec libx264 -crf 18 -acodec aac -b:a 192k 'Concatenated.mp4'
    Encoding parameters get listed after the input. vcodec (or c:v) selects the video codec (in this case, libx264, since H.264 is by far the most commonly supported video format these days), crf is the video quality control targeting a rough perceptual quality rather than a specific bitrate* (18 being a fairly middle of the road setting for anything ~720p or under), acodec (or c:a) selects the audio codec (aac, since that is typically what gets paired with H.264), and b:a sets the audio bitrate.

    *if it has to be played back on dedicated hardware rather than a software player, you may need to switch to using a specific bitrate instead, but I would try with crf mode first.

  3. #13
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,336
    Distro
    Ubuntu

    Re: How do I concatenate videos, adding a gap between each, using ffmpeg?

    Quote Originally Posted by qyot27 View Post
    Yes, FFmpeg can do re-encodes…
    Thank you! I have made a note of all that, and I'll give it a try when I have some time.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •