H.265 (also known as HEVC) can offer 50–75% more compression efficiency compared to H.264 video, while retaining the same visual quality. Thus if your hardware is available for H265 files, it's a nice option to transcode H264 to H265 since you can not only save storage space of your devices, but also enjoy the equal quality of H264 videos. Moreover, HEVC playback is available on iPhone iPad running on iOS 11 and all Macs on High Sierra, with encoding/decoding hardware acceleration on newer iOS devices and the latest Macs offering faster performance combined with less battery drain.
For this purpose, FFmpeg is regarded as the first consideration since it has support for HEVC encoding using the x265 encoder.
[Tutorial] Convert H264 to H265 with FFmpeg
Step 1: Free download FFmpeg static zip file on your computer. Please note that you should download the right one based on system type.
Step 2: Install FFmpeg on your computer. Take Windows 7 (32 bit) as an example, unzip file and open the command prompt with administrator's right. Enable FFmpeg in the command line: right-click on Computer and choose Properties > Advanced system settings > Environment Variables. In the Users variables, click New... button and enter Path for variable name; c:\ffmpeg\bin for Variable value.
Step 3: Similar to convert MKV HEVC to H264 MP4 with FFmpeg, you need enter a command line. Now type in ffmpeg -i input.mp4 -c:v libx265 -preset medium -x265-params crf=28 -c:a aac -strict experimental -b:a 128k output.mp4 in the command line to switch H264 video codec to H265 via FFmpeg fast and losslessly. I converted Star Wars: The Force Awakens Official Teaser H264 to H265 as an example. It takes me only 15 seconds to transcode this H264 video to HEVC with FFmpeg.
Input info: starwars.mp4
video: H264 104 kb/s 11.99 fps; audio: aac, 44100Hz, stereo 125 kb/s
Duration: 00:01:59.51; bitrate: 235 kb/s; file size: 3.35 MB; resolution:1920×1080p
FFmpeg Possible Errors When Converting H264 to H265
It would be nice that you turn MP4 H264 to HEVC smoothly. But sometimes things are not going so well. You may encounter some error when converting H264 to H265 such as FFmpeg crashes on halfway and FFmpeg doesn't work. On account of that you need type the specific command line, there is a great possibility that you mistake a letter or blank space, which will result in ffmpeg doesn't work. Or your file cannot be read though this format seems to be supported by FFmpeg. That's because even if ffmpeg can read the container format, it may not support all its codecs. Please consult the supported codec list in the ffmpeg documentation.
Best FFmpeg Alternative to Create HEVC Video from H264 without Error
If you don't want any bother with FFmpeg H264 to H265 video processing issues, here a FFmpeg alternative - MacX Video Converter Pro is suggested to decode 4K H264 to 4K H265 or encode to H.264 from H.265 with fast speed and original quality. Unlike FFmpeg's complicated command lines, this H265/HEVC converter enables you to transcode H.264 to HEVC within 3 steps and several clicks. Even a beginner can get the hang of it within one minute.
Step 1: Load H264 files.
Free download the HEVC decoder on Mac or Windows version for Windows PCs (32bit or 64 bit) and launch it. Then click on + Video, choose the target H264 file from the pop up window, tap Open to import H.264 video to the program.
Step 2: Choose H265/HEVC as output format.
Choose HEVC as the output format. With 350+ built-in preset profiles, you can not only re-encode H.264 to H.265, but also transcode H.265 to H.264, VP8 to VP9, VOB to MP4, AVI to MOV, MKV to MP4, etc. for playing on iPhone X/8/8/7/6S/6 Plus, iPad, Android. Here I've pick HEVC, without changing resolutions. You can also choose 4K MP4 Video to up-convert AVCHD to 4K HEVC.
Step 3: Optimise settings for H.264 to H.265 Conversion
Do some tweaks to optimise H264 codec to H265 video processing. Before the conversion, you can do some settings to improve the processing speed, and enhance the output video quality.
Tip #1 Improve H264 to H265 processing speed: In the lower right corner of the main interface, check the box of Hardware Encoder to activate Intel QSV hardware acceleration, which will improve the speed up to 5 times faster than usual.
Also, click Options icon on the top of the panel and choose the maximum number from the CPU Core Use drop-down list to take advantages of multi-core CPU utility. It will exceedingly free up your CPU for other tasks like video playback, web browsing.
Tip #2 Enhance output HEVC video quality: Tick box of Use High Quality Engine and Deinterlacing to maximize image quality dynamically for the output HEVC/H265 videos.
Step 4: Start converting H264 to HEVC/H265.
Click on Browse to specify the output folder path. Then tap RUN icon, you'll get a HEVC codec MP4 video from H264 at the drop of a hat. For the same starwars.mp4 video above, merely 4 seconds are needed to make H264 converted to HEVC.
References
- What's HEVC: HEVC is the short of High Efficiency Video Coding, also known as H.265. The HEVC/H.265 substantially improves the data compression ratio for videos, thus saving a massive bandwidth and ensuring a 50% bit rate reduction at the same level of video quality.
- HEVC vs H.264: Both codecs work by comparing different parts of a video frame in order to find the ones that are redundant within the subsequent frames. These areas are replaced with a short information, describing the original pixels. What differs HEVC/H.265 from H.264 is the ability to expand the size of these areas into bigger or smaller blocks, called CTU in the HEVC/H.265.
- FFmpeg: FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge.