adjust default video codec param,using cfr,frame rate 20 and key frame interval 100
正在显示
2 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -66,7 +66,7 @@ cat 0.ts 1.ts 2.ts 3.ts 4.ts 5.ts 6.ts 7.ts 8.ts> m.ts ;linux | @@ -66,7 +66,7 @@ cat 0.ts 1.ts 2.ts 3.ts 4.ts 5.ts 6.ts 7.ts 8.ts> m.ts ;linux | ||
| 66 | ffmpeg -y -i m.ts -acodec copy -vcodec copy dest.ts | 66 | ffmpeg -y -i m.ts -acodec copy -vcodec copy dest.ts |
| 67 | 67 | ||
| 68 | 68 | ||
| 69 | -调用ffmpeg时,视频编码参数是: -vcodec libx264 -level 3.1 -preset veryfast -g 40 -r 20 | 69 | +调用ffmpeg时,视频编码参数是: -vcodec libx264 -level 3.1 -preset veryfast -g 100 -r 20 -bf 0 -vsync cfr |
| 70 | 音频编码参数是: -acodec copy | 70 | 音频编码参数是: -acodec copy |
| 71 | 如果要修改,windows下在merge_av.exe同目录下新建merge_av.cfg文本文件,第一行保存视频编码,第二行保存音频编码;linux 下,merge_av.cfg保存在HOME目录下的merge_av目录。 | 71 | 如果要修改,windows下在merge_av.exe同目录下新建merge_av.cfg文本文件,第一行保存视频编码,第二行保存音频编码;linux 下,merge_av.cfg保存在HOME目录下的merge_av目录。 |
| 72 | 72 |
| @@ -69,7 +69,7 @@ void get_config_path(){ | @@ -69,7 +69,7 @@ void get_config_path(){ | ||
| 69 | #endif | 69 | #endif |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | -const char * default_vcodec_param = "-vcodec libx264 -level 3.1 -preset veryfast -g 40 -r 20"; | 72 | +const char * default_vcodec_param = "-vcodec libx264 -level 3.1 -preset veryfast -g 100 -r 20 -bf 0 -vsync cfr"; |
| 73 | const char * default_acodec_param = "-acodec copy"; | 73 | const char * default_acodec_param = "-acodec copy"; |
| 74 | 74 | ||
| 75 | char vcodec_param[1024]; | 75 | char vcodec_param[1024]; |
| @@ -503,7 +503,7 @@ void load_codec_param() | @@ -503,7 +503,7 @@ void load_codec_param() | ||
| 503 | int main(int argc, char * argv[]) | 503 | int main(int argc, char * argv[]) |
| 504 | { | 504 | { |
| 505 | if (argc < 2) { | 505 | if (argc < 2) { |
| 506 | - printf(" merge_av 1.0.0\n"); | 506 | + printf(" merge_av 1.0.2\n"); |
| 507 | printf(" run ffmpeg to merge audio and video files according to the record info file,\nusage:"); | 507 | printf(" run ffmpeg to merge audio and video files according to the record info file,\nusage:"); |
| 508 | printf("\n %s record_info_filename [-p] [-k]", argv[0]); | 508 | printf("\n %s record_info_filename [-p] [-k]", argv[0]); |
| 509 | printf("\n -p :only print the command,don't run ffmpeg"); | 509 | printf("\n -p :only print the command,don't run ffmpeg"); |
-
请 注册 或 登录 后发表评论