Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: alex2016g on July 30, 2014, 11:59:09 PM

Title: h.265 / HEVC
Post by: alex2016g on July 30, 2014, 11:59:09 PM
So I had a read about the new H.265/HEVC codex that is suppose to be "twice as efficient as MPEG-4/H.264, and experiences only a minimal loss in quality" and naturally wondered if there is any future integration of it into my favourite video encoding software Avidemux.

A quick search and nothing... not even a mention on this forum!
I understand that it is supper new and all but can some one in the know tell me if and when it might be used in avidemux?
Very anxious as it means half of the data needed to encode the same quality videos.

Table below taken from Report on HEVC compression performance verification testing http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=9089 (http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=9089)
Title: Re: h.265 / HEVC
Post by: jbriggsnh on August 05, 2014, 09:38:58 AM
I am using HEVC for UHD now and can't wait until its supported in Avidemux. Thanks for bringing this up.
Title: Re: h.265 / HEVC
Post by: twinsun on August 10, 2014, 10:54:27 PM
HEVC (H265) is impressive vs AVC (H264).
At least half the bit rate for the same quality.

I have some encoded one, to try and see, MPC-HC plays them just fine.
HEVC size is 0,3 to 0,5 the AVC size, encoded with equivalent presets, and results are very identical.
And the profile Still image ââ,¬Â¦ for music ââ,¬Å"videoââ,¬Â file with just slide images, super.

But twice the time to encode, and too few equipments to use it.

i.e., DVB :
in France, DVB-T is intended to stay for a while, this implies AVC only.
Some countries was waiting DVB-T2, skipping over DVB-T, to go to digital, and will use soon HEVC.
Official broadcasting tests in French public array have confirm HEVC benefits over AVC.
But public implementations are delayed, for market/budget reasons, DVB-T must be used a bit, before to say goodbye to it (and AVC).

Network providers review their boxes around HEVC, traffic benefits are obvious .
Youtube, web TV, ââ,¬Â¦ everybody will.
...

Nevertheless, for me, below 1080p, H264 is the right one to use, for a year or two.
Finaly, the main benefit of HEVC video is the gain in size, not enough to leave H264 right now.
 
And above 1080, ââ,¬Â¦ I will consider new equipments, and HEVC, when they will come in force, in a year or two.
Title: Re: h.265 / HEVC
Post by: dosaris on September 08, 2014, 12:25:13 PM
if you'd like to see h.265 in AVIdemux you need to have a free encoder first.
AVIdemux  utilizes the excellent x.264 encoder.

To my knowledge a FREE x.265 doesn' exist (yet)
Title: Re: h.265 / HEVC
Post by: AQUAR on September 08, 2014, 12:59:31 PM
I think it exists.
http://www.free-codecs.com/download/x265_hevc_encoder.htm
Title: Re: h.265 / HEVC
Post by: alex2016g on September 11, 2014, 01:59:46 PM
AQUAR is right.

VideoLAN, same people who make VLC player created a free software library and application for encoding video streams into the H.265/MPEG-H HEVC compression format, and is released under the terms of the GNU GPL.

Its called X265

Can be downloaded HERE (http://www.videolan.org/developers/x265.html)

I havent managed to install it into Avidemux yet but will try later on. If anyone has done it already please share your experience.
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on September 11, 2014, 03:57:33 PM
Developer intervention is needed to have this working in avidemux. Endusers can do nothing at this stage, just wait for implementation.
Title: Re: h.265 / HEVC
Post by: twinsun on September 12, 2014, 09:20:49 PM
When I wrote "I have some encoded one", I meant "I have encoded some".

And in fact, I used X265 to encode, not H265.

It's my own experience I shared, and personally, based on this, I still will use X264 (and avidemux) for a while.
Title: Re: h.265 / HEVC
Post by: alex2016g on November 20, 2014, 12:21:56 PM
Quote from: KoolAidMan on November 20, 2014, 05:12:42 AM
Quote from: KoolAidMan on November 20, 2014, 03:15:45 AM
Quote from: Jan Gruuthuse on September 11, 2014, 03:57:33 PM
Developer intervention is needed to have this working in avidemux. Endusers can do nothing at this stage, just wait for implementation.

I looked at the header file for x264 and compared it with x265, and it looks like one would be able to port the x264 plugin to support the x265 library with a moderate amount of effort.

Off the top of my head, the following changes are required:


  • x264_param_t -> x265_param
  • x264_t -> x265_encoder
  • x264_picture_t -> x265_picture
  • x264_nal_t -> x265_nal
  • We need to add options for new motion estimation algorithm, Star search.
  • Many of the analyise partition search options in x264 are no longer available in x265
  • x265 no longer has a 'fast first pass' option
  • Other subtle differences

I started porting the x264 plugin last night to use x265, and should have something which can compile soon. I'll upload what I have to github once I have it compiling, and will continue to update it until it works reasonably well.

Update:

It turns out Avidemux still uses the ffmpeg 1.2.x branch. x265 support is not available in this branch, so we will have to upgrade to at least 2.2.x or higher. I am revising my original speculation that this is a moderate amount of effort to this being a difficult task. FFMpeg is core to avidemux, and the version which avidemux uses is heavily patched. One will have to determine whether the patches are still necessary when updating ffmpeg to 2.2.x.

Thanks for the update, looks like it will be a much bigger job then expected. So what do you need to get this thing started? more people? technical support?
Unfortunately I won't be much help myself as I have never done anything like this, but I bet there are people out there who would be able to help.
Title: Re: h.265 / HEVC
Post by: mean on November 20, 2014, 04:47:17 PM
There were some changes around vdpau with the 2.x branch that requires some work for avidemux to work fine with it
Title: Re: h.265 / HEVC
Post by: mean on November 22, 2014, 07:22:49 PM
Thanks, i'll try to check that tomorrow
I'll probably do a release really soon , so that it will be in the next one
Title: Re: h.265 / HEVC
Post by: Nik on November 22, 2014, 09:32:10 PM
thanks for your work!

sounds kinda great! :)
looking forward for any "offical" builds :)
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on November 22, 2014, 11:02:27 PM
same here
Title: Re: h.265 / HEVC
Post by: mean on November 23, 2014, 02:07:55 PM
Looks good
Something maybe incorrect
Used to be

context->extradata blah blah
WrapOpen(xxx)

Now it is

WrapOpen(xxx)
context->extradata

So the extra data might be initialized after codec is opened
Title: Re: h.265 / HEVC
Post by: mean on November 25, 2014, 10:47:38 AM
Might be a good hint to look how handbrake does it
It is using the same library
Title: Re: h.265 / HEVC
Post by: mean on November 26, 2014, 11:00:29 AM
Thanks, i"ll give it a whirl asap
Title: Re: h.265 / HEVC
Post by: sl1pkn07 on November 26, 2014, 11:10:54 PM
@KoolAidMan your branch fail build

(x265 qt4 plugin)


[ 13%] Building CXX object ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/ADM_x265Setup.cpp.o
/home/sl1pkn07/aplicaciones/avidemux-2.6-git/src/avidemux/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp: In function 'void dumpx265Setup(x265_param*)':
/home/sl1pkn07/aplicaciones/avidemux-2.6-git/src/avidemux/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp:356:8: error: 'x265_param' has no member named 'saoLcuBoundary'
     PI(saoLcuBoundary);
        ^
/home/sl1pkn07/aplicaciones/avidemux-2.6-git/src/avidemux/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp:262:46: note: in definition of macro 'PI'
#define PI(x) printf(#x"\t:%d\n",(int)param->x)
                                              ^
/home/sl1pkn07/aplicaciones/avidemux-2.6-git/src/avidemux/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp:357:8: error: 'x265_param' has no member named 'saoLcuBasedOptimization'
     PI(saoLcuBasedOptimization);
        ^
/home/sl1pkn07/aplicaciones/avidemux-2.6-git/src/avidemux/avidemux_plugins/ADM_videoEncoder/x265/ADM_x265Setup.cpp:262:46: note: in definition of macro 'PI'
#define PI(x) printf(#x"\t:%d\n",(int)param->x)
                                              ^
ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/build.make:113: recipe for target 'ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/ADM_x265Setup.cpp.o' failed
make[2]: *** [ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/ADM_x265Setup.cpp.o] Error 1
CMakeFiles/Makefile2:146: recipe for target 'ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/all' failed
make[1]: *** [ADM_videoEncoder/x265/CMakeFiles/ADM_ve_x265_qt4.dir/all] Error 2
Makefile:120: recipe for target 'all' failed
make: *** [all] Error 2
Title: Re: h.265 / HEVC
Post by: sl1pkn07 on November 26, 2014, 11:58:39 PM
i use x265 1.4

https://bitbucket.org/multicoreware/x265/get/1.4.tar.bz2

greetings
Title: Re: h.265 / HEVC
Post by: sl1pkn07 on November 27, 2014, 04:52:26 PM
offtopic:

if you can fix the multithread compilation.....

if use more than 1 core, the build crash

EDIT: yes. now build OK
Title: Re: h.265 / HEVC
Post by: Nik on December 18, 2014, 04:16:00 PM
any news about the version feat. x265? :)
(is there any windows x32/x64 build I can download?)
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on December 19, 2014, 06:35:13 AM
You might try this one: avidemux_r041214_1043_win64.7z 16.2 MB Dec 4 2014 8:02 PM (http://www.avidemux.org/nightly/win64/) 64-bit only.
Title: Re: h.265 / HEVC
Post by: Nik on December 30, 2014, 04:33:58 PM
thanks :)
Title: Re: h.265 / HEVC
Post by: Nik on December 31, 2014, 06:21:49 PM
hmm, something's missing though ^^;
(the x265, and if I understand it right, it was fixed after 14th of Dec)
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on January 01, 2015, 06:07:42 AM
No, it was fixed on 2014-12-14T16:34:32Z (https://github.com/mean00/avidemux2/commit/ca384922f6e7647579417312455414e3d6e197f6)
patch provided by KoolAidMan and tested (http://avidemux.org/smuf/index.php/topic,16311.0.html)
build with commit ca38492 (http://avidemux.org/smuf/index.php/topic,16266.msg71517.html#msg71517)

No longer having any experience with windows: could be you need to install HEVC / x265 ? Don't know if you're required to build from source yourself or if codec is available for installation?
http://www.videolan.org/developers/x265.html
Title: Re: h.265 / HEVC
Post by: Nik on January 01, 2015, 03:55:45 PM
I thought the dlls are included in the avidemux builds?
the newest build in the folder (x64 branch) you named is from Dec 4th
(at least I don't see any dll that looks like x265 and there's also no x265 mentioned in help->plugins)
hmm :)
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on January 01, 2015, 04:55:24 PM
I'm very sorry, no idea how that could happen: that I overlooked the 1 not being in the release date avidemux_r041214_1043_win64.7z. It is indeed from 4th of December and not 14 December as I did announce. So as it looks this feature is currently only available in self builds from the latest source.
Hope mean can still provide this build for window, time permitting.

My apologies for my mistake :-[ . Never the less, still happy a New year.
Title: Re: h.265 / HEVC
Post by: Nik on January 02, 2015, 01:28:09 PM
don't worry, Jan, that's no problem :)
and the x265 part is still very new so I guess there'll be builds containing it in the future

but I want to take the chance and ask this here:
I only used the builds in x32 folder (and x64, but IIRC the x32 builds had more features in the past so I used these instead).
are there any important differences in self builds compared to the builds in the x32/x64 folders?
I only  have visual studio installed and I guess I need something else to compile self builds, right? that currently is no option for me because I don't really know what I (have to) do ;)

The Dec 4th build indeed is a little faster than avidemux x32 build from Oct 19th. Though it's only around 2 fps :)

Happy New Year :)
Title: Re: h.265 / HEVC
Post by: KoolAidMan on January 02, 2015, 07:58:16 PM
Hi Nik. The December 4th build is based on the 2.4 branch of ffmpeg, while the builds prior are based on ffmpeg 1.2. Any performance enhancements probably come from there.

As for HEVC support on windows, currently there is no cross compile script for the x265 library included, so a dll is not being built for the x265 library.
Title: Re: h.265 / HEVC
Post by: Nik on January 02, 2015, 11:38:37 PM
hey KAM :)
so I can't just use a x265 dll which I copied into the avidemux folder? (didn't try that yet)

yeah, I've read about the ffmpeg speedup :)
Title: Re: h.265 / HEVC
Post by: Jan Gruuthuse on January 11, 2015, 07:52:34 PM
Bot did build a newer release: 2015/01/15: for windows 64-bit: http://avidemux.org/smuf/index.php?action=post;topic=16247.15;last_msg=71596
Title: Re: h.265 / HEVC
Post by: Nik on January 12, 2015, 08:16:06 PM
great, thanks :D
Title: Re: h.265 / HEVC
Post by: dr5yv4 on January 12, 2015, 09:32:26 PM
Thank You

1 pass OK.

But 2pass x265 / Average bittrate always crash.