GNOME Bugzilla – Bug 421110
New x264enc plugin
Last modified: 2007-03-28 15:37:41 UTC
This is brand new x264enc from ITonis
Created attachment 85050 [details] Header file for plugin
Created attachment 85053 [details] x264enc plugin Sorry, no autoconf stuff yet
I wrote the autostuff for this, but the compilation fails for me with: gstx264enc.c:59:28: error: include/system.h: No such file or directory gstx264enc.c: In function 'gst_x264enc_init_encoder': gstx264enc.c:635: error: 'struct <anonymous>' has no member named 'f_vbv_ireserve' gstx264enc.c: In function 'gst_x264enc_sink_event': gstx264enc.c:735: error: 'false' undeclared (first use in this function) gstx264enc.c:735: error: (Each undeclared identifier is reported only once gstx264enc.c:735: error: for each function it appears in.) make[3]: *** [libgstx264_la-gstx264enc.lo] Error 1 what is 'system.h' meant to come from?
Created attachment 85101 [details] X264enc plugin Hi Christian, system.h is part of our build system which I forgot to remove. v_vbv_reserve is out API addition to x264 which is not accepted by the community because they are working on a more complex solution to constant bit-rate ratecontrol. All of this stuff is removed from the new version.
Hi Michal, Ok, it compiles now, but the built plugin fails to load. The debug log tells me: GST_PLUGIN_LOADING gstplugin.c:414:gst_plugin_load_file:^[[00m module_open failed: /usr/lib/gstreamer-0.10/libgstx264.so: undefined symbol: x264_nal_encode My version of x264 is -> x264-devel-0-0.8.20061028
Hi, Works fine for me :: gst-launch videotestsrc ! "video/x-raw-yuv, framerate=(fraction)8, width=720, height=576" ! ffmpegcolorspace ! x264enc ! ffdec_h264 ! ffmpegcolorspace ! ximagesink using x264 daily tarball x264-snapshot-20070322-2245.tar.bz2 . Thanks a lot for this code. Regards.
Great stuff! Committed to CVS with a bunch of minor changes (c++ comments, nomenklatura, etc.): 2007-03-25 Tim-Philipp Müller <tim at centricular dot net> Patch by: Michal Benes <michal.benes at itonis tv> Patch by: Josef Zlomek <josef.zlomek at itonis tv> * configure.ac: * ext/Makefile.am: * ext/x264/Makefile.am: * ext/x264/gstx264enc.c: (gst_x264_enc_me_get_type), (gst_x264_enc_analyse_get_type), (gst_x264_enc_timestamp_queue_init), (gst_x264_enc_timestamp_queue_free), (gst_x264_enc_timestamp_queue_put), (gst_x264_enc_timestamp_queue_get), (gst_x264_enc_header_buf), (gst_x264_enc_set_src_caps), (gst_x264_enc_sink_set_caps), (gst_x264_enc_base_init), (gst_x264_enc_class_init), (gst_x264_enc_init), (gst_x264_enc_init_encoder), (gst_x264_enc_close_encoder), (gst_x264_enc_dispose), (gst_x264_enc_sink_event), (gst_x264_enc_chain), (gst_x264_enc_encode_frame), (gst_x264_enc_change_state), (gst_x264_enc_set_property), (gst_x264_enc_get_property), (plugin_init): * ext/x264/gstx264enc.h: Add libx264-based h264 encoder plugin (#421110). Probably doesn't handle 'odd' widths and heights correctly yet.
Hi Tim, x264 library handles widths/heights non-divisible by 16 correctly by setting appropriate cropping. This is more effective than cropping the image explicitly before passing to encoder.
> x264 library handles widths/heights non-divisible by 16 correctly by > setting appropriate cropping. This is more effective than cropping the > image explicitly before passing to encoder That may be so, but as far as I can tell you're still feeding it data with the wrong strides in those cases, since you need to consider the actual input stride of the input data. Also, our video caps system currently doesn't have a standardised way to pass cropping configuration with picture data, so even if libx264 can do that you can't really do this with GStreamer yet. This doesn't look right, for example (although the decoder might be broken in this respect as well of course): $ gst-launch-0.10 videotestsrc ! video/x-raw-yuv,format=\(fourcc\)I420,width=718,height=574 ! x264enc ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink
Just thought I should mention that the plugin loads on my Fedora system too now with the fixes from Tim. Thanks everyone. Hopefully the stride issues can be sorted out also.
Hi, submitted h264 payloader, working fine with x264enc (Bugzilla Id #423782). Regards