ffmpeg is a fast video and audio converter that can also grab from a live audio/video source.
- -h show all options
- -h(elp) topic show help
- -version show version
- -formats show available formats
- -codecs show available codecs
- -decoders show available decoders
- -encoders show available encoders
- -protocols show available protocols
- -filters show available filters
- -pix_fmts show available pixel formats
- -sample_fmts show available audio sample formats
- -colors show available color names
ffmpeg -i input.mp4 -b 800k output.mp4
ffmpeg -f dshow -i video="Integrated Camera" out.mp4
ffmpeg -f dshow -framerate 30 -i video="XX" -r 10 output.mp4
Change container from mkv to mp4
ffmpeg -i file.mkv -acodec copy -vcodec copy file.mp4
ffmpeg -list_devices true -f dshow -i dummy
ffmpeg -f dshow -list_options true -i video="MiraBox Video Capture"
ffmpeg supports multiple outputs created out of the same input(s) in the same process. The usual way to accomplish this is:
ffmpeg -i input \
-s 1280x720 -acodec … -vcodec … output1 \
-s 640x480 -acodec … -vcodec … output2 \
-s 320x240 -acodec … -vcodec … output3
ffmpeg -i input.avi -vf scale="iw/1:ih/2" output.avi
ffmpeg "-re -i sunflowers.mp4 -f mpegts -codec:v mpeg1video -s 1280x720 -b:v 2500k -bf 0 pipe:1"
ffmpeg -i broken_file.avi -f mpegts -bf 0 video_fixed.mp4
ffmpeg -f vfwcap -framerate 25 -video_size 640x480 -i 0 -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000
ffplay udp://127.0.0.1:23000
ffmpeg -f vfwcap -framerate 25 -video_size 640x480 -i 0 -f mpegts -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 http://localhost:8081/stream
ffmpeg -f vfwcap -framerate 25 -video_size 640x480 -i 0 -f alsa -ar 44100 -c 2 -i hw:0 -f mpegts -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 -codec:a mp2 -b:a 128k -muxdelay 0.001 http://localhost:8081/stream
ffmpeg -stdin -f s16le -ar 48k -ac 2 -i pipe:0 -acodec pcm_u8 -ar 48000 -f aiff pipe:1
ffmpeg -f dshow -framerate 30 -video_size 800x600 -i video="MiraBox Video Capture" -vcodec libx264 -preset ultrafast -tune zerolatency -b:v 900k -f flv "rtmp://localhost/live/stream"
ffmpeg -f dshow -framerate 30 -video_size 800x600 -rtbufsize 702000k -i video="MiraBox Video Capture" -vcodec libx264 -preset ultrafast -tune zerolatency -b:v 900k -f flv "rtmp://localhost/live/stream"
ffmpeg -i -f dshow -vcodec -fmt_pix nv12 rawvideo -i pipe:0 -f mpegts -codec:v mpeg1video -s 896x504 -b:v 3500k -bf 0 pipe:1
ffmpeg -f flv -listen 1 -i rtmp://localhost:8889/live/app -c copy -f flv -listen 1 rtmp://localhost:1935/live/app
ffmpeg -pix_fmt nv12 -s 352x288 -i foreman_352x288.yuv -f mpegts -bf 0 video.mp4
mplayer -demuxer rawvideo -rawvideo w=352:h=288:format=nv12 file.yuv
ffplay -s 352x288 -pix_fmt nv12 file.yuv
ffmpeg -y -s 896x504 -f rawvideo -pix_fmt nv12 -i streamfile-video.mp4 streamfile.mp4
var ffmpeg = children.spawn('ffmpeg.exe' ...)
ffmpeg.stdin.write(message.binaryData);
ffmpeg -i source_video.avi -b 300 -s 320x240 -vcodec xvid -ab 32 -ar 24000 -acodec aac final_video.mp
ffmpeg -i input.mp4 -i subtitles.srt -c copy -c:s mov_text output.mp4