FFmpeg-最好用的视频处理软件,没有之一
FFmpeg 命令
目录
视频剪切
[[视频截取]]
D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-52-47-001.mp4
ffmpeg -i "D:\迅雷下载\大天蓬.HD1080高清国语中字版.mp4" -vcodec copy -acodec copy -ss 1:36:48 -to 1:40:14 cutout1.mp4 -y
ffmpeg -i "大天蓬 PR重制.mp4" -vcodec copy -acodec copy -ss 0:00:00 -to 0:03:36 cutout1.mp4 -y
视频去水印
[[视频处理]] ffmpeg -i cutout1.mp4 -ss 1:40:00 -to 1:40:14 -filter_complex "delogo=x=1365:y=30:w=600:h=50:show=1" delogo.mp4
ffmpeg -re -i "D:\python-project\mp4文件\Python anconada jupyter.mp4" -vcodec copy -acodec aac -b:a 192k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
推流&直播
[[直播]] ffmpeg -re -i "http://112.50.243.8/PLTV/88888888/224/3221225882/1.m3u8" -vcodec copy -acodec aac -b:a 192k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp" http://112.50.243.8/PLTV/88888888/224/3221225882/1.m3u8
ffmpeg -re -i "G:\分享资料\聊斋故事\白狐_超清.mp4" -vcodec copy -acodec aac -b:a 512k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
G:\分享资料\电影\Legend.of.the.Demon.Cat.2017.1080p.WEB-DL.AAC.H265-OurTV.mp4
ffmpeg -re -i "C:\Users\Administrator\Desktop\test\test.mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp" D:\python-project\mp4文件\test.mp4
ffmpeg -re -i "D:\python-project\mp4文件\test.mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -re -i "D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -re -i "D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4" -vcodec copy -acodec aac -b:a 191k -f -initial_offset 0:19:00 flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
fmpeg -t 10 -i D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4 -filter_complex “delogo=x=300:y=300:w=100:h=100” -c:v libx264 -crf 28 -preset veryfast -c:a copy -movflags +faststart output.mp4 -y
ffmpeg.exe -i "D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4" -vf "delogo=x=1:y=1:w=1020:h=38" -c:a copy "C:\Users\Administrator\Desktop\temp\ffmpeg\ffmpeg-20180605-b748772-win64-static\bin\1.mp4"
ffmpeg.exe -i "D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4" -vf "delogo=x=1:y=1:w=1020:h=38" -c:a copy "rtmp://al.direct.huya.com/huyalive/1199557335159-1199557335159-0-2399114793774-10057-A-1601886544-1?seq=1601886945406&type=simple"
ffmpeg -re -i "D:\迅雷下载\吸血鬼日记第一季\吸血鬼日记第一季01.mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://al.direct.huya.com/huyalive/1199557335159-1199557335159-0-2399114793774-10057-A-1601886544-1?seq=1601886945406&type=simple"
ffmpeg -re -i "https://v-replay.cdn.huya.com/vhuya/dot/11995573351591601996381.m3u8" -f -r 30 -video_size 1280x720 -i "0:0" -vcodec libx264 -preset ultrafast -acodec libmp3lame -ar 44100 -ac 1 -target pal-vcd "C:\Users\Administrator\Desktop\temp\2.mp4"
ffmpeg -re -i "https://v-replay.cdn.huya.com/vhuya/dot/11995573351591602004913.m3u8" -f h264 yuv420p -video_size 1920x1080 aac "C:\Users\Administrator\Desktop\temp\3.mp4"
ffmpeg -re -i "https://v-replay.cdn.huya.com/vhuya/dot/11995573351591601996381.m3u8" -f -r 30 -video_size 1280x720 -i "0:0" -vcodec libx264 -preset ultrafast -acodec libmp3lame -ar 44100 -ac 1 -target pal-vcd "C:\Users\Administrator\Desktop\temp\2.mp4"
ffmpeg -stream_loop -1 -re -i "D:\文档\2020.4\0415\月下泪 (《从前有座灵剑山》电视剧插曲).mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -stream_loop -1 -re -i "D:\文档\2020.4\0415\【僵】The Only One.mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
D:\文档\2020.4\0415\【僵】天地不容 02 .mp4
ffmpeg -stream_loop -1 -re -i "D:\文档\2020.4\0415\【僵】天地不容 02 .mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp ffmpeg -re -i "G:\分享资料\聊斋故事\白狐_超清.mp4" -vcodec copy -acodec aac -b:a 248k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -stream_loop -1 -re -i "D:\文档\2020.4\0415\月下泪 (《从前有座灵剑山》电视剧插曲).mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -stream_loop -1 -re -i "D:\迅雷下载\白发电视剧 高清\01.1080p.HD国语中字无水印[最新电影www.66e.cc].mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
D:\迅雷下载\白发电视剧 高清\01.1080p.HD国语中字无水印[最新电影www.66e.cc].mp4
ffmpeg -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -f concat -safe 0 -i "C:\Users\Administrator\Desktop\new 3.txt" -vsync vfr -pix_fmt yuv420p "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
ffmpeg -f concat -safe 0 -i "C:\Users\Administrator\Desktop\文件名.txt" -stream_loop -1 -i "D:\文档\2020.4\0415\电视剧《从前有座灵剑山》原声音乐专辑\二珂-月下泪.mp3" -vsync vfr -pix_fmt yuv420p "output.mp4"
ffmpeg -f concat -safe 0 -i "C:\Users\Administrator\Desktop\new.txt" -vsync vfr -pix_fmt yuv420p "output5.mp4"
ffmpeg -stream_loop -1 -re -i "D:\迅雷下载\白发电视剧 高清\02.1080p.HD国语中字无水印[最新电影www.66e.cc].mp4" -vcodec copy -acodec aac -b:a 191k -f flv "rtmp://live-push.bilivideo.com/live-bvc/?streamname=live_27425535_2844668&key=ba4f2c74c9ddd23858aa39862589ae83&schedule=rtmp"
视频合并
[[ffmpeg视频合并方法]]
使用命令 ffmpeg -f concat -safe 0 -i "D:\视频素材\默认声音\files.txt" -c copy "天刀华服录.mp4"
files.txt的处理 见 [[ffmpeg视频合并方法]]
视频 剪切
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-52-47-001.mp4" -vcodec copy -acodec copy -ss 0:00:49 -to 0:01:14 天刀本体360视角 202011132232.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-56-37-653.mp4" -vcodec copy -acodec copy -ss 0:00:57 -to 0:01:00 天刀浮光金翠衣金黄 202011132236.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-56-37-653.mp4" -vcodec copy -acodec copy -ss 0:01:08 -to 0:01:13 天刀浮光金翠衣金黄 202011132238.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-56-37-653.mp4" -vcodec copy -acodec copy -ss 0:02:11 -to 0:02:17 天刀浮光金翠衣竹青 202011132239.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 21-56-37-653.mp4" -vcodec copy -acodec copy -ss 0:02:44 -to 0:03:16 天刀浮光金翠衣玄夜 202011132241.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-01-22-645.mp4" -vcodec copy -acodec copy -ss 0:02:18 -to 0:03:03 天刀浮光生死契玄夜 极昼之华 202011132246.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-01-22-645.mp4" -vcodec copy -acodec copy -ss 0:03:22 -to 0:04:11 天刀心王红銮殿默认 极昼之华 202011132250.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-05-33-870.mp4" -vcodec copy -acodec copy -ss 0:00:00 -to 0:00:54 天刀心王红銮殿默认 极昼之华 202011132252.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-05-33-870.mp4" -vcodec copy -acodec copy -ss 0:01:36 -to 0:01:42 天刀心王红銮殿玄黄 极昼之华 202011132255.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-05-33-870.mp4" -vcodec copy -acodec copy -ss 0:01:50 -to 0:02:18 天刀心王红銮殿玄黄 极昼之华 202011132255.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-05-33-870.mp4" -vcodec copy -acodec copy -ss 0:02:28 -to 0:03:06 天刀心王红銮殿玄黄 极昼之华 战斗 202011132259.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:00:07 -to 0:00:25 天刀心王红銮殿金莹 极昼之华 202011132302.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:00:26 -to 0:00:53 天刀心王红銮殿金莹 极昼之华 202011132303.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:01:03 -to 0:01:08 天刀心王红銮殿瓷蓝 极昼之华 202011132308.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:01:24 -to 0:01:50 天刀心王红銮殿红烬 极昼之华 202011132308.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:02:22 -to 0:02:32 天刀心王红銮殿红烬 极昼之华 202011132314.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-08-55-855.mp4" -vcodec copy -acodec copy -ss 0:02:22 -to 0:02:51 天刀心王红銮殿瓷蓝 极昼之华 动作 202011132315.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:00:07 -to 0:00:10 天刀心王红銮殿瓷蓝 极昼之华 动作 202011132316.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:00:16 -to 0:00:21 天刀心王红銮殿雪恋 极昼之华 202011132320.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:00:25 -to 0:00:33 天刀心王红銮殿玄夜 极昼之华 202011132325.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:00:41 -to 0:01:04 天刀心王红銮殿竹青 极昼之华 202011132325.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:01:09 -to 0:01:36 天刀心王红銮殿紫陌 极昼之华 202011132328.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:01:47 -to 0:01:56 天刀心王红銮殿金莹 极昼之华 202011132329.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:02:03 -to 0:02:36 天刀心王红銮殿玄夜 极昼之华 202011132331.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:02:43 -to 0:02:46 天刀心王红銮殿瓷蓝 极昼之华 202011132331.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.mp4" -vcodec copy -acodec copy -ss 0:03:24 -to 0:03:32 天刀心王红銮殿黄绿 极昼之华 202011132333.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-15-26-236.mp4" -vcodec copy -acodec copy -ss 0:00:00 -to 0:00:22 天刀心王红銮殿黄绿 极昼之华 202011132336.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-15-26-236.mp4" -vcodec copy -acodec copy -ss 0:00:37 -to 0:00:51 天刀心王红銮殿海蓝 极昼之华 202011132337.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-15-26-236.mp4" -vcodec copy -acodec copy -ss 0:01:12 -to 0:01:20 圣绣碧落默认 202011132338.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-15-26-236.mp4" -vcodec copy -acodec copy -ss 0:01:12 -to 0:01:20 圣绣碧落默认 202011132338.mp4 -y
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-15-26-236.mp4" -vcodec copy -acodec copy -ss 0:01:53 -to 0:02:09 圣绣碧落默认 动作 202011132340.mp4 -y
[[视频剪切]]
注意事项
程序debug
双引号分隔
格式以ANSI格式编码
程序批处理
视频转码
ffmpeg -i "D:\Program Files (x86)\Bandicam\Capture\Sesame 2020-11-13 22-11-47-822.avi" -vcodec copy -acodec copy output.mp4 -y
flv2MP3
E:\livehime\3.9.0.1490\ffmpeg.exe -i "C:\Users\Administrator\Downloads\欧洲卡车模拟2音乐原声带 (P6. Euro Truck Simulator 2 - Music (6 Menu 3)).flv" -f mp3 -vn "E:\output.mp3"