1. 分别下载1080p以上的高清视频及其音频
2.安装ffmpeg
3.muxing
ffmpeg -i input_video.mp4 -i input_audio.mp4 -c copy -map 0:v:0 -map 1:a:0 -shortest output.mp4
-map 0:v:0
can be translated as: from the first input (0
), select video stream type (v
), first video stream (0
)-map 1:a:0
can be translated as: from the second input (1
), select audio stream type (a
), first audio stream (0
)
- With
-c copy
the streams will be stream copied, not re-encoded, so there will be no quality loss. If you want to re-encode, see FFmpeg Wiki: H.264 Encoding Guide. - The
-shortest
option will cause the output duration to match the duration of the shortest input stream. - See the
-map
option documentation for more info.
利用ffmpeg合并(mux)已下载的youtube高清视频与音频文件