Documente Academic
Documente Profesional
Documente Cultură
https://www.youtube.com/playlist?list=PLcT6A4N2CRF4Wo_jn-_DDdVX1R--TE0rV
cach join file:
voi file mp4 chuyen het ve .ts roi dung cau lenh sau: ffmpeg -i
"concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
EQ audio:
equalizer=f=32:width_type=o:width=1:g=3,
equalizer=f=64:width_type=o:width=1:g=6,
equalizer=f=125:width_type=o:width=1:g=9,
equalizer=f=250:width_type=o:width=1:g=8,
equalizer=f=500:width_type=o:width=1:g=6,
equalizer=f=1000:width_type=o:width=1:g=5,
equalizer=f=2000:width_type=o:width=1:g=7,
equalizer=f=4000:width_type=o:width=1:g=9,
equalizer=f=8000:width_type=o:width=1:g=11,
equalizer=f=16000:width_type=o:width=1:g=8
//nguyen ly cai padd co size lon hon video. vi du: video nay scale lai la 720x480
co padding moi canh la 10 => video se phai scale lai 720-20 va 480-20 => la 700:460
ffmpeg -y -i a.mp4 -vf scale=700:460,pad=720:480:10:10:color=green out.mkv
extract subtitle
ffmpeg -i eye.mkv -an -vn -c:s:1 srct sub.srt
extract image:
ffmpeg -i bg.mp4 -t 05 -r 1 -f image2 bgs/image-%3d.png
In this example each image will have a duration of 5 seconds (the inverse of 1/5
frames per second). The video stream will have a frame rate of 30 fps by
duplicating the frames accordingly:
ffmpeg -framerate 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4
https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
extract audio:
./ffmpeg -i dog1.mp4 -a:c copy -v:c copy -vn dog.mp3
./ffmpeg -i out.mp4 -vn eye.mp3
(-vn is no video)
remove audio:
./ffmpeg -i out_split.mp4 -c copy -an mtp_video_no_sound.mp4
rotate video:
ffmpeg -i in.mp4 -vf "rotate=PI/2" out.mp4
ffmpeg.exe -i 001.mp4 -vf "rotate=-PI/60" -t 00:00:30 out.mp4
crop video:
./ffmpeg -i a.mp4 -strict -2 -filter:v "crop=1280:720:20:20" out.mp4
http://video.stackexchange.com/questions/4563/how-can-i-crop-a-video-with-ffmpeg
//zoom video
ffmpeg -i 001.mp4 -vf scale=2*iw:-1 output_1028_001.mp4
scale video:
ffmpeg -i 001.mp4 -vf scale=1280:-1 output_1028_001.mp4
https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg
zoom video and crop: e.g. to zoom in with a factor of 2, assuming an input video of
1280×720 pixels:
ffmpeg -i input.mp4 -vf "scale=2*iw:-1, crop=iw/2:ih/2" output.mp4
//noi 2 file
ffmpeg -i concat:"001.ts|002.ts|003.ts|004.ts" -c copy output.ts
voi mp4 phai chuyen ve ts
ffmpeg -i BMH1_01.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts BMH1_01.ts
ffmpeg -i BMH1_02.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts BMH1_02.ts
ffmpeg -i "concat:BMH1_01.ts|BMH1_02.ts" -c copy -bsf:a aac_adtstoasc
BAN_MUON_HEN_HO_14062015.ts
./ffmpeg -loop 1 -i img.png -r 25 -vframes 2500 -an -vcodec libx264 -b 1500k -vf
"movie=a0.mp4 [logo]; [in][logo] overlay=0:0 [out]" -s 800x464 -y output.mp4
==>tang bitrate
./ffmpeg -i eng.mp3 -ab 320 outputfile.mp3
./ffmpeg -ss 00:00:45 -i stmpt.mp4 -t 00:04:50 -c:v libx264 -c:a aac -strict
experimental -b:a 128k out_upload.mp4
./ffmpeg -i out_split.mp4 -af "highpass=f=100, lowpass=f=1000" out_split_1.mp4
//nen hinh
./ffmpeg -i output_mix.mp4 -c:v libx264 -strict -2 -crf 45 -b:v 1M -c:a aac
output_compress.mp4
change pitch:
./ffmpeg -i out_split_add_frame.pm3 -f:a atempo=1.25 out.mp3
./ffmpeg -i output_compress.mp4 -strict -2 -filter:a "atempo=1.25,atempo=1.25"
out_ok.mp4
scale:
ffmpeg -loop 1 -i bg.png -i Input-001.mkv -filter_complex "[0:v]scale=1280:-2[bg];
[1:v]scale=645:-1,setpts=PTS-STARTPTS[fg1]; [bg][fg1]overlay=324:83:shortest=1"
output2mkv
ffmpeg -i
"http://htqjrpsv.cdnviet.com/htjzzsg/_definst_/htv7.720p.stream/playlist.m3u8?
t=1bc15bdab7daf1070be66401f49df8df&e=1433210696" -strict -2 -t 00:05:00
"C:\ffmpeg\bin\rs\htv_01062015.mp4"
metadata
./ffmpeg -i Tom_And_Jerry_Diary_update.mp4 -metadata title="Tom & Jerry channel"
-metadata encoder="h264" -metadata artist="Tom & Jerry" -metadata album="Tom &
Jerry" Tom_And_Jerry_Diary.mp4
extract image:
./ffmpeg -i Tom_And_Jerry_Diary.mp4 -r 1 -f image2 image-%3d.jpeg
-r This is used to set the frame rate of video. i.e. no. of frames to be extracted
into images per second. The default value is 25, using which, would have yielded a
large number of images.
-f This option defines the format we want to force/use, although removing this
option shouldn't cause any problem.
image-%3d.jpeg By %3d, we mean that we want the naming of the image files to be of
the format "image-001.jpeg, image-002.jpeg.." and so on. If we had used image-%2d
the names would have been image-01.jpeg, image-02.jpeg. You can use any format as
per your choice.
Delogo
ffmpeg -i 2.mp4 -vf delogo=x=0:y=1000:w=100:h=50:band=10 out.mp4
Stereo:
https://trac.ffmpeg.org/wiki/AudioChannelManipulation
lach full:
ffmpeg -y -i a.mp4 -filter_complex "[0:v]scale=800:-1[v1];[0:v]scale=800:-
1,boxblur=10:6,format=yuva420p,colorchannelmixer=aa=0.15[v2];[a]pan=stereo|
c0<c0+0*c1|c1<c0+0*c1,aeval=val(0)|-val(1)[audio];[v1][v2]overlay=0:0[video]"
-vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 2500k -acodec libmp3lame -b:a
128k -ar 44100 -preset ultrafast -map [video] -map [audio] out.mkv
//(main_w-overlay_w)/2:(main_h-overlay_h)-10
ffmpeg -y -loop 1 -i bgs/image-%3d.png -i one_pice.mp4 -r 29.97 -ab 128k -ar 48k
-ac 2 -filter_complex "[0:v] scale=1280:720[v0];
[1:v]setpts=PTS/1.15,scale=896:504[v2];
[1:a]atempo=1.15,aecho=0.8:0.88:6:0.4,pan=1c|c0=0.9*c0+0.1*c1[audio];[v0]
[v2]overlay=10:(main_h-overlay_h)-10:shortest=1[video]" -map "[video]" -map
"[audio]" -b:v 1000k -t 00:14:00 -preset ultrafast out.mkv
ffmpeg -i 000001.mp4 -vf scale=1280:720,setdar=16:9 -r 29.97 -b:v 44100K -ab 128k
-ar 44100 -ac 2 out.avi
//nối 2 file hình vào đầu và đuôi của videoffmpeg -i "OSSSO Fusion Musical
Experience - The Concert on July 14, Russia!.mp4" -r 24 -b:v 4000k -vf
scale=1920:1080 -threads 3 -t 01:23:05 out1.avi
ffmpeg -y -loop 1 -i 1.jpg -i audio.mp3 -r 24 -b:v 4000k -t 00:00:05 1.avi
ffmpeg -y -loop 1 -i 2.jpg audio.mp3 -r 24 -b:v 4000k -t 00:00:05 2.avi
ffmpeg -f concat -i mylist.txt -c:v copy c:a copy final.avi
* Meta title:
ffmpeg.exe -y -i wmyb.mp4 -vf "scale=858:480,eq=gamma_r=6:gamma_g=8:gamma_b=10"
-metadata title="" -metadata artist="" -metadata album_artist="" -metadata album=""
-metadata date="" -metadata track="" -metadata genre="" -metadata publisher=""
-metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata
performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata
TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -an -preset
ultrafast out_rbg6810.mkv