4 Eylül 2018 Salı

HOW TO FFMPEG

*open cmd and go /ffmpeg/bin


1)video information //ffmpeg -i video.mp4
2)convert video //ffmpeg -i video.mp4 video.avi 
3)if you want preserve quality : 
ffmpeg -i video.mp4 -qscale 0 video.avi
4) if you want to see supported formats 
// ffmpeg -formats
5)change resolution // 
ffmpeg -i input.mp4 -s 1280x720 -c:a copy output.mp4
6)compres audio files 
//ffmpeg -i input.mp3 -ab 128 output.mp3
7) Removing audio stream from a media file
ffmpeg -i a.mp4 -an no_voice.mp4
8)Removing from video from media file 
ffmpeg -i a.mp4 -vn no_video.mp4
9)extracting image from video file 
ffmpeg -i a.mp4 -r 1 -f image2 image-%2d.png
10) crop video
ffmpeg -i a.mp4 -croptop 100 -cropbottom 100
 -cropleft 300 -cropright 300 cropvideo.mp4
11)specific crop (minute/second)
ffmpeg -i a.mp4  -t 50 specific_crop.mp4  
(first 50 seconds)
12) set aspect ratio to video
ffmpeg -i a.mp4 -aspect 16:9 aspect.mp4
13)view video 
ffplay a.mp4
14)change speed video 
ffmpeg -i inputvideo.mp4 
-vf "setpts=0.5*PTS" outputvideo.mp4
Share: