Slow encode... (or do I just need a new computer?)

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
AaronRendahl
Posts: 3
Joined: Sat Feb 10, 2018 5:57 pm

Slow encode... (or do I just need a new computer?)

Post by AaronRendahl »

short version:
I'm getting roughly 5fps encoding speed, for a 1080p file (converting from mpeg to h264). Is this as fast as I can expect on my system, or is there something I'm doing wrong? And if I had a newer system, how fast would I expect a transcode like this to go?

details:
I have an over-the-air broadcast of a 1080p program that I recorded myself using EyeTV (so time-shifting for personal use is legal), and am trying to transcode it from the MPEG Transport Stream to h264 to play back on my Roku over Plex.

I'm running Handbrake 1.0.7, using the "Roku 1080p30 Surround" preset, on a MacBook Pro (13-inch, Early 2011) with a 2.3 GHz Intel Core i5 with 16GB memory, running High Sierra 10.13.3.

The following Activity Log is for a test of encoding only the first 10 seconds, which took about 60 seconds to complete.

For comparison, using the "Very Fast 480p30" preset took about 15 seconds, so faster, but still slower than real-time.

Code: Select all

[11:59:34] macgui: Handbrake Version: 1.0.7  (2017040900)
[11:59:34] hb_init: starting libhb thread
[11:59:34] hb_init: starting libhb thread
[11:59:51] macgui: trying to open a folder or file
[11:59:51] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[11:59:51] CPU: Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
[11:59:51]  - Intel microarchitecture Sandy Bridge
[11:59:51]  - logical processor count: 4
[11:59:51] hb_scan: path=/Users/rendahl/Documents/Olympics/Feb08a-Primetime.mpg, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/rendahl/Documents/Olympics/Feb08a-Primetime.mpg
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[11:59:51] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[11:59:51] dvd: not a dvd - trying as a stream/file instead
[11:59:51] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[11:59:51] Found the following PIDS
[11:59:51]     Video PIDS : 
[11:59:51]       0x31 type MPEG2 (0x2) (PCR)
[11:59:51]     Audio PIDS : 
[11:59:51]       0x34 type AC3 (0x81)
[11:59:51]       0x35 type AC3 (0x81)
[11:59:51]     Subtitle PIDS : 
[11:59:51]     Other PIDS : 
[11:59:51] stream id 0x34 (type 0x81 substream 0x0) audio 0x34
[11:59:51] stream id 0x35 (type 0x81 substream 0x0) audio 0x35
[11:59:51] scan: decoding previews for title 1
[11:59:51] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[11:59:51] scan: audio 0x35: ac3, rate=48000Hz, bitrate=112000 español (AC3) (2.0 ch)
[11:59:51] scan: audio 0x34: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[11:59:52] stream: 14 good frames, 0 errors (0%)
[11:59:52] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 6/0/0/0, aspect 16:9, PAR 1:1
[11:59:52] libhb: scan thread found 1 valid title(s)
[11:59:52] macgui: ScanCore scan done
[12:05:03] macgui: QueueCore scanning specifically for title: 1
[12:05:03] CPU: Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz
[12:05:03]  - Intel microarchitecture Sandy Bridge
[12:05:03]  - logical processor count: 4
[12:05:03] hb_scan: path=/Users/rendahl/Documents/Olympics/Feb08a-Primetime.mpg, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/rendahl/Documents/Olympics/Feb08a-Primetime.mpg
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[12:05:03] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[12:05:03] dvd: not a dvd - trying as a stream/file instead
[12:05:03] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:05:03] Found the following PIDS
[12:05:03]     Video PIDS : 
[12:05:03]       0x31 type MPEG2 (0x2) (PCR)
[12:05:03]     Audio PIDS : 
[12:05:03]       0x34 type AC3 (0x81)
[12:05:03]       0x35 type AC3 (0x81)
[12:05:03]     Subtitle PIDS : 
[12:05:03]     Other PIDS : 
[12:05:03] stream id 0x34 (type 0x81 substream 0x0) audio 0x34
[12:05:03] stream id 0x35 (type 0x81 substream 0x0) audio 0x35
[12:05:03] scan: decoding previews for title 1
[12:05:03] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:05:03] scan: audio 0x35: ac3, rate=48000Hz, bitrate=112000 español (AC3) (2.0 ch)
[12:05:03] scan: audio 0x34: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[12:05:03] stream: 14 good frames, 0 errors (0%)
[12:05:03] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 6/0/0/0, aspect 16:9, PAR 1:1
[12:05:03] libhb: scan thread found 1 valid title(s)
[12:05:03] macgui: QueueCore scan done
[12:05:03] macgui: QueueCore started encoding test1080-GUI.m4v
[12:05:03] macgui: QueueCore with preset Roku 1080p30 Surround
[12:05:03] 1 job(s) to process
[12:05:03] Skipping subtitle scan.  No suitable subtitle tracks.
[12:05:03] starting job
[12:05:03] decomb filter thread started for segment 0
[12:05:03] decomb filter thread started for segment 1
[12:05:03] decomb filter thread started for segment 2
[12:05:03] decomb filter thread started for segment 3
[12:05:03] decomb check thread started for segment 0
[12:05:03] decomb check thread started for segment 1
[12:05:03] decomb check thread started for segment 2
[12:05:03] decomb check thread started for segment 3
[12:05:03] mask filter thread started for segment 0
[12:05:03] mask filter thread started for segment 1
[12:05:03] mask filter thread started for segment 2
[12:05:03] mask filter thread started for segment 3
[12:05:03] mask erode thread started for segment 0
[12:05:03] mask erode thread started for segment 1
[12:05:03] mask erode thread started for segment 2
[12:05:03] mask erode thread started for segment 3
[12:05:03] mask dilate thread started for segment 0
[12:05:03] mask dilate thread started for segment 1
[12:05:03] mask dilate thread started for segment 2
[12:05:03] mask dilate thread started for segment 3
[12:05:03] yadif thread started for segment 0
[12:05:03] yadif thread started for segment 1
[12:05:03] yadif thread started for segment 2
[12:05:03] yadif thread started for segment 3
[12:05:03] work: only 1 chapter, disabling chapter markers
[12:05:03] job configuration:
[12:05:03]  * source
[12:05:03]    + /Users/rendahl/Documents/Olympics/Feb08a-Primetime.mpg
[12:05:03]    + title 1, frames 0 to 299
[12:05:03]  * destination
[12:05:03]    + /Users/rendahl/Documents/Olympics/test1080-GUI.m4v
[12:05:03]    + container: MPEG-4 (libavformat)
[12:05:03]  * video track
[12:05:03]    + decoder: mpeg2video
[12:05:03]      + bitrate 17612 kbps
[12:05:03]    + filters
[12:05:03]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:05:03]      + Decomb (mode=39)
[12:05:03]      + Framerate Shaper (mode=2:rate=27000000/900000)
[12:05:03]        + frame rate: 29.970 fps -> peak rate limited to 30.000 fps
[12:05:03]      + Crop and Scale (width=1920:height=1074:crop-top=6:crop-bottom=0:crop-left=0:crop-right=0)
[12:05:03]        + source: 1920 * 1080, crop (6/0/0/0): 1920 * 1074, scale: 1920 * 1074
[12:05:03]    + Output geometry
[12:05:03]      + storage dimensions: 1920 x 1074
[12:05:03]      + pixel aspect ratio: 1 : 1
[12:05:03]      + display dimensions: 1920 x 1074
[12:05:03]    + encoder: H.264 (libx264)
[12:05:03]      + preset:  medium
[12:05:03]      + profile: high
[12:05:03]      + level:   4.0
[12:05:03]      + quality: 22.00 (RF)
[12:05:03]  * audio track 1
[12:05:03]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x34)
[12:05:03]      + bitrate: 384 kbps, samplerate: 48000 Hz
[12:05:03]    + mixdown: Dolby Pro Logic II
[12:05:03]    + encoder: AAC (Apple AudioToolbox)
[12:05:03]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:05:03]  * audio track 2
[12:05:03]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x34)
[12:05:03]      + bitrate: 384 kbps, samplerate: 48000 Hz
[12:05:03]    + AC3 Passthru
[12:05:03] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[12:05:03] sync: expecting 300 video frames
[12:05:03] encx264: min-keyint: 30, keyint: 300
[12:05:03] encx264: encoding at constant RF 22.000000
[12:05:03] encx264: unparsed options: level=4.0:vbv-bufsize=31250:vbv-maxrate=25000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.0
[12:05:04] sync: first pts audio 0x34 is 0
[12:05:04] sync: first pts audio 0x34 is 0
[12:05:04] sync: first pts video is 53373
[12:05:50] sync: reached video frame 300, exiting early
[12:05:50] sync: reached audio 0x34 pts 956160, exiting early
[12:05:51] sync: reached audio 0x34 pts 956160, exiting early
[12:06:01] work: average encoding speed for job is 6.358193 fps
[12:06:01] comb detect: heavy 299 | light 0 | uncombed 1 | total 300
[12:06:01] decomb: deinterlaced 299 | blended 0 | unfiltered 1 | total 300
[12:06:01] vfr: 300 frames output, 0 dropped and 0 duped for CFR/PFR
[12:06:01] vfr: lost time: 0 (0 frames)
[12:06:01] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:06:01] stream: 659 good frames, 0 errors (0%)
[12:06:01] ac3-decoder done: 655 frames, 0 decoder errors
[12:06:01] ac3-decoder done: 655 frames, 0 decoder errors
[12:06:01] mpeg2video-decoder done: 625 frames, 0 decoder errors
[12:06:01] sync: got 300 frames, 300 expected
[12:06:01] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x264 [info]: frame I:2     Avg QP:16.88  size:105427
x264 [info]: frame P:117   Avg QP:23.24  size: 34404
x264 [info]: frame B:181   Avg QP:23.83  size: 18241
x264 [info]: consecutive B-frames: 12.7% 12.7% 24.0% 50.7%
x264 [info]: mb I  I16..4: 11.3% 76.8% 11.9%
x264 [info]: mb P  I16..4: 19.8% 34.1%  1.4%  P16..4: 29.0%  5.7%  2.1%  0.0%  0.0%    skip: 8.0%
x264 [info]: mb B  I16..4:  3.8%  4.4%  0.2%  B16..8: 38.2%  5.4%  0.5%  direct: 7.7%  skip:39.8%  L0:51.1% L1:46.5% BI: 2.4%
x264 [info]: 8x8 transform intra:60.4% inter:88.7%
x264 [info]: coded y,uvDC,uvAC intra: 30.6% 59.2% 14.1% inter: 17.8% 29.2% 0.6%
x264 [info]: i16 v,h,dc,p: 24% 54%  5% 18%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 38% 25%  2%  2%  2%  3%  2%  2%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 37% 14%  3%  5%  5%  5%  3%  3%
x264 [info]: i8c dc,h,v,p: 53% 25% 19%  3%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 72.5% 10.2% 12.1%  5.1%
x264 [info]: ref B L0: 91.3%  7.4%  1.3%
x264 [info]: ref B L1: 98.2%  1.8%
x264 [info]: kb/s:5687.23
[12:06:02] mux: track 0, 300 frames, 7537642 bytes, 5647.58 kbps, fifo 512
[12:06:02] mux: track 1, 499 frames, 204524 bytes, 153.24 kbps, fifo 512
[12:06:02] mux: track 2, 332 frames, 509952 bytes, 382.08 kbps, fifo 512
[12:06:02] libhb: work result = 0
[12:06:02] macgui: QueueCore work done
[12:06:02] macgui: Queue Done, there are no more pending encodes
Last edited by Anonymous on Sun Feb 11, 2018 6:35 pm, edited 1 time in total.
Reason: Logs in [code][/code] blocks please
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Slow encode... (or do I just need a new computer?)

Post by Woodstock »

Laptops will slow down the processor speed when they get too hot. And they get hot if you run the CPU at 100% for long periods of time.

While you can do encoding on the laptop, it will be much faster with a machine designed to run at 100% indefinitely.
Deleted User 11865

Re: Slow encode... (or do I just need a new computer?)

Post by Deleted User 11865 »

AaronRendahl wrote: Sat Feb 10, 2018 6:25 pm short version:
I'm getting roughly 5fps encoding speed, for a 1080p file (converting from mpeg to h264). Is this as fast as I can expect on my system
You can use a faster x264 preset at the expense of compression efficiency.
Woodstock wrote: Sun Feb 11, 2018 1:15 am Laptops will slow down the processor speed when they get too hot. And they get hot if you run the CPU at 100% for long periods of time.

While you can do encoding on the laptop, it will be much faster with a machine designed to run at 100% indefinitely.
I do all my encodes on a MacBook Pro, and performance is steady from one encode to the next, even overs several days of consecutive encodes. Obviously a desktop-class processor would perform much better, but my point is some laptops can run at 100% for days without performance degrading noticeably.

Perhaps a better explanation for the OP's poor encoding performance is that he's using a 7-year-old dual-core processor ;)
AaronRendahl
Posts: 3
Joined: Sat Feb 10, 2018 5:57 pm

Re: Slow encode... (or do I just need a new computer?)

Post by AaronRendahl »

Thanks for your response, Rodeo. Glad to have you confirm that it was unlikely to just be getting hot; that didn't seem to be the issue here either. I have tried a faster preset but it's still pretty slow. This is the first 1080 encoding I've tried doing, I've done DVD quality before and it's been much faster (though don't have numbers handy).

Anyway, I did figure it was likely that it was my system was old -- but how much faster would a new system be? Do you encode at 1080, and how many fps do you get?
Deleted User 11865

Re: Slow encode... (or do I just need a new computer?)

Post by Deleted User 11865 »

I have an old 15" Sandy Bridge MacBook Pro (same generation as yours, but quad-core). I use the x264 veryslow preset and get between 2 and 3 frames per second, depending on the source. But since it's one of those MBPs with the defective dGPU, I can't really use it for anything else so it's basically dedicated to video encoding.

Standard resolution content such as DVD will encode approximately 5 to 6 times faster due to having that many less pixels to encode.
Post Reply