A couple of things to note for the examples below:
- your_video_file.mp4 refers to the file name of your video, so change this appropriately.
- Each method will create a file called output_video.mp4. You can change this file name to whatever you like.
Encode video with H.264
This command will create a new video file from your existing media using the H.264 codec.
ffmpeg -i your_video_file.mp4 -c:v libx264 output_video.mp4
Encode video with compression
This command will give you good compression without any noticeable loss in picture quality.
ffmpeg -i your_video_file.mp4 -c:v libx264 -crf 27 output_video.mp4
Encode video with high quality
This command will sacrifice compression in order to produce the best picture quality.
ffmpeg -i your_video_file.mp4 -c:v libx264 -crf 18 -preset veryslow output_video.mp4
Need some help with online video delivery, storage and processing? Get in touch with us using the button below and we'll be happy to help you out.