[FFmpeg HEVC] Ffmpeg HEVC to H.264 MP4, FFmpeg HEVC Encoding, etc.
FFmpeg is a free command-line utility which is powerful in different video-related tasks. As FFmpeg has added libx265 and HEVC decoder for years, FFmpeg is very useful to handle HEVC videos for different purposes. In this post, we will show you how to use FFmpeg to convert HEVC H.265 to H.264 MP4, AVI, MOV, or other encoders, how to apply FFmpeg HEVC decoder, enable FFmpeg HEVC Nvenc or videotoolbox, and more.
Free HEVC Video Converter Far Easier than FFmpeg
FFmpeg command lines are complicated and beginners can make mistakes easily. To avoid the daunting learning curve, try a free and easier HEVC video converter – WinX Video Converter. It will convert HEVC H.265 to H.264 MP4, MOV, AVI, MKV, WMV, FLV, any formats or iPhone, iPad, Android, TV, 420+ devices. It will also convert videos from other formats into HEVC x265. Intel QSV and Nvidia CUDA/NVENC GPU acceleration is also supported for fast H.265/H.264 decoding & encoding.
Decode/Encode HEVC using FFmpeg
Download & Install FFmpeg
First of all, go to its official site and download FFmpeg for free. There are many green buttons on its website that may make you confused. Now open the site http://ffmpeg.org/, click the green Download button. There are versions for Linux, macOS, and Windows. Hover the mouse cursor over the version you need and click the link below it. Simple select and download the latest FFmpeg build.
The downloaded FFmpeg is an archive file. Within the archive, enter the bin folder and find FFmpeg.exe. Extract the FFmpeg.exe file and save it to another location where you remember. Of course, you can save it to somewhere important and link it using Path variable. It's optional. Anyway, you need to make sure that it's in the same folder where the HEVC videos (or other videos you want to convert to HEVC) you want to convert with FFmpeg are.
Open FFmpeg Command Window
To bring up FFmpeg, open the folder where FFmpeg and HEVC videos are. Hold down the shift key and right click the empty space. Then click Open command window here. Then the FFmpeg command window will open and now we can start to use FFmpeg to convert H.265 to h.264, mp4, any other formats.
Start FFmpeg HEVC to H.264, MP4, etc.
Now you can input the correct command line behind the cursor. Hit Enter and FFmpeg will convert the HEVC videos for you.
Basic syntax for FFmpeg HEVC to MP4:
ffmpeg -i DJI_0227.mov output.mp4
This is the simplest example of an FFmpeg HEVC command line. Let's make clear the command line to help you do more HEVC video conversion with FFmpeg. ffmpeg - It is a command that tell cmd to open FFmpeg. -i DJI_0227.mov - It's the name of the input file. It means you're asking FFmpeg to find the HEVC video. output.mp4 - It's the name of the output file. It means you're asking FFmpeg to convert HEVC to an MP4 video. To set an output codec, like FFmpeg H.265 to H.264, you simply need to add the -c flag.
To do some basic FFmpeg HEVC tasks, you simply need to different command lines. For example:
- ffmpeg H.265 to h.264 - ffmpeg -i DJI_0227.mov c:v libx264 output.mp4
- ffmpeg H.265 to AVI - ffmpeg -i DJI_0227.mov output.avi
- ffmpeg H.265 to MKV - ffmpeg -i DJI_0227.mov output.mkv
- ffmpeg makes HEVC videos - ffmpeg -i input name -c:v libx265 output.mp4
Advaced syntax for FFmpeg HEVC:
It is as simple as that. FFmpeg can do more than that. You can enable FFmpeg HEVC Nvenc or videotoolbox for faster GPU encoding. You can also set the video quality, exact bitrates, CRF, two-pass encoding or lossless encoding, etc. for FFmpeg H.265 convresion. More than that, there is a whole bunch of different filters to let you trim, crop, rotate, and more. There are many examples on FFmpeg website and various forums. Below we share some most common command lines related to FFmpeg HEVC video tasks.
- Convert videos to HEVC HVC1 : ffmpeg -i input -c:v libx265 -crf 28 -tag:v hvc1 -preset slow -c:a copy output.hvc1.mp4
- Enable GPU acceleration: ffmpeg -vcodec hevc_videotoolbox -b:v 6000k -tag:v hvc1 -c:a eac3 -b:a 224k -i <source> <target>
- Set FFmpeg HEVC to MP4 quality: ffmpeg -i input -c:v libx265 -crf 26 -preset fast -c:a aac -b:a 128k output.mp4
- Crop HEVC video in ffmpeg: ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4 (where out_w means width; out_h means height; x and y specify the top left corner of the output rectangle)
How to Free Convert HEVC Videos in a Much Easier Way
As you may see, FFmpeg is a powerful but complicated tool. Things can easily go wrong. For example, if you miss the -tag:v hvc1 in the command line, you will find the FFmpeg output HEVC video won't work with QuickTime. Other errors like FFmpeg HEVC green and pink only, parameter is outside the valid range, video not found, etc. make things even more confusing. For beginner users, we recommend an easier way to convert HEVC videos instead of FFmpeg.
WinX Video Converter - A free video converter that is able to convert HEVC H.265 from/to H.264, MP4, MOV, AVI, WMV, FLV, MKV, MTS, any other formats you need. It takes advantage of Intel QSV, AMD, and Nvidia Nvenc/Cuda hardware acceleration to convert HEVC to H.264 and encode HEVC H.265 videos at a superfast speed - about 5x faster than many other tools. It supports HEVC h.265 videos in 1080P HD, 4K, and even 8K resolutions. No command line required. Simply drag, select, and start!
How to Convert HEVC Videos Easier with FFmpeg Alternative
Step 1: Download the free HEVC video converter and run it. Click the Video button to load the HEVC video you want to convert, or other videos you want to encode to HEVC.
Step 2: After the video is loaded, it will pop up an output format window. To encode HEVC video, select General Profiles > HEVC video. To encode HEVC to H.264 MP4 or others, select General Profiles > MP4 video.
Step 3: Back to the main interface, click the gear button beside the selected output profile. Here you can lower the resolution, frame rate, etc. Then click OK.
Step 4: After the above settings, click Run to start. Before that, don't forget to enable the Hardware Accelerator and High Quality Engine boxes on the right lower part of the interface.