After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624786 - x264enc time base is wrong
x264enc time base is wrong
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Windows
: Normal normal
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-20 00:38 UTC by David Hoyt
Modified: 2010-07-20 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sets the appropriate time base for gstreamer (410 bytes, patch)
2010-07-20 00:38 UTC, David Hoyt
committed Details | Review

Description David Hoyt 2010-07-20 00:38:58 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
Comment 1 Mark Nauwelaerts 2010-07-20 14:49:00 UTC
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.
Comment 2 Andy Wingo 2010-07-20 17:24:37 UTC
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.
Comment 3 David Hoyt 2010-07-20 17:32:03 UTC
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...
Comment 4 Mark Nauwelaerts 2010-07-20 17:47:43 UTC
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