GNOME Bugzilla – Bug 624786
x264enc time base is wrong
Last modified: 2010-07-20 17:47:43 UTC
Created attachment 166187 [details] [review] Sets the appropriate time base for gstreamer Encoding with a simple pipeline results in odd visual artifacts. Fixing it is a matter of setting the appropriate time base in x264enc. The attached patch resolves the issue. Try running the following pipeline before and after the patch to see the difference: gst-launch videotestsrc ! ffmpegcolorspace ! x264enc ! rtph264pay ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink
I don't see much of a difference, but it makes sense: commit 35f0e23a465253bd1dc6cbfc1343c9c623b154f7 Author: David Hoyt <dhoyt@llnl.gov> Date: Tue Jul 20 16:40:22 2010 +0200 x264enc: set appropriate time base Fixes #624786.
Breaks with an old x264 snapshot I have: x264-snapshot-20090401-2245.tar.bz2 CC libgstx264_la-gstx264enc.lo gstx264enc.c: In function 'gst_x264_enc_init': gstx264enc.c:563: error: 'x264_param_t' has no member named 'i_timebase_num' gstx264enc.c:564: error: 'x264_param_t' has no member named 'i_timebase_den' The configure check passes FWIW.
It seems these parameters first appeared in x264 build 81. See http://git.videolan.org/?p=x264.git;a=blobdiff;f=x264.h;h=62aecc137b57c2b4eaaada7ca1dd42ae0c4f9a4a;hp=3a6591262e394b7101f686330dc5eb23a4690a0f;hb=8b9dcd8d50be201f1bedc9b19331432969f37d98;hpb=27355a2ba90516b0c280e026eb9c35fbf5f27a57 I suppose we could guard those lines with #if X264_BUILD >= 81...
Oh well, we already have enough of those, so one more ... commit bd6d9402e0e0133a9d23763d819b2af0d363005d Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Jul 20 19:44:00 2010 +0200 x264enc: only set timebase on versions where it exists