使用concat的视频png覆盖问题

时间:2020-01-17 22:22:36

标签: ffmpeg mp4

我可以要求帮助了解为什么png徽标仅出现在concat结果的第一个视频中吗?

谢谢!

ffmpeg -f concat -safe 0 -y -i list.txt -i ../logo/logo.png -c:a copy -c:v libx264 -x264opts keyint=$50:min-keyint=$50:no-scenecut -bf 0 -r $25 -b:v 4800k -maxrate 9600k -bufsize 19200k -profile:v main -crf 22 -filter_complex "[0:v][1:v]overlay=main_w-overlay_w-10:10,scale=1920:1080,setsar=1" -t 370 1080set.mp4 

2 个答案:

答案 0 :(得分:0)

我怀疑第二个以及可能还有更多输入的视频流具有不同的属性,因此筛选图将重新初始化,并且在这一点上,由于尚未循环图像,因此没有要覆盖的图像帧。

因此,循环播放图像,

ffmpeg -f concat -safe 0 -y -i list.txt -loop 1 -i ../logo/logo.png -c:a copy -c:v libx264 -x264opts keyint=$50:min-keyint=$50:no-scenecut -bf 0 -r $25 -b:v 4800k -maxrate 9600k -bufsize 19200k -profile:v main -crf 22 -filter_complex "[0:v][1:v]overlay=main_w-overlay_w-10:10,scale=1920:1080,setsar=1" -t 370 1080set.mp4

答案 1 :(得分:0)

Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2007-05-09T07:55:25.000000Z
  Duration: 00:01:29.22, start: 0.000000, bitrate: 7490 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x816, 7403 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2007-05-09T07:55:25.000000Z
      handler_name    : GPAC ISO Video Handler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 2007-05-09T07:55:29.000000Z
      handler_name    : GPAC ISO Audio Handler



Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1
    creation_time   : 2007-07-17T09:18:37.000000Z
    genre           : Trailer
    artist          : Fox
    title           : The Simpsons Movie
    date            : 2007
  Duration: 00:02:17.25, start: 0.000000, bitrate: 8591 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x800, 8486 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2007-07-17T09:18:37.000000Z
      handler_name    : GPAC ISO Video Handler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, 5.1, fltp, 107 kb/s (default)
    Metadata:
      creation_time   : 2007-07-17T09:18:45.000000Z
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 101x150 [SAR 72:72 DAR 101:150], 90k tbr, 90k tbn, 90k tbc (attached pic)