[FFmpeg-user] How to concat two videos with same size but different source?

Bo Berglund bo.berglund at gmail.com
Sun Oct 9 20:53:21 EEST 2022


On Sun, 09 Oct 2022 16:53:22 +0900, Masaru Nomiya <nomiya at galaxy.dti.ne.jp>
wrote:

>Hello,
>
>In the Message; 
>
>  Subject    : Re: [FFmpeg-user] How to concat two videos with same size but different source?
>  Message-ID : <h6r4khlnpje19ckulils2uf2il90hdfptc at 4ax.com>
>  Date & Time: Sun, 09 Oct 2022 08:48:33 +0200
>
>[BB] == Bo Berglund <bo.berglund at gmail.com> has written:
>
>BB>  On Sun, 09 Oct 2022 07:03:31 +0900, Masaru Nomiya <nomiya at galaxy.dti.ne.jp>
>BB>  wrote:
>
>[...]
>BB>  $ file video.1.mp4
>BB>  video.1.mp4: ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]
>BB>  $ file video.2.mp4
>BB>  video.2.mp4: ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]
>
>BB>  They are just downloaded mp4 files retrieved using ffmpeg
>BB>  command.
>
>I have always used yt-dlp for video and music downloads and have never
>used ffmpeg.
>
>MN> >Please indicate these results as this is more accurate.
>
>MN> > 1. $ mp4info video1.mp4
>
>MN> > 2. $ mp4info video2.mp4
>
>BB>  I do not have this "mp4info" command on my Ubuntu server...
>BB>  And it does not exist in apt either...
>
>mp4info is included in the mp4v2 package.

Which is not available via apt on Ubuntu server...

>Anyway, this shold do it;
>
>$ ffprobe video.1.mp4
>
>and
>
>$ ffprobe video.2.mp4

Here you go:

$ ffprobe -hide_banner  video1.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:24:59.02, start: 0.000000, bitrate: 543 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480
[SAR 640:639 DAR 16:9], 406 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

$ ffprobe -hide_banner  video2.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 01:03:32.21, start: 0.000000, bitrate: 499 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480
[SAR 640:639 DAR 16:9], 362 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
(default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler


-- 
Bo Berglund
Developer in Sweden



More information about the ffmpeg-user mailing list