Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
free H264 Video Codec x264 by Videolan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
FooFighter007
n00b
n00b


Joined: 06 Jan 2005
Posts: 4

PostPosted: Fri Feb 04, 2005 12:13 pm    Post subject: free H264 Video Codec x264 by Videolan Reply with quote

For those who are interested in the new codec

Discussion
http://forum.doom9.org/showthread.php?s=f19c4c2b94df965a45f3af8b537a2ac0&threadid=80910

Source (svn)
http://www.videolan.org/x264.html

amd64 Patch
http://www.via.ecp.fr/via/ml/x264-devel/2004-10/msg00033.html

Have a nice WE!

Foo
Back to top
View user's profile Send private message
HardenCoonor
n00b
n00b


Joined: 19 Feb 2004
Posts: 54

PostPosted: Fri Mar 04, 2005 2:31 pm    Post subject: Reply with quote

@FooFighter007:

Have you been able to compile it? And, more interesting to me, have you been able to compile mplayer with x264-support?



I have tried it, got version 149 from svn, made a tarball, an ebuild and so on, compiled it, put .a into /usr/lib, .h into /usr/include, but then mplayer detected it at recompilation, but it seems the x264.c is too old. Will try it with a cvs-snapshot of mplayer.

I really like the quality of x264, and the speed of it under Gentoo Linux should be amazing. I conclude that from the speed difference between a xvid/win32 and xvid/linux encode, where i got probably >twice the encoding speed(2-pass, xvid reencode from ~1500kbit to 800kbit). This comparison is probably not that useful, but Gentoo is generally faster than Windows.

Unofrtunately, xine won't decode x264 right now, but maybe my useflags are wrong for that.
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Fri Mar 04, 2005 3:05 pm    Post subject: Reply with quote

I've made custom ebuilds for mplayer and x264. You can find them here.
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Fri Mar 04, 2005 5:28 pm    Post subject: Reply with quote

There are some very interesting things happening with next-gen video codecs right now. Of course none of them are near finished. x264 looks very promising along with dirac (which I think is just becoming usable now) and snow from ffmpeg (both wavelet based incidentally).

And then these all plug into gstreamer, so the future is looking very bright for free video. (you can do nearly anything with a well formed gst-launch command)
Back to top
View user's profile Send private message
HardenCoonor
n00b
n00b


Joined: 19 Feb 2004
Posts: 54

PostPosted: Mon Mar 07, 2005 10:34 am    Post subject: Reply with quote

@bi3l: Thanks for the ebuilds. Especially the x264 one is more sophisticated than my own. Of course one has to test several different sets of CFLAGS, but as far as i have seen, they don't make that much of a difference yet, it is still as slow as on win32.

As for mplayer, a current snapshot also works just fine, but the ebuild for pre6 for example has to be adjusted to match the snapshot date. I think i will stick to my own ebuild for mplayer, but will use that one for x264.
Back to top
View user's profile Send private message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Tue May 03, 2005 12:00 am    Post subject: Reply with quote

bi3l wrote:
I've made custom ebuilds for mplayer and x264. You can find them here.


bi3l, I had quite a bit of trouble with your ebuilds (mostly for lack of experience in dealing with them) but eventually got them working.

I would like to create a HOWTO in Hungarian (which I will translate to English and also post) as to how to install mplayer with x264 encoding capabilities. I would like to ask your permission to distribute (well, make available for download really) a gzip or bzip2 file (making use of your ebuilds (with slight modification by me). I will, of course, give all necessary credit to you (most of it, actually). ;)

Hope you don't mind and will oblige me. Thanks in advance!
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Tue May 03, 2005 12:16 am    Post subject: Reply with quote

I've recently made some new ebuilds and patches for mplayer-1.0pre6. They are available here. You can do what you want with them. Just don't forget me when your tutorial will be finished and translated in english. I'll be glad to have a look on it and give some feedback.
Back to top
View user's profile Send private message
Danuvius
Guru
Guru


Joined: 18 Sep 2004
Posts: 375
Location: Toronto

PostPosted: Tue May 03, 2005 12:29 am    Post subject: Reply with quote

bi3l wrote:
I've recently made some new ebuilds and patches for mplayer-1.0pre6. They are available here. You can do what you want with them. Just don't forget me when your tutorial will be finished and translated in english. I'll be glad to have a look on it and give some feedback.


Thanks. ;)

And I will appreciate any feedback you have... I got it working, but there are some things that I'd be hard-pressed to explain as to why I did/couldn't do/had to change.

I'll be in touch.
Back to top
View user's profile Send private message
shira
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2002
Posts: 122

PostPosted: Fri Jun 17, 2005 1:55 am    Post subject: Reply with quote

bi3l wrote:
I've made custom ebuilds for mplayer and x264. You can find them here.


the new versions of x264 break the build
I made a patch to fix that stuff and add support for the 8x8dct analyzation that popped up in one of the recent x264 versions

it build fine on my system but I haven't tested the output yet (it's kinda slow to encode with x264 ;) )
if you use it, please lemme know if it works/doesn't (I'm new to this patching business)

teh patch:
Code:

diff -Nuar /usr/tmp/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/configure /root/MPlayer-1.0pre7/configure
--- configure   2005-06-16 18:40:26.000000000 -0500
+++ configure   2005-06-16 18:33:45.000000000 -0500
@@ -1821,7 +1821,7 @@
     _inc_libdts=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
     ;;
   --with-x264libdir=*)
-    _ld_x264=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+    _ld_x264="-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` -lm -lx264"
     ;;
   --with-x264incdir=*)
     _inc_x264=-I`echo $ac_option | cut -d '=' -f 2 |sed 's,:, -I,g'`
diff -Nuar /usr/tmp/portage/mplayer-1.0_pre7/work/MPlayer-1.0pre7/libmpcodecs/ve_x264.c /root/MPlayer-1.0pre7/libmpcodecs/ve_x264.c
--- libmpcodecs/ve_x264.c       2005-04-13 14:10:29.000000000 -0500
+++ libmpcodecs/ve_x264.c       2005-06-16 17:23:56.000000000 -0500
@@ -75,6 +75,7 @@
 static int p4x4mv = 0;
 static int p8x8mv = 1;
 static int b8x8mv = 1;
+static int b_transform_8x8 = 0;
 static int direct_pred = X264_DIRECT_PRED_TEMPORAL;
 static int weight_b = 0;
 static int chroma_me = 1;
@@ -122,6 +123,7 @@
     {"no8x8mv", &p8x8mv, CONF_TYPE_FLAG, 0, 1, 0, NULL},
     {"b8x8mv", &b8x8mv, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     {"nob8x8mv", &b8x8mv, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"b8x8dct",&b_transform_8x8, CONF_TYPE_FLAG, 0, 0, 0, NULL},
     {"direct_pred", &direct_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
     {"weight_b", &weight_b, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     {"noweight_b", &weight_b, CONF_TYPE_FLAG, 0, 1, 0, NULL},
@@ -185,6 +187,7 @@
     mod->param.rc.f_qblur = qblur;
     mod->param.rc.f_complexity_blur = complexity_blur;
     mod->param.analyse.i_subpel_refine = subq;
+    mod->param.analyse.b_transform_8x8 = b_transform_8x8;
     mod->param.rc.psz_stat_out = passtmpfile;
     mod->param.rc.psz_stat_in = passtmpfile;
     if((pass & 2) && bitrate <= 0)
@@ -216,12 +216,12 @@
             rc_buffer_size = bitrate;
         mod->param.rc.b_cbr = 1;
         mod->param.rc.i_bitrate = bitrate;
-        mod->param.rc.i_rc_buffer_size = rc_buffer_size;
+        mod->param.rc.i_vbv_buffer_size = rc_buffer_size;
         if(rc_init_buffer > 1)
-            mod->param.rc.i_rc_init_buffer = rc_init_buffer;
+            mod->param.rc.f_vbv_buffer_init = rc_init_buffer;
         else
-            mod->param.rc.i_rc_init_buffer = rc_buffer_size * rc_init_buffer;
-        mod->param.rc.i_rc_sens = rc_sens;
+            mod->param.rc.f_vbv_buffer_init = rc_buffer_size * rc_init_buffer;
+        mod->param.rc.f_rate_tolerance = rc_sens;
     }
     mod->param.rc.f_ip_factor = ip_factor;
     mod->param.rc.f_pb_factor = pb_factor;
Back to top
View user's profile Send private message
gotaserena
Apprentice
Apprentice


Joined: 23 Feb 2005
Posts: 153
Location: fourth worst city in the world

PostPosted: Fri Jun 17, 2005 8:38 am    Post subject: Reply with quote

I usually don't have any trouble compiling mplayer-cvs against the newest version of x264 -- v263 here. In fact I've a script which recompiles both once a week.

Never learnt enough of portage to write an ebuild, though. Usually compiling against cvs requires 3 cvs calls and the downloads of AMR sources. But I think that it would be best to consider it instead of beginning with pre6...
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Fri Jun 17, 2005 3:25 pm    Post subject: Reply with quote

shira,

I made a patch to use the latest svn 255 for x264 with mplayer pre7 but found a problem that mplayer would keep looping the encode so my test vid was one big file with the content duplicated one after the other.
Back to top
View user's profile Send private message
shira
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2002
Posts: 122

PostPosted: Fri Jun 17, 2005 7:35 pm    Post subject: Reply with quote

Kabuto wrote:
shira,

I made a patch to use the latest svn 255 for x264 with mplayer pre7 but found a problem that mplayer would keep looping the encode so my test vid was one big file with the content duplicated one after the other.


could you post what you used? (for reference)
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Fri Jun 17, 2005 7:40 pm    Post subject: Reply with quote

Here are ebuilds and patches for x264 and mplayer to synchronize with revision 264.

http://ogmrip.sourceforge.net/ebuilds/mplayer-1.0_pre7-x264.patch
http://ogmrip.sourceforge.net/ebuilds/mplayer-1.0_pre7.ebuild

http://ogmrip.sourceforge.net/ebuilds/x264-20050617.ebuild
http://ogmrip.sourceforge.net/ebuilds/x264-20050617.patch.bz2
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Fri Jun 17, 2005 10:46 pm    Post subject: Reply with quote

Actually, encoding works perfectly but playback don't. I'll investigate...
Back to top
View user's profile Send private message
bi3l
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 268
Location: France

PostPosted: Sat Jun 18, 2005 9:09 am    Post subject: Reply with quote

Correction, playback works perfectly as well. However playback of ogm or matroska files with a x264 video stream exits with an assertion error. Either mkvtoolnix and ogmmerge don't support recent version of x264 or mplayer do not demux properly.
Back to top
View user's profile Send private message
shira
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2002
Posts: 122

PostPosted: Sat Jun 18, 2005 2:37 pm    Post subject: Reply with quote

ya, I had playback probs (with the ogmrip.sf.net patch/build)
it went away if I didn't use the 8x8dct feature
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Wed Jun 22, 2005 9:08 pm    Post subject: Reply with quote

Well duh! Found my problem with looping. I forgot to add -o before the output file. Seemed to work but then would loop on the file it was creating till stopped (or running out of HD space).

I also am playing with a svn 264 patch and svn270 release of x264. Adds lossless.
Back to top
View user's profile Send private message
nadir-san
Apprentice
Apprentice


Joined: 29 May 2004
Posts: 174
Location: Ireland

PostPosted: Thu Jul 21, 2005 9:51 pm    Post subject: Reply with quote

man this is slow

Pos: 4.6s 140f ( 0%) 2fps Trem: 815min 5677mb A-V:0.001 [15063:224]

2fps ... wtf

am i doing something wrong?
Back to top
View user's profile Send private message
Kabuto
l33t
l33t


Joined: 01 Aug 2002
Posts: 701

PostPosted: Fri Jul 22, 2005 8:00 pm    Post subject: Reply with quote

Maybe. Depends on your CPU and command line and any pre-proccessors you might be using. I usually get faster than that on HD 720P conversions.
Back to top
View user's profile Send private message
riven
n00b
n00b


Joined: 10 Jul 2004
Posts: 44

PostPosted: Tue Aug 23, 2005 3:37 pm    Post subject: Reply with quote

Hey. I'm using bi3l's ebuild for x264 and his mplayer ebuild. First of all a big thanks, they work great. Mencoder works with it no probs and play back is no problem for mplayer even in an mkv. Encoding is damn slow though. I'm talking about 6fps first pass (mencoder stream.dump -ovc x264 -nosound -o video.avi -x264encopts pass=1:subq=2:frameref=3:qcomp=0.7:bitrate=968) 3fps second pass (mencoder stream.dump -ovc x264 -nosound -o video.avi -x264encopts pass=2:subq=6:frameref=3:4x4mv:me=2:qcomp=0.7:bitrate=968). Thats on an AMD Athlon64 3700 (2.2 GHz IIRC) with 1 GB of ram.

It doesn't look like the 64 bit patch is applied though (correct me if I'm wrong). Do you think that would improve performance much as I'm in a 64bit environment.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum