“I have H.265 encoded files that are too resource intensive to play on my device. Can I convert them to H.264 in a command line batch file?”
“My laptop cannot handle 10bit H265/HEVC videos, so I’m looking to convert them to 10bit H264. How do I do this using FFmpeg with the least quality loss?”
Many people want to convert HEVC/H.265 to H.264 for better compatibility with their players, computers, editing software, and video-sharing sites. As a professional video processing toolkit, FFmpeg provides an effective solution for this task. In the next part, I will show you how to let FFmpeg convert HEVC to H264. Read on for the details.
Tips. FFmpeg uses complicated command lines to process media files. If you’re a beginner, the simple FFmpeg alternative converter is more suitable. Learn more in #Part 2.
Step 1. Download and Install FFmpeg
Go to the official website and get the latest git master branch build on your PC. Find the downloaded FFmpeg.exe file and extract the file. Make sure it is in the same directory as your HEVC or H265 files.
Step 2. Open FFmpeg Command Window
Open the folder where FFmpeg and HEVC videos are. Hold down the Shift key and right-click the empty space. Then select “Open Command window”.
Step 3. FFmpeg Convert HEVC to H264
Input the command line behind the cursor in the command window to let FFmpeg convert H265 to H264.
Here is the command line for converting MP4 HEVC to MKV H264:
ffmpeg -i in.mp4 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy out.mkv
Explanation of the command switches:
-i in.mp4 refers to the input video file, -c:v libx264 means using H.264 video codec, -crf 18 is the quality level (bitrate, where 0 is lossless and 51 is the worst), -vf format=yuv420p is the pixel format, -c:a copy will copy the audio data without converting, and out.mkv refers to the resulting video file.
For the batch process of FFmpeg H265 to H264, input this command:
INPUT="$1" for i in *.mp4 ; do ffmpeg -i "$i" -bsf:v h264_mp4toannexb -sn -map 0:0 -map 0:1 -vcodec libx264 "$i.ts" mv "$i.ts" "$i.mkv" sleep 3 done
This can be changed to accommodate any other container extension of the files you want to process.
There is an easier way to convert your MP4 or MKV HEVC to H.264 files – WonderFox HD Video Converter Factory Pro. It is a powerful video transcoder and a simple alternative to FFmpeg. With this converting software, you can easily re-encode your videos to H.264 with several mouse clicks, instead of the fallible command lines. Also, you can customize the video settings, such as video bitrate, resolution, frame rate, aspect ratio, and volume in just one click. The user interface is self-explanatory. Everyone can handle the software without hassles!
Now, free downloadfree download the software on your PC. See how to convert HEVC/H.265 to H.264 below.
Launch HD Video Converter Factory Pro on your PC. Select Converter and click Add Files to import your H.265 files. You can also drag multiple files into the software for batch conversion.
Click the format image on the right side of the interface. Then go to the Video tab and select H.264 as the target codec. The software will wrap the H.264 encoded video in MP4 container format.
Tips. Another way to choose H264 is to specify a video codec in Parameter settings, where you can also change the video bitrate, resolution, frame rate, audio bitrate, channel, etc., based on your preference. Click OK to save your adjustments.
Press the inverted triangle button at the bottom to specify an output destination. Then, click Run to start the conversion at once. With full support for GPU acceleration, the process will be completed in seconds. Once done, you can find the converted H.264 videos and enjoy them without problems.
FFmpeg H264 to H265
FFmpeg WMV to MP4
This article is a simple guide for FFmpeg H265 to H264 on Windows. Novices are recommended to use the HD Video Converter. While both video transcoders are efficient, HD Video Converter Factory Pro offers an easier way to perform the conversion. GetGet the software installed on your PC and start your work right now!