List of new x264 options added to 0.9.5

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

List of new x264 options added to 0.9.5

Post by tokyotech »

Can someone please tell me the list of new x264 options added to 0.9.5 which are not backwards compatible with older h264 decoders? For one, I noticed that weighted P frames were turned on by default causing some old media players (namely VLC 0.8.6) to play videos almost 90% gray. So I turned them off and the grayness was gone. Now I noticed that the framerate is not consistent when played back on the old media player. Videos stutter ever so slightly every second or so - bearable but causes headaches after prolonged viewing.

With 0.9.4, I had to do the following to get video to play well in VLC 0.8.6:

Code: Select all

b-adapt=2:rc-lookahead=60:direct=auto:me=umh:vbv-maxrate=2000:vbv-bufsize=4000:trellis=2:8x8dct=0:no-fast-pskip=1:ref=5:merange=24:subq=9:bframes=5:b-pyramid=none
Pasting in the same code with weightp=0 tagged to the end does not produce perfectly smooth videos in 0.9.5. And before anyone asks why I'm still using VLC 0.8.6, it's not for personal use. There's this old browser plugin that's based on this version of VLC that I must use.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: List of new x264 options added to 0.9.5

Post by TedJ »

Handbrake 0.9.4 incorrectly flagged variable framerate (VFR) streams as constant framerate (CFR). This was corrected in 0.9.5 and seems to cause some issues with degenerate decoders. Try setting an explicit framerate rather than "same as source" in your next encode.
Deleted User 11865

Re: List of new x264 options added to 0.9.5

Post by Deleted User 11865 »

FWIW, 0.9.4 already had weightp enabled. There was a change to weightp 2 in x264 r1555 that breaks a few more players than it used to.

Also, b-pyramid=none is not necessary for 0.9.4: b-pyramid was off by default, and the version of x264 that shipped with 0.9.4 also still had the old b-pyramid (0 or 1; none/strict/normal are not accepted as parameters).
It is required when using 0.9.5, however, if VLC 0.8.6 doesn't support b-pyramid.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: List of new x264 options added to 0.9.5

Post by tokyotech »

Turning off Pyramidal B frames while transcoding in VLC 1.1.5 fixed the flickery problem when played back in old VLC. (Note that there is no hyphen in the parameter name)

#transcode{vb=750, venc=x264{weightp=0, bpyramid=none}, vcodec=h264, acodec=mp3, ab=96, channels=2, threads=2}:duplicate{dst=standard{access=http, mux=asf, dst=127.0.0.1:1234}}

However, doing the same in Handbrake 0.9.5 did not fix the issue. The video was still jittery when played in old VLC. The video jumps a lot during camera pans. It's as though Pyramidal B frames were not even turned off.

mixed-refs=0:8x8dct=0:trellis=2:b-adapt=2:direct=auto:me=umh:no-fast-pskip=1:merange=32:ref=5:subq=9:vbv-maxrate=2000:vbv-bufsize=4000:rc-lookahead=60:bframes=5:b-pyramid=none:weightp=0

Encode

Code: Select all

# Windows GUI 0.9.5 2011010300
# Running: Microsoft Windows NT 6.1.7600.0
# CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
# Ram: 6135 MB
# Screen: 1680x1050
# Temp Dir: C:\Users\username\AppData\Local\Temp\
# Install Dir: C:\Program Files (x86)\Handbrake
# Data Dir: C:\Users\username\AppData\Roaming\HandBrake\HandBrake\0.9.5.3728

# CLI Query:  -i "E:\Videos\Movies\movie.avi" -t 1 --start-at duration:1000 --stop-at duration:100 -o "C:\Users\username\Desktop\movie.mp4"  -f mp4 -w 960 -l 416 -e x264 -b 900 -2  -a 1 -E faac -6 stereo -R Auto -B 96 -D 0.0 -x mixed-refs=0:8x8dct=0:trellis=2:b-adapt=2:direct=auto:me=umh:no-fast-pskip=1:merange=32:ref=5:subq=9:vbv-maxrate=2000:vbv-bufsize=4000:rc-lookahead=60:bframes=5:b-pyramid=none:weightp=0 --verbose=1
# User Query: False
-------------------------------------------

[13:19:58] hb_init: checking cpu count
[13:19:58] hb_init: starting libhb thread
HandBrake 0.9.5 (2011010300) - MinGW i386 - http://handbrake.fr
8 CPUs detected
Opening E:\Videos\Movies\movie.avi...
[13:19:58] hb_scan: path=E:\Videos\Movies\movie.avi, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening E:\Videos\Movies\movie.avi/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(E:\Videos\Movies\movie.avi) failed (0x1b6a008)
[13:19:58] 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
[13:19:58] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'E:\Videos\Movies\movie.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 02:01:08.60, start: 0.000000, bitrate: 3055 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
[13:19:58] scan: decoding previews for title 1
[13:19:58] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
Scanning title 1...
[13:19:58] scan: 10 previews, 1280x544, 23.976 fps, autocrop = 0/0/0/0, aspect 2.35:1, PAR 1:1
[13:19:58] scan: title (0) job->width:1280, job->height:544
[13:19:58] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: E:\Videos\Movies\movie.avi
  + duration: 02:01:08
  + size: 1280x544, pixel aspect: 1/1, display aspect: 2.35, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:01:08
  + audio tracks:
    + 1, Unknown (AC3) (5.1 ch) (iso639-2: und), 48000Hz, 448000bps
  + subtitle tracks:
[13:19:58] 2 job(s) to process
[13:19:58] starting job
[13:19:58] sync: expecting 2421 video frames
[13:19:58] job configuration:
[13:19:58]  * source
[13:19:58]    + E:\Videos\Movies\movie.avi
[13:19:58]    + title 1, chapter(s) 1 to 1
[13:19:58]    + container: avi
[13:19:58]    + data rate: 3055 kbps
[13:19:58]  * destination
[13:19:58]    + C:\Users\username\Desktop\movie.mp4
[13:19:58]    + container: MPEG-4 (.mp4 and .m4v)
[13:19:58]  * video track
[13:19:58]    + decoder: mpeg4
[13:19:58]    + frame rate: same as source (around 23.976 fps)
[13:19:58]    + dimensions: 1280 * 544 -> 960 * 416, crop 0/0/0/0, mod 0
[13:19:58]    + encoder: x264
[13:19:58]      + options: mixed-refs=0:8x8dct=0:trellis=2:b-adapt=2:direct=auto:me=umh:no-fast-pskip=1:merange=32:ref=5:subq=9:vbv-maxrate=2000:vbv-bufsize=4000:rc-lookahead=60:bframes=5:b-pyramid=none:weightp=0
[13:19:58]      + bitrate: 900 kbps, pass: 1
[13:19:58]  * audio track 0
[13:19:58]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 1)
[13:19:58]      + bitrate: 448 kbps, samplerate: 48000 Hz
[13:19:58]    + mixdown: Stereo
[13:19:58]    + encoder: faac
[13:19:58]      + bitrate: 96 kbps, samplerate: 48000 Hz
[13:19:58] encx264: min-keyint: auto (23), keyint: 240
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[13:19:58] reader: first SCR 89958718 id 1 DTS 89958718
[13:19:58] output track 0: ac3 in sync after skipping 598 bytes
[13:19:58] sync: video time didn't advance - dropped 2 frames (delta 82 ms, current 7508, next 7553, dur 45)
[13:19:58] sync: video time didn't advance - dropped 1 frames (delta 41 ms, current 7553, next 11262, dur 3709)
[13:21:42] sync: reached pts 9001553, exiting early
[13:21:47] work: average encoding speed for job is 23.104456 fps
[13:21:47] reader: done. 1 scr changes
[13:21:47] sync: got 2406 frames, 2421 expected
[13:21:47] mpeg4-decoder done: 3673 frames, 0 decoder errors, 0 drops
[13:21:47] render: lost time: 0 (0 frames)
[13:21:47] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:24    Avg QP:20.38  size: 44462  PSNR Mean Y:43.88 U:47.15 V:47.48 Avg:44.75 Global:44.12
x264 [info]: frame P:1205  Avg QP:23.07  size:  7179  PSNR Mean Y:42.08 U:45.76 V:46.16 Avg:43.01 Global:41.96
x264 [info]: frame B:1177  Avg QP:29.36  size:  1169  PSNR Mean Y:42.02 U:46.03 V:46.40 Avg:42.99 Global:41.45
x264 [info]: consecutive B-frames:  3.2% 91.3%  4.2%  1.3%  0.0%  0.0%
x264 [info]: mb I  I16..4: 23.6%  0.0% 76.4%
x264 [info]: mb P  I16..4:  1.7%  0.0%  2.2%  P16..4: 47.6% 14.7%  7.3%  0.0%  0.0%    skip:26.4%
x264 [info]: mb B  I16..4:  0.2%  0.0%  0.3%  B16..8: 24.7%  2.3%  0.6%  direct: 1.3%  skip:70.6%  L0:22.7% L1:67.8% BI: 9.5%
x264 [info]: final ratefactor: 22.53
x264 [info]: direct mvs  spatial:97.4% temporal:2.6%
x264 [info]: coded y,uvDC,uvAC intra: 69.1% 77.6% 52.4% inter: 11.8% 13.3% 2.1%
x264 [info]: i16 v,h,dc,p: 38% 30% 11% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 11%  9%  8% 11% 12% 11% 11% 13%
x264 [info]: i8c dc,h,v,p: 33% 30% 26% 11%
x264 [info]: ref P L0: 75.0% 12.6%  7.0%  2.8%  2.6%
x264 [info]: ref B L0: 93.4%  3.9%  1.9%  0.8%
x264 [info]: SSIM Mean Y:0.9811104 (17.238db)
x264 [info]: PSNR Mean Y:42.068 U:45.905 V:46.287 Avg:43.021 Global:41.719 kb/s:887.29
[13:21:47] starting job
[13:21:47] sync: expecting 2406 video frames
[13:21:47] job configuration:
[13:21:47]  * source
[13:21:47]    + E:\Videos\Movies\movie.avi
[13:21:47]    + title 1, chapter(s) 1 to 1
[13:21:47]    + container: avi
[13:21:47]    + data rate: 3055 kbps
[13:21:47]  * destination
[13:21:47]    + C:\Users\username\Desktop\movie.mp4
[13:21:47]    + container: MPEG-4 (.mp4 and .m4v)
[13:21:47]  * video track
[13:21:47]    + decoder: mpeg4
[13:21:47]    + frame rate: same as source (around 23.976 fps)
[13:21:47]    + dimensions: 1280 * 544 -> 960 * 416, crop 0/0/0/0, mod 0
[13:21:47]    + encoder: x264
[13:21:47]      + options: mixed-refs=0:8x8dct=0:trellis=2:b-adapt=2:direct=auto:me=umh:no-fast-pskip=1:merange=32:ref=5:subq=9:vbv-maxrate=2000:vbv-bufsize=4000:rc-lookahead=60:bframes=5:b-pyramid=none:weightp=0
[13:21:47]      + bitrate: 900 kbps, pass: 2
[13:21:47]  * audio track 0
[13:21:47]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 1)
[13:21:47]      + bitrate: 448 kbps, samplerate: 48000 Hz
[13:21:47]    + mixdown: Stereo
[13:21:47]    + encoder: faac
[13:21:47]      + bitrate: 96 kbps, samplerate: 48000 Hz
[13:21:47] encx264: min-keyint: auto (24), keyint: 240
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[13:21:47] reader: first SCR 89958718 id 1 DTS 89958718
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[13:21:47] output track 0: ac3 in sync after skipping 598 bytes
[13:21:47] sync: video time didn't advance - dropped 2 frames (delta 82 ms, current 7508, next 7553, dur 45)
[13:21:47] sync: video time didn't advance - dropped 1 frames (delta 41 ms, current 7553, next 11262, dur 3709)
[13:23:20] sync: reached pts 9001553, exiting early
[13:23:22] work: average encoding speed for job is 25.783243 fps
[13:23:22] sync: got 2406 frames, 2406 expected
[13:23:22] reader: done. 1 scr changes
[13:23:22] mpeg4-decoder done: 2864 frames, 0 decoder errors, 0 drops
[13:23:22] render: lost time: 0 (0 frames)
[13:23:22] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:24    Avg QP:20.60  size: 43627  PSNR Mean Y:43.71 U:46.97 V:47.34 Avg:44.58 Global:44.43
x264 [info]: frame P:1205  Avg QP:22.97  size:  7243  PSNR Mean Y:42.13 U:45.72 V:46.12 Avg:43.06 Global:42.79
x264 [info]: frame B:1177  Avg QP:29.27  size:  1235  PSNR Mean Y:42.08 U:46.00 V:46.37 Avg:43.05 Global:42.27
x264 [info]: consecutive B-frames:  3.2% 91.3%  4.2%  1.3%  0.0%  0.0%
x264 [info]: mb I  I16..4: 24.6%  0.0% 75.4%
x264 [info]: mb P  I16..4:  1.7%  0.0%  2.3%  P16..4: 47.6% 14.8%  7.3%  0.0%  0.0%    skip:26.3%
x264 [info]: mb B  I16..4:  0.2%  0.0%  0.3%  B16..8: 25.4%  2.5%  0.6%  direct: 1.3%  skip:69.6%  L0:23.0% L1:66.5% BI:10.6%
x264 [info]: direct mvs  spatial:90.1% temporal:9.9%
x264 [info]: coded y,uvDC,uvAC intra: 70.6% 78.9% 52.9% inter: 12.0% 13.5% 2.0%
x264 [info]: i16 v,h,dc,p: 38% 30% 11% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 11%  8%  8% 11% 12% 11% 11% 13%
x264 [info]: i8c dc,h,v,p: 32% 30% 26% 12%
x264 [info]: ref P L0: 74.8% 12.6%  7.2%  3.1%  2.3%
x264 [info]: ref B L0: 93.5%  3.9%  1.9%  0.7%
x264 [info]: SSIM Mean Y:0.9827328 (17.628db)
x264 [info]: PSNR Mean Y:42.122 U:45.873 V:46.256 Avg:43.067 Global:42.543 kb/s:898.08
[13:23:22] mux: track 0, 2406 frames, 11227095 bytes, 898.01 kbps, fifo 8
[13:23:22] mux: track 1, 4688 frames, 1200225 bytes, 96.00 kbps, fifo 256
[13:23:22] libhb: work result = 0
Rip done!
HandBrake has exited.
Scan

Code: Select all

# Windows GUI 0.9.5 2011010300
# Running: Microsoft Windows NT 6.1.7600.0
# CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
# Ram: 6135 MB
# Screen: 1680x1050
# Temp Dir: C:\Users\username\AppData\Local\Temp\
# Install Dir: C:\Program Files (x86)\Handbrake
# Data Dir: C:\Users\username\AppData\Roaming\HandBrake\HandBrake\0.9.5.3728

-------------------------------------------

Query:  -i "E:\Videos\Movies\movie.avi" -t0  -v 
[13:18:51] hb_init: checking cpu count
[13:18:51] hb_init: starting libhb thread
HandBrake 0.9.5 (2011010300) - MinGW i386 - http://handbrake.fr
8 CPUs detected
Opening E:\Videos\Movies\movie.avi...
[13:18:51] hb_scan: path=E:\Videos\Movies\movie.avi, title_index=0
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening E:\Videos\Movies\movie.avi/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(E:\Videos\Movies\movie.avi) failed (0x19f94c8)
[13:18:51] 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
[13:18:51] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'E:\Videos\Movies\movie.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
  Duration: 02:01:08.60, start: 0.000000, bitrate: 3055 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
[13:18:51] scan: decoding previews for title 1
[13:18:51] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
Scanning title 1 of 1...
[13:18:52] scan: 10 previews, 1280x544, 23.976 fps, autocrop = 0/0/0/0, aspect 2.35:1, PAR 1:1
[13:18:52] scan: title (0) job->width:1280, job->height:544
[13:18:52] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: E:\Videos\Movies\movie.avi
  + duration: 02:01:08
  + size: 1280x544, pixel aspect: 1/1, display aspect: 2.35, 23.976 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 02:01:08
  + audio tracks:
    + 1, Unknown (AC3) (5.1 ch) (iso639-2: und), 48000Hz, 448000bps
  + subtitle tracks:
HandBrake has exited.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: List of new x264 options added to 0.9.5

Post by TedJ »

Code: Select all

[13:21:47]    + frame rate: same as source (around 23.976 fps)
Did you try setting a hard framerate as I suggested in my earlier post? It's possible that VLC 0.8.6 does not like VFR encodes.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: List of new x264 options added to 0.9.5

Post by tokyotech »

You are right. VFR was the problem. It seems like most videos are in VFR because I havn't gotten a single one of my transcodes to play smoothly in old VLC with the "same as source' setting.
Post Reply