├── .gitignore
├── FFmpegAudioAndVideoMerge.sln
├── FFmpegAudioAndVideoMerge
├── App.config
├── FFmpegAudioAndVideoMerge.csproj
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
└── files
│ ├── AudioAndVideoMerge.mp4
│ ├── AudioMerge.mp3
│ ├── music1.mp3
│ ├── music2.mp3
│ ├── music3.mp3
│ ├── music4.mp3
│ ├── video1.mp4
│ ├── video2.mp4
│ ├── video3.mp4
│ └── video4.mp4
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31112.23
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFmpegAudioAndVideoMerge", "FFmpegAudioAndVideoMerge\FFmpegAudioAndVideoMerge.csproj", "{9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D6BECE27-F188-4834-8106-9121628CE3E2}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/FFmpegAudioAndVideoMerge.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9D9624DA-9FDB-4A9A-9498-E4A7E3448CF7}
8 | Exe
9 | FFmpegAudioAndVideoMerge
10 | FFmpegAudioAndVideoMerge
11 | v4.8
12 | 512
13 | true
14 | true
15 |
16 |
17 |
18 | AnyCPU
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace FFmpegAudioAndVideoMerge
9 | {
10 | class Program
11 | {
12 | /**
13 | * ffmpeg相关命令说明
14 | * -ss表示搜索到指定的时间 -i表示输入的文件 -y表示覆盖输出 -f表示强制使用的格式
15 | * ffmpeg.exe 安装包 https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip (74MB)
16 | */
17 |
18 |
19 | static void Main(string[] args)
20 | {
21 | var physicalPath = "E:\\FFmpegAudioAndVideoMerge\\FFmpegAudioAndVideoMerge\\files\\";
22 |
23 | //视频合并
24 | VideoCombine(physicalPath + "video1.mp4", physicalPath + "video2.mp4", physicalPath + "merageVideoyy.mp4");
25 |
26 | //音频合并
27 | var audioMergeList = new List();
28 | audioMergeList.Add(physicalPath + "music1.mp3");
29 | audioMergeList.Add(physicalPath + "music2.mp3");
30 | audioMergeList.Add(physicalPath + "music3.mp3");
31 | AudioMerge(physicalPath, audioMergeList);
32 |
33 | //音频与视频合并成视频
34 | AudioAndVideoMerge(physicalPath);
35 | }
36 |
37 | #region 视频合并
38 | ///
39 | /// 视频合并
40 | ///
41 | /// 合并视频1
42 | /// 合并视频2
43 | /// 保存文件名
44 | ///
45 | public static void VideoCombine(string video1, string video2, string saveFilePath)
46 | {
47 | string strTmp1 = video1 + ".ts";
48 | string strTmp2 = video2 + ".ts";
49 | string strCmd1 = " -i " + video1 + " -c copy -bsf:v h264_mp4toannexb -f mpegts " + strTmp1 + " -y ";
50 | string strCmd2 = " -i " + video2 + " -c copy -bsf:v h264_mp4toannexb -f mpegts " + strTmp2 + " -y ";
51 |
52 | string videoMerge = " -i \"concat:" + strTmp1 + "|" +
53 | strTmp2 + "\" -c copy -bsf:a aac_adtstoasc -movflags +faststart " + saveFilePath + " -y ";
54 |
55 | //1、转换文件类型,由于不是所有类型的视频文件都支持直接合并,需要先转换格式
56 | CommandManager(strCmd1);
57 | CommandManager(strCmd2);
58 |
59 | //2、视频合并
60 | CommandManager(videoMerge);
61 | }
62 | #endregion
63 |
64 | #region 音频合并
65 | ///
66 | /// 音频合并
67 | ///
68 | public static void AudioMerge(string physicalPath, List mergeFile)
69 | {
70 | //将多个音频混合成一个音频文件输出 http://www.ffmpeg.org/ffmpeg-all.html#amix
71 |
72 | //ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
73 |
74 | //合并两个音频
75 | //ffmpeg -i input1.mp3 -i input2.mp3 -filter_complex amerge -ac 2 - c:a libmp3lame -q:a 4 output.mp3
76 |
77 | //获取视频中的音频
78 | //ffmpeg -i input.mp4 -vn -y -acodec copy output.m4a
79 |
80 | //去掉视频中的音频
81 | //ffmpeg -i input.mp4 -an output.mp4
82 |
83 | // https://www.cnblogs.com/simadi/p/10649345.html
84 | // ffmpeg -i "concat:123.mp3|124.mp3" -acodec copy output.mp3
85 | // 解释:-i代表输入参数
86 | // contact: 123.mp3 | 124.mp3代表着需要连接到一起的音频文件 -acodec copy output.mp3 重新编码并复制到新文件中
87 |
88 | string mergeCommandStr = $"-i \"concat:{string.Join("|", mergeFile.ToArray())}\" -acodec copy {physicalPath}AudioMerge.mp3 -y";
89 | CommandManager(mergeCommandStr);
90 | }
91 | #endregion
92 |
93 | #region 音频与视频合并成视频
94 | ///
95 | /// 音频与视频合并成视频
96 | ///
97 | /// 物理路径
98 | public static void AudioAndVideoMerge(string physicalPath)
99 | {
100 | //1、视频文件中没有音频。
101 | //ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output.mp4
102 | //string mergeCommandStr = $"-i {physicalPath}video2.mp4 -i {physicalPath}music1.mp3 -c:v copy -c:a aac -strict experimental {physicalPath}output.mp4 -y";
103 |
104 | //video.mp4,audio.wav分别是要合并的视频和音频,output.mp4是合并后输出的音视频文件。
105 | //2、下面的命令是用audio音频替换video中的音频 ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a: 0 output.mp4
106 | string mergeCommandStr = $"-i {physicalPath}video3.mp4 -i {physicalPath}AudioMerge.mp3 -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 {physicalPath}AudioAndVideoMerge.mp4 -y";
107 |
108 | //3、c++音频视频合并(视频文件中没有音频的情况下)
109 | //"ffmpeg -i /tmp/mergeMp3/392118469203595327/392118469203595327.aac -i /tmp/mergeMp3/392118469203595327/bg.mp4 -c copy -bsf:a aac_adtstoasc /tmp/mergeMp3/392118469203595327/392118469203595327.mp4 -y"
110 | //string mergeCommandStr3 = $"-i {physicalPath}video5.mp4 -i {physicalPath}AudioMerge.mp3 -c copy -bsf:a aac_adtstoasc {physicalPath}AudioAndVideoMerge1.mp4 -y";
111 |
112 | CommandManager(mergeCommandStr);
113 | }
114 | #endregion
115 |
116 |
117 | ///
118 | /// 执行
119 | /// C# Process进程调用 https://docs.microsoft.com/zh-cn/dotnet/api/system.diagnostics.process?view=net-5.0
120 | ///
121 | /// 执行命令
122 | public static void CommandManager(string commandStr)
123 | {
124 | try
125 | {
126 | using (Process process = new Process())
127 | {
128 | process.StartInfo.FileName = "D:\\FFmpeg\\bin\\ffmpeg.exe";//要执行的程序名称(属性,获取或设置要启动的应用程序或文档。FileName 属性不需要表示可执行文件。 它可以是其扩展名已经与系统上安装的应用程序关联的任何文件类型。)
129 | process.StartInfo.Arguments = " " + commandStr;//启动该进程时传递的命令行参数
130 | process.StartInfo.UseShellExecute = false;
131 | process.StartInfo.RedirectStandardInput = false;//可能接受来自调用程序的输入信息
132 | process.StartInfo.RedirectStandardOutput = false;//由调用程序获取输出信息
133 | process.StartInfo.RedirectStandardError = false;//重定向标准错误输出
134 | process.StartInfo.CreateNoWindow = false;//不显示程序窗口
135 | process.Start();//启动程序
136 | process.WaitForExit();//等待程序执行完退出进程(避免进程占用文件或者是合成文件还未生成)*
137 | }
138 | }
139 | catch (Exception e)
140 | {
141 | Console.WriteLine(e.Message);
142 | }
143 | }
144 |
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("FFmpegAudioAndVideoMerge")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FFmpegAudioAndVideoMerge")]
13 | [assembly: AssemblyCopyright("Copyright © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("9d9624da-9fdb-4a9a-9498-e4a7e3448cf7")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
33 | //通过使用 "*",如下所示:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/AudioAndVideoMerge.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/AudioAndVideoMerge.mp4
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/AudioMerge.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/AudioMerge.mp3
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/music1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/music1.mp3
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/music2.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/music2.mp3
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/music3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/music3.mp3
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/music4.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/music4.mp3
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/video1.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/video1.mp4
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/video2.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/video2.mp4
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/video3.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/video3.mp4
--------------------------------------------------------------------------------
/FFmpegAudioAndVideoMerge/files/video4.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YSGStudyHards/FFmpegAudioAndVideoMerge/742ede1f62fa1b2617a046d293b1acae08a8e069/FFmpegAudioAndVideoMerge/files/video4.mp4
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 概述
2 | C#进程调用FFmpeg操作音视频。
3 |
4 | ## FFmpeg介绍
5 | FFmpeg是一个开源、功能强大、跨平台、灵活且广泛应用的多媒体处理工具,可用于录制、转换和流式传输音频和视频。它提供了一组强大的工具和库,可以处理各种多媒体格式,包括视频(如MPEG、AVI、WMV、MOV等)和音频(如MP3、WAV、AAC等),以及图像文件。
6 | 以下是FFmpeg的一些主要功能和特点:
7 | 1. **多媒体格式支持:** FFmpeg支持几乎所有流行的音频和视频格式,包括常见的MP4、AVI、FLV、MOV、WMV、MP3、AAC等,以及一些较为特殊的格式。
8 | 2. **多功能工具:** FFmpeg提供了许多用于处理音频、视频和图像的命令行工具,如ffmpeg(用于转码和处理视频)、ffplay(用于播放视频)、ffprobe(用于检查多媒体文件信息)等。
9 | 3. **音视频处理:** FFmpeg可以执行各种音视频处理任务,包括转码(将一个编码格式的多媒体文件转换为另一个编码格式)、剪切、合并、提取音频或视频流、添加字幕、调整大小和比特率等。
10 | 4. **实时流处理:** FFmpeg支持实时流媒体处理,可以将音频和视频流推送到流媒体服务器,也可以从流媒体服务器接收流数据。
11 | 5. **多平台支持:** FFmpeg可在多种操作系统上运行,包括Linux、macOS和Windows。
12 | 6. **开源和免费:** FFmpeg是开源软件,基于LGPL(Lesser General Public License)许可证发布,可以免费使用和修改。
13 |
14 | ## FFmpeg相关教程
15 | * [FFmpeg官网文档](https://ffmpeg.org/)
16 | * [FFmpeg最全教程](https://cloud.tencent.com/developer/article/1773248)
17 | * [FFmpeg 视频处理入门教程](https://ruanyifeng.com/blog/2020/01/ffmpeg.html)
18 | * [FFmpeg百度百科介绍](https://baike.baidu.com/item/ffmpeg/2665727)
19 | * [C#进程调用FFmpeg操作音视频](https://www.cnblogs.com/Can-daydayup/p/15780172.html)
20 | * [FFMPEG命令入门到提高,一篇文章就够了](https://zhuanlan.zhihu.com/p/117523405)
21 |
--------------------------------------------------------------------------------