胡斌

add windows version merge_pip.exe v1.0.0

  1 +读入两个录像文件,合成画中画视频。合成的流程:
  2 +1. 读入recordfile1.txt,合成为音视频对齐的ts,生成record1_out.txt
  3 +2. 读入recordfile2.txt,合成为音视频对齐的ts,生成record2_out.txt
  4 +3. 读入record1_out.txt和record2_out.txt,生成 record1_record2.txt
  5 +例如:
  6 +命令:merge_pip uid_4165000_20180203013327202.txt uid_811375464_20180203013322272.txt
  7 +
  8 +其中,uid_4165000_20180203013327202.txt 内容如下:
  9 +0.000 4165000_20180203013327202.aac create
  10 +0.410 4165000_20180203013327612.webm create
  11 +0.411 4165000_20180203013327612.webm info width=320 height=240 rotation=0
  12 +1418.961 4165000_20180203013327612.webm close
  13 +1433.849 4165000_20180203013327202.aac close
  14 +
  15 +
  16 +其中,uid_811375464_20180203013322272.txt 内容如下:
  17 +0.000 811375464_20180203013322272.aac create
  18 +1.154 811375464_20180203013323424.webm create
  19 +1.155 811375464_20180203013323424.webm info width=320 height=240 rotation=0
  20 +1520.126 811375464_20180203013323424.webm close
  21 +1535.109 811375464_20180203013322272.aac close
  22 +
  23 +
  24 +生成 uid_811375464_20180203013322272__uid_4165000_20180203013327202.txt,
  25 +uid_811375464_20180203013322272__uid_4165000_20180203013327202.txt内容如下:
  26 +0.000 1535.290 pip_811375464_20180203013322272.ts
  27 +
  28 +配置文件,merge_pip.cfg:
  29 +如果要修改,windows下在merge_pip.exe同目录下新建merge_pip.cfg文本文件,第一行保存视频编码,第二行保存音频编码;linux 下,merge_pip.cfg保存在HOME目录下的merge_av目录。
  30 +
  31 +第一行,音视频合并时缺省视频编码参数,缺省值为:-vcodec libx264 -level 3.1 -preset veryfast -g 100 -r 20 -bf 0 -vsync cfr
  32 +第一行,音视频合并时缺省音频编码参数,缺省值为:-acodec copy
  33 +第三行,合并画中画时的音视频编码参数,缺省值为:-acodec aac -vcodec libx264 -level 3.1 -preset veryfast -g 100 -r 20 -bf 0 -vsync cfr
  34 +第四行,合并画中画时音视频合并filter参数,缺省值为:-filter_complex "[1:v]scale=w=96:h=72:force_original_aspect_ratio=decrease[b];[0:v][b]overlay=x=0:y=0" -filter_complex amix=inputs=2:duration=first:dropout_transition=2,volume=1
  35 +
  36 +
  37 +
不能预览此文件类型