Whoa.. was I dreaming? x264 speed increase ?

Post your testing results with HandBrake.
Post Reply
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Whoa.. was I dreaming? x264 speed increase ?

Post by Frank »

Background: always using the same encoding preset. This doesn't change. I download the nightly builds quite often to take advantage of any of the latest x264 speed bumps. Same types of video files (MPEG-2 1080i TS files).

A while ago (mid-January) I glanced at my encode logs and saw that instead of getting my regular fps of 15fps (1080i TS -> 720p) on a hyperthreaded 6-core 3.3GHZ Mac, I was getting almost real-time encoding - about 28-32 fps on average.

Now that speed increase isn't to be seen in the latest nightlies and currently, it isn't encoding as quickly as it was and I'm back to my regular 11-15fps.

So, what happened to the speed? :-)


[edit]

Found the differences thanks to mediainfo and handbrake logs… now which are the key differences that slow down the encoding the most?
•Motion-Estimation?
•Sub-pixel Motion Estimation (SubME)
•Reference frames?
•rc_lookahead?

Given that I'm working with cable-co processed MPEG-2TS files, is the 'slow setting' excessive? I'm aiming to reduce the file size as much as possible (hence 1080-720 size reduction) but I wonder about the quality differences I will see with these settings at 'max' vs 'fast'? (as described below)

:|

Odd. Looks like the 'fast' version (5202) didn't respect the preset that was supposed to be the 'default'.

Slow

Code: Select all

cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=tesa / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=30 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=4 / qpmax=69 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Fast

Code: Select all

cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.60 / qpmin=4 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Diffs:

Fast

Code: Select all

ref=3 / me=hex / subme=7 / slices = default / rc_lookahead=40
Slow

Code: Select all

ref=4 / me=tesa / subme=10 / slices = 4 / rc_lookahead=50  vbv_maxrate=40000 	 vbv_bufsize=30000 	 crf_max=0.0 	 nal_hrd=none 
Last edited by Frank on Tue Feb 19, 2013 6:23 am, edited 1 time in total.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by mduell »

Post your HB logs. It's a lot easier to see differences there without all the other garbage defaults.

Filtering may account for a huge portion of the speed difference.
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by Frank »

'Slow encode' - average 15.108947 fps

Code: Select all

HandBrake Activity Log for /Volumes/Encoded/Undersea Volcanoes.m4v: 2013-02-17 10:28:18 -0800
Handbrake Version: 5252svn x86_64 (2013021601)

[10:28:18] macgui: getNextPendingQueueIndex next pending encode index is:9
[10:28:18] macgui: incrementQueueItemDone new pending items found: 9
[10:28:18] macgui: scanning specifically for title: 9
[10:28:18] hb_scan: path=/Volumes/TS/Undersea Volcanoes.ts, title_index=9
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Volumes/TS/Undersea Volcanoes.ts/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Volumes/TS/Undersea Volcanoes.ts/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:1725: nav_get_title_list(/Volumes/TS/Undersea Volcanoes.ts) failed (0x128d09a00)
[10:28:18] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[10:28:18] dvd: not a dvd - trying as a stream/file instead
[10:28:18] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[10:28:18] Found the following PIDS
[10:28:18]     Video PIDS : 
[10:28:18]       0x1479 type MPEG2 (0x2) (PCR)
[10:28:18]     Audio PIDS : 
[10:28:18]       0x147a type AC3 (0x81)
[10:28:18]     Subtitle PIDS : 
[10:28:18]     Other PIDS : 
[10:28:18] stream id 0x147a (type 0x81 substream 0x0) audio 0x147a
[10:28:18] scan: decoding previews for title 1
[10:28:18] scan: audio 0x147a: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[10:28:19] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[10:28:19] stream: 11 good frames, 0 errors (0%)
[10:28:19] libhb: scan thread found 1 valid title(s)
[10:28:19] macgui: ScanDone state received from fQueueEncodeLibhb
[10:28:19] macgui: Preset: 720p AC3 x264 ME30 Default KF Big File Web Optimized
[10:28:19] macgui: processNewQueueEncode number of passes expected is: 1
[10:28:19] macgui: Start / Stop set to chapters
[10:28:19] macgui: prepareJob exiting
[10:28:19] 1 job(s) to process
[10:28:19] starting job
[10:28:19] yadif thread started for segment 0
[10:28:19] yadif thread started for segment 1
[10:28:19] yadif thread started for segment 2
[10:28:19] yadif thread started for segment 3
[10:28:19] yadif thread started for segment 4
[10:28:19] yadif thread started for segment 5
[10:28:19] yadif thread started for segment 6
[10:28:19] yadif thread started for segment 7
[10:28:19] yadif thread started for segment 8
[10:28:19] yadif thread started for segment 9
[10:28:19] yadif thread started for segment 10
[10:28:19] yadif thread started for segment 11
[10:28:19] decomb filter thread started for segment 0
[10:28:19] decomb filter thread started for segment 1
[10:28:19] decomb filter thread started for segment 2
[10:28:19] decomb filter thread started for segment 3
[10:28:19] decomb filter thread started for segment 4
[10:28:19] decomb filter thread started for segment 5
[10:28:19] decomb filter thread started for segment 6
[10:28:19] decomb filter thread started for segment 7
[10:28:19] decomb filter thread started for segment 8
[10:28:19] decomb filter thread started for segment 9
[10:28:19] decomb filter thread started for segment 10
[10:28:19] decomb filter thread started for segment 11
[10:28:19] decomb check thread started for segment 0
[10:28:19] decomb check thread started for segment 1
[10:28:19] decomb check thread started for segment 2
[10:28:19] decomb check thread started for segment 3
[10:28:19] decomb check thread started for segment 4
[10:28:19] decomb check thread started for segment 5
[10:28:19] decomb check thread started for segment 6
[10:28:19] decomb check thread started for segment 7
[10:28:19] decomb check thread started for segment 8
[10:28:19] decomb check thread started for segment 9
[10:28:19] decomb check thread started for segment 10
[10:28:19] decomb check thread started for segment 11
[10:28:19] mask filter thread started for segment 0
[10:28:19] mask filter thread started for segment 1
[10:28:19] mask filter thread started for segment 2
[10:28:19] mask filter thread started for segment 3
[10:28:19] mask filter thread started for segment 4
[10:28:19] mask filter thread started for segment 5
[10:28:19] mask filter thread started for segment 6
[10:28:19] mask filter thread started for segment 7
[10:28:19] mask filter thread started for segment 8
[10:28:19] mask filter thread started for segment 9
[10:28:19] mask filter thread started for segment 10
[10:28:19] mask filter thread started for segment 11
[10:28:19] mask erode thread started for segment 0
[10:28:19] mask erode thread started for segment 1
[10:28:19] mask erode thread started for segment 2
[10:28:19] mask erode thread started for segment 3
[10:28:19] mask erode thread started for segment 4
[10:28:19] mask erode thread started for segment 5
[10:28:19] mask erode thread started for segment 6
[10:28:19] mask erode thread started for segment 7
[10:28:19] mask erode thread started for segment 8
[10:28:19] mask erode thread started for segment 9
[10:28:19] mask erode thread started for segment 10
[10:28:19] mask erode thread started for segment 11
[10:28:19] mask dilate thread started for segment 0
[10:28:19] mask dilate thread started for segment 1
[10:28:19] mask dilate thread started for segment 2
[10:28:19] mask dilate thread started for segment 3
[10:28:19] mask dilate thread started for segment 4
[10:28:19] mask dilate thread started for segment 5
[10:28:19] mask dilate thread started for segment 6
[10:28:19] mask dilate thread started for segment 7
[10:28:19] mask dilate thread started for segment 8
[10:28:19] mask dilate thread started for segment 9
[10:28:19] mask dilate thread started for segment 10
[10:28:19] mask dilate thread started for segment 11
[10:28:19] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[10:28:19] Auto Passthru: fallback is AC3 (ffmpeg)
[10:28:19] Auto Passthru: using AC3 Passthru for track 1
[10:28:19] sync: expecting 96198 video frames
[10:28:19] job configuration:
[10:28:19]  * source
[10:28:19]    + /Volumes/TS/Undersea Volcanoes.ts
[10:28:19]    + title 1, chapter(s) 1 to 1
[10:28:19]  * destination
[10:28:19]    + /Volumes/Encoded/Undersea Volcanoes.m4v
[10:28:19]    + container: MPEG-4 (.mp4 and .m4v)
[10:28:19]      + 64-bit formatting
[10:28:19]      + optimized for progressive web downloads
[10:28:19]  * video track
[10:28:19]    + decoder: mpeg2
[10:28:19]      + bitrate 18500 kbps
[10:28:19]    + frame rate: same as source (around 29.970 fps)
[10:28:19]    + filters
[10:28:19]      + Detelecine (pullup) (default settings)
[10:28:19]      + Decomb (default settings)
[10:28:19]      + Framerate Shaper (0:27000000:900900)
[10:28:19]        + frame rate: same as source (around 29.970 fps)
[10:28:19]      + Crop and Scale (1280:720:0:0:0:0)
[10:28:19]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1280 * 720
[10:28:19]    + loose anamorphic
[10:28:19]      + storage dimensions: 1280 * 720, mod 16
[10:28:19]      + pixel aspect ratio: 1 / 1
[10:28:19]      + display dimensions: 1280 * 720
[10:28:19]    + encoder: H.264 (x264)
[10:28:19]      + options: ref=4:b-adapt=2:direct=auto:me=tesa:subq=10:merange=30:slices=4:vbv-bufsize=30000:vbv-maxrate=40000:rc-lookahead=50:=1:trellis=2
[10:28:19]      + quality: 22.00 (RF)
[10:28:19]  * subtitle track 1, Closed Captions (track 0, id 0x0) Text [CC] -> Passthrough
[10:28:19]  * audio track 1
[10:28:19]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x147a)
[10:28:19]      + bitrate: 384 kbps, samplerate: 48000 Hz
[10:28:19]    + AC3 Passthru
[10:28:19] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[10:28:19] reader: first SCR 909 id 0x147a DTS 25708
[10:28:19] encx264: min-keyint: 30, keyint: 300
[10:28:19] encx264: encoding with stored aspect 1/1
[10:28:19] encx264: Encoding at constant RF 22.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[10:28:19] mpeg2: "Chapter 1" (1) at frame 0 time 0
x264 [info]: profile High, level 4.1
[12:18:39] hb_ts_stream_decode - eof
[12:18:39] reader: done. 1 scr changes
[12:18:48] work: average encoding speed for job is 15.108947 fps
[12:18:48] sync: got 100095 frames, 96198 expected
[12:18:48] decomb: deinterlaced 39428 | blended 9047 | unfiltered 38647 | total 87122
[12:18:48] render: lost time: 38951913 (0 frames)
[12:18:48] render: gained time: 38951913 (51828 frames) (0 not accounted for)
[12:18:48] mpeg2 done: 100095 frames
x264 [info]: frame I:518   Avg QP:19.93  size: 60367  PSNR Mean Y:47.37 U:53.33 V:53.50 Avg:48.53 Global:47.50
x264 [info]: frame P:25350 Avg QP:23.04  size: 18156  PSNR Mean Y:45.77 U:51.81 V:52.07 Avg:46.93 Global:45.45
x264 [info]: frame B:61254 Avg QP:25.84  size:  4743  PSNR Mean Y:44.85 U:51.64 V:51.84 Avg:46.08 Global:44.45
x264 [info]: consecutive B-frames:  2.1%  4.8% 23.3% 69.9%
x264 [info]: mb I  I16..4: 20.4% 66.9% 12.7%
x264 [info]: mb P  I16..4:  2.8%  5.9%  0.4%  P16..4: 39.3% 17.0%  9.5%  0.0%  0.0%    skip:25.0%
x264 [info]: mb B  I16..4:  0.2%  0.4%  0.0%  B16..8: 33.3%  4.5%  0.9%  direct: 2.9%  skip:57.7%  L0:41.0% L1:52.9% BI: 6.1%
x264 [info]: 8x8 transform intra:65.6% inter:78.2%
x264 [info]: direct mvs  spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 53.8% 33.1% 7.4% inter: 13.2% 6.6% 0.1%
x264 [info]: i16 v,h,dc,p: 45% 23% 12% 20%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6% 12% 10%  8% 13% 10% 16%  9% 16%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8% 13%  6%  7% 13% 11% 16%  9% 16%
x264 [info]: i8c dc,h,v,p: 51% 29% 13%  7%
x264 [info]: Weighted P-Frames: Y:3.9% UV:1.1%
x264 [info]: ref P L0: 56.9% 14.8% 19.5%  6.9%  1.8%  0.0%
x264 [info]: ref B L0: 87.0% 10.3%  2.7%
x264 [info]: ref B L1: 94.5%  5.5%
x264 [info]: SSIM Mean Y:0.9820598 (17.462db)
x264 [info]: PSNR Mean Y:45.135 U:51.703 V:51.914 Avg:46.342 Global:44.736 kb/s:1873.32
[12:18:48] muxmp4: optimizing file
[12:19:18] mux: track 0, 87122 frames, 782036290 bytes, 1873.20 kbps, fifo 4096
[12:19:18] mux: track 1, 104372 frames, 160314624 bytes, 384.00 kbps, fifo 4096
[12:19:18] mux: track 2, 539 frames, 21867 bytes, 0.05 kbps, fifo 32
[12:19:18] stream: 100097 good frames, 0 errors (0%)
[12:19:18] libhb: work result = 0

Faster Encode - average 40.480061 fps

Code: Select all

HandBrake Activity Log for /Volumes/Encoded/Atlas.m4v: 2013-01-26 02:05:02 -0800
Handbrake Version: 5202svn x86_64 (2013012601)

[02:05:02] macgui: getNextPendingQueueIndex next pending encode index is:1
[02:05:02] macgui: incrementQueueItemDone new pending items found: 1
[02:05:02] macgui: scanning specifically for title: 3
[02:05:02] hb_scan: path=/Volumes/TS/Atlas.ts, title_index=3
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Volumes/TS/Atlas.ts/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Volumes/TS/Atlas.ts/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:1725: nav_get_title_list(/Volumes/TS/Atlas.ts) failed (0x121c57000)
[02:05:02] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[02:05:02] dvd: not a dvd - trying as a stream/file instead
[02:05:02] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[02:05:02] Found the following PIDS
[02:05:02]     Video PIDS : 
[02:05:02]       0x10ac type MPEG2 (0x2) (PCR)
[02:05:02]     Audio PIDS : 
[02:05:02]       0x10ad type AC3 (0x81)
[02:05:02]     Subtitle PIDS : 
[02:05:02]     Other PIDS : 
[02:05:02] stream id 0x10ad (type 0x81 substream 0x0) audio 0x10ad
[02:05:04] scan: decoding previews for title 1
[02:05:04] scan: audio 0x10ad: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[02:05:04] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 4/0/0/4, aspect 16:9, PAR 1:1
[02:05:04] stream: 15 good frames, 0 errors (0%)
[02:05:05] libhb: scan thread found 1 valid title(s)
[02:05:05] macgui: ScanDone state received from fQueueEncodeLibhb
[02:05:05] macgui: Preset: 720p AC3 x264 ME30 Default KF Big File Web Optimized
[02:05:05] macgui: processNewQueueEncode number of passes expected is: 1
[02:05:05] macgui: Start / Stop set to chapters
[02:05:05] macgui: prepareJob exiting
[02:05:05] 1 job(s) to process
[02:05:05] starting job
[02:05:05] yadif thread started for segment 1
[02:05:05] yadif thread started for segment 0
[02:05:05] yadif thread started for segment 5
[02:05:05] yadif thread started for segment 4
[02:05:05] yadif thread started for segment 7
[02:05:05] yadif thread started for segment 2
[02:05:05] yadif thread started for segment 3
[02:05:05] yadif thread started for segment 8
[02:05:05] yadif thread started for segment 6
[02:05:05] yadif thread started for segment 9
[02:05:05] yadif thread started for segment 10
[02:05:05] yadif thread started for segment 11
[02:05:05] decomb filter thread started for segment 0
[02:05:05] decomb filter thread started for segment 1
[02:05:05] decomb filter thread started for segment 2
[02:05:05] decomb filter thread started for segment 3
[02:05:05] decomb filter thread started for segment 4
[02:05:05] decomb filter thread started for segment 5
[02:05:05] decomb filter thread started for segment 6
[02:05:05] decomb filter thread started for segment 7
[02:05:05] decomb filter thread started for segment 8
[02:05:05] decomb filter thread started for segment 9
[02:05:05] decomb filter thread started for segment 10
[02:05:05] decomb filter thread started for segment 11
[02:05:05] decomb check thread started for segment 0
[02:05:05] decomb check thread started for segment 1
[02:05:05] decomb check thread started for segment 2
[02:05:05] decomb check thread started for segment 3
[02:05:05] decomb check thread started for segment 4
[02:05:05] decomb check thread started for segment 5
[02:05:05] decomb check thread started for segment 6
[02:05:05] decomb check thread started for segment 7
[02:05:05] decomb check thread started for segment 8
[02:05:05] decomb check thread started for segment 9
[02:05:05] decomb check thread started for segment 10
[02:05:05] decomb check thread started for segment 11
[02:05:05] mask filter thread started for segment 0
[02:05:05] mask filter thread started for segment 1
[02:05:05] mask filter thread started for segment 2
[02:05:05] mask filter thread started for segment 3
[02:05:05] mask filter thread started for segment 4
[02:05:05] mask filter thread started for segment 5
[02:05:05] mask filter thread started for segment 6
[02:05:05] mask filter thread started for segment 7
[02:05:05] mask filter thread started for segment 8
[02:05:05] mask filter thread started for segment 9
[02:05:05] mask filter thread started for segment 10
[02:05:05] mask filter thread started for segment 11
[02:05:05] mask erode thread started for segment 0
[02:05:05] mask erode thread started for segment 1
[02:05:05] mask erode thread started for segment 2
[02:05:05] mask erode thread started for segment 3
[02:05:05] mask erode thread started for segment 4
[02:05:05] mask erode thread started for segment 5
[02:05:05] mask erode thread started for segment 6
[02:05:05] mask erode thread started for segment 7
[02:05:05] mask erode thread started for segment 8
[02:05:05] mask erode thread started for segment 9
[02:05:05] mask erode thread started for segment 10
[02:05:05] mask erode thread started for segment 11
[02:05:05] mask dilate thread started for segment 0
[02:05:05] mask dilate thread started for segment 1
[02:05:05] mask dilate thread started for segment 2
[02:05:05] mask dilate thread started for segment 3
[02:05:05] mask dilate thread started for segment 4
[02:05:05] mask dilate thread started for segment 5
[02:05:05] mask dilate thread started for segment 6
[02:05:05] mask dilate thread started for segment 7
[02:05:05] mask dilate thread started for segment 8
[02:05:05] mask dilate thread started for segment 9
[02:05:05] mask dilate thread started for segment 10
[02:05:05] mask dilate thread started for segment 11
[02:05:05] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[02:05:05] Auto Passthru: fallback is AC3 (ffmpeg)
[02:05:05] Auto Passthru: using AC3 Passthru for track 1
[02:05:05] sync: expecting 165382 video frames
[02:05:05] job configuration:
[02:05:05]  * source
[02:05:05]    + /Volumes/TS/Atlas.ts
[02:05:05]    + title 1, chapter(s) 1 to 1
[02:05:05]  * destination
[02:05:05]    + /Volumes/Encoded/Atlas.m4v
[02:05:05]    + container: MPEG-4 (.mp4 and .m4v)
[02:05:05]      + 64-bit formatting
[02:05:05]      + optimized for progressive web downloads
[02:05:05]  * video track
[02:05:05]    + decoder: mpeg2
[02:05:05]      + bitrate 16000 kbps
[02:05:05]    + frame rate: same as source (around 29.970 fps)
[02:05:05]    + filters
[02:05:05]      + Detelecine (pullup) (default settings)
[02:05:05]      + Decomb (default settings)
[02:05:05]      + Framerate Shaper (0:27000000:900900)
[02:05:05]        + frame rate: same as source (around 29.970 fps)
[02:05:05]      + Crop and Scale (1280:720:0:0:0:0)
[02:05:05]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1280 * 720
[02:05:05]    + loose anamorphic
[02:05:05]      + storage dimensions: 1280 * 720, mod 16
[02:05:05]      + pixel aspect ratio: 1 / 1
[02:05:05]      + display dimensions: 1280 * 720
[02:05:05]    + encoder: H.264 (x264)
[02:05:05]      + quality: 22.00 (RF)
[02:05:05]  * subtitle track 1, Closed Captions (track 0, id 0x0) Text [CC] -> Passthrough
[02:05:05]  * audio track 1
[02:05:05]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x10ad)
[02:05:05]      + bitrate: 384 kbps, samplerate: 48000 Hz
[02:05:05]    + AC3 Passthru
[02:05:05] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[02:05:05] reader: first SCR 912 id 0x10ad DTS 36827
[02:05:05] encx264: min-keyint: 30, keyint: 300
[02:05:05] encx264: encoding with stored aspect 1/1
[02:05:05] encx264: Encoding at constant RF 22.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[02:05:05] mpeg2: "Chapter 1" (1) at frame 0 time 0
x264 [info]: profile High, level 3.1
[03:12:54] hb_ts_stream_decode - eof
[03:12:54] reader: done. 1 scr changes
[03:12:55] work: average encoding speed for job is 40.480061 fps
[03:12:55] sync: got 164752 frames, 165382 expected
[03:12:56] decomb: deinterlaced 68142 | blended 11986 | unfiltered 62367 | total 142495
[03:12:56] render: lost time: 66834768 (0 frames)
[03:12:56] render: gained time: 66834768 (89012 frames) (0 not accounted for)
[03:12:56] mpeg2 done: 164752 frames
x264 [info]: frame I:1677  Avg QP:19.77  size: 70065  PSNR Mean Y:46.29 U:48.51 V:49.48 Avg:46.97 Global:46.23
x264 [info]: frame P:67562 Avg QP:22.85  size: 21209  PSNR Mean Y:43.82 U:46.03 V:47.21 Avg:44.51 Global:43.62
x264 [info]: frame B:73256 Avg QP:24.73  size:  5347  PSNR Mean Y:42.94 U:45.66 V:46.79 Avg:43.73 Global:42.87
x264 [info]: consecutive B-frames: 17.5% 37.1% 14.2% 31.1%
x264 [info]: mb I  I16..4: 11.3% 69.8% 18.9%
x264 [info]: mb P  I16..4:  3.1%  9.6%  1.3%  P16..4: 44.9% 14.1%  8.3%  0.0%  0.0%    skip:18.7%
x264 [info]: mb B  I16..4:  0.1%  0.6%  0.1%  B16..8: 36.8%  3.4%  0.8%  direct: 2.5%  skip:55.7%  L0:37.5% L1:56.6% BI: 5.9%
x264 [info]: 8x8 transform intra:69.1% inter:78.9%
x264 [info]: coded y,uvDC,uvAC intra: 59.2% 75.6% 40.5% inter: 19.9% 29.3% 2.8%
x264 [info]: i16 v,h,dc,p: 37% 23%  7% 33%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 18% 18%  6%  8%  8%  8%  7%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 21% 11%  6%  9%  9%  8%  7%  6%
x264 [info]: i8c dc,h,v,p: 49% 23% 20%  8%
x264 [info]: Weighted P-Frames: Y:3.9% UV:2.2%
x264 [info]: ref P L0: 61.0% 14.2% 17.2%  7.3%  0.2%
x264 [info]: ref B L0: 86.2% 12.1%  1.6%
x264 [info]: ref B L1: 95.8%  4.2%
x264 [info]: SSIM Mean Y:0.9792951 (16.839db)
x264 [info]: PSNR Mean Y:43.399 U:45.871 V:47.026 Avg:44.144 Global:43.246 kb/s:2826.38
[03:12:56] muxmp4: optimizing file
[03:14:03] mux: track 0, 142495 frames, 1942081410 bytes, 2826.24 kbps, fifo 2048
[03:14:03] mux: track 1, 171791 frames, 263870976 bytes, 384.00 kbps, fifo 2048
[03:14:03] mux: track 2, 2834 frames, 75030 bytes, 0.11 kbps, fifo 64
[03:14:03] stream: 164754 good frames, 0 errors (0%)
[03:14:03] libhb: work result = 0
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by Smithcraft »

Doesn't look like the same settings to me...

SC
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by Frank »

As noted in my original post I always did use the same preset. Click on the preset, set subtitle (since subtitle doesn't stick in the presets on the Mac version) and let it do its thing.

Now that I've found the few that were encoded quite a bit more quickly than before I see that the applied settings are different though I applied the same preset.

So that 'problem' of 'why' is solved… the encodings are using different settings… as indicated by the logs above and in the first post:
Diffs:

Fast

Code: Select all

ref=3 / me=hex / subme=7 / slices = default / rc_lookahead=40
Slow

Code: Select all

ref=4 / me=tesa / subme=10 / slices = 4 / rc_lookahead=50  vbv_maxrate=40000 	 vbv_bufsize=30000 	 crf_max=0.0 	 nal_hrd=none 
So my final question is the one that I have yet to resolve…
Given that I'm working with cable-co processed MPEG-2TS files, is the 'slow setting' excessive? I'm aiming to reduce the file size as much as possible (hence 1080-720 size reduction) but I wonder about the quality differences I will see with these settings at 'max' vs 'fast'? (as described below)
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by mduell »

Frank wrote:So my final question is the one that I have yet to resolve…
Given that I'm working with cable-co processed MPEG-2TS files, is the 'slow setting' excessive? I'm aiming to reduce the file size as much as possible (hence 1080-720 size reduction) but I wonder about the quality differences I will see with these settings at 'max' vs 'fast'? (as described below)
Any previous encoding is irrelevant. x264 starts from the decoded frame.

Below the default of medium, you're not gaining much compression for the speed you're giving up.
ty2010
Novice
Posts: 72
Joined: Mon Feb 18, 2013 7:09 am

Re: Whoa.. was I dreaming? x264 speed increase ?

Post by ty2010 »

Given the resize quality and slow encode I went to 536 and it's almost indistinguishable from 720 on my hardware. Mod 4 is a bit slower and inefficient to store so I clip 4 top and bottom, fast deinterlace (field discard) and resize to 536x960 or 536x720. ~90FPS encoding on 3 main profile w/ 16 lookahead and 4 ref.
Post Reply