I see that H.265/HEVC encoding is gathering momentum but under some versions of Ubuntu it is not all that easy to produce H.265 video streams.
How should I go about using x265, in a manner that integrates with Ubuntu (especially the LTS releases Trusty and Xenial), to produce HEVC video files under Ubuntu?
References:
- x265 HEVC Encoder: The commandline encoder
- x265: Videolan site
The best solution so far on my system has been:
For Xenial Xerus 16.04 LTS: simply run:
With either of the previous methods then use the following:
Note that this creates an mp3 audio stream as well as an h.265 video stream. To create an aac stream the line
-c:a libmp3lame -b:a 128k
could be replaced with the following:The
-strict experimental
option will not be required if your copy of FFmpeg was released after December 2015 when development of the native aac encoder matured. Bear in mind that this option will still be required for the repository FFmpeg for Xenial Xerus 16.04 LTS.References:
Method 01
You can install Internet friendly media encoder:
Run these commands in your Terminal:
Now you can open the program ifme from Dash.
source
Method 02
Once you compiled the program following the instructions in here or here, first you have to encode the video into YUV format:
Then you can convert YUV video into x265 format:
This script worked for me:
Start VLC with the file you wish to convert, stop the video from playing, reset to start of file, then open the media menu, select the convert/save option, select H265 and MP3, then give the file a new name using the output file selection, and wait for the process to finish. There is no easier way.