Solved Issue 10-bit h264 (Hi10) Support?

  Thread Rating:
  • 7 Votes - 4.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Ned Scott Offline
Team-XBMC Wiki Guy
Posts: 12,041
Joined: Jan 2011
Reputation: 132
Location: Arizona, USA
Post: #361
A patch is already waiting in the wings that has the FFmpeg bump, so keep an eye out on the nightly builds when they start up again. The wiki page will also be updated when that is merged to nightlies.

You can make easy links to the XBMC wiki using double brackets around words: [[debug log]] = debug log, [[Add-on:YouTube]] = Add-on:YouTube, [[Adding videos to the library]] = Adding videos to the library, [[userdata]] = userdata, etc
find quote
enolive Offline
Junior Member
Posts: 16
Joined: May 2011
Reputation: 0
Post: #362
Hi there!

Any suggestions which tools/options I should use for transcoding 10 to 8 Bit? My goal is to write a small shell script that can batch convert exclusive Hi10p stuff to something I can enjoy on my XBMC 11.0 box Wink. I've tried to compile XBMC myself only to notice that I won't get any hw acceleration, so this is no satisfying option for me (at least not for Hi10p 1080p stuff).

Right now, I use the following commands for conversion (using both x264 and mkvtoolnix from the ubuntu repos):

x264 --threads=auto --tune animation --preset veryfast --profile high --level 4.1 --crf 16 -o "$TEMPFILE" "$INPUT"
mkvmerge -o "$OUTPUT" -D "$INPUT" "$TEMPFILE"
find quote
magao Online
Senior Member
Posts: 117
Joined: Sep 2008
Reputation: 1
Post: #363
I just leave Handbrake open with my "Anime" settings. I download things to "...\<Show name>\10-bit" folders, so I just set the default path for automatically named files to "{source_path}\.." and the format to "{source}". So for nearly everything I can just drag the episode into Handbrake and start transcoding.

My actual settings are likely to be very different to yours. They're tuned to get the highest quality (essentially imperceptible difference from source) in a reasonable filesize transcoding at ~25-30FPS for 720p animation on my 4 core/8 thread CPU. That works out to be:

Constant framerate
CRF: 20
Passthrough audio (always - if Handbrake can't passthrough e.g. vorbis I'll discard and remux the orignal in later)
Ref frames: 6
Max. B-frames: 5
Adaptive B-frames: Optimal
Mostion estimation: UHM: 9
psy-rd: 0.50,0.00
Everything else at default.

The reference frames and max b-frames were determined by doing tests at everything from 1 to 16 and seeing where their use tailed off in the logs. Beyond these numbers there was minimal use and filesize reduction, but increased transcoding time.
(This post was last modified: 2012-03-30 23:43 by magao.)
find quote
lad1337 Offline
Junior Member
Posts: 19
Joined: May 2010
Reputation: 0
Post: #364
(2012-03-30 16:42)enolive Wrote:  Hi there!

Any suggestions which tools/options I should use for transcoding 10 to 8 Bit? My goal is to write a small shell script that can batch convert exclusive Hi10p stuff to something I can enjoy on my XBMC 11.0 box Wink. I've tried to compile XBMC myself only to notice that I won't get any hw acceleration, so this is no satisfying option for me (at least not for Hi10p 1080p stuff).

Right now, I use the following commands for conversion (using both x264 and mkvtoolnix from the ubuntu repos):

x264 --threads=auto --tune animation --preset veryfast --profile high --level 4.1 --crf 16 -o "$TEMPFILE" "$INPUT"
mkvmerge -o "$OUTPUT" -D "$INPUT" "$TEMPFILE"

i am very interested in this since something like this might be the only solution for me ...
but i have another problem ... i use an automated system of sb and sab

and it appears that not every release group mentions if it is 10-bit or 8-bit in the title
so what i need is a way to find out if the current file is in 10-bit or 8-bit and act accordingly with either enolive code or another handbrake cli cmd

my question is has anyone figured out a way find out if a file is in 10-bit from the cli ?
find quote
jpsdr Offline
Senior Member
Posts: 260
Joined: Oct 2003
Reputation: 0
Post: #365
Things here : https://github.com/xbmc/xbmc/pull/810 are very promising.
Only hope the version will have the same multi-threading capability as ffdshow to be able to decode without problem 10 bits 1080p high bitrate video. Big Grin
find quote
boingman Offline
Senior Member
Posts: 125
Joined: Apr 2011
Reputation: 0
Post: #366
Yeah, multi threading support is important. Otherwise we'll get frame drops again.
find quote
sereny Offline
Junior Member
Posts: 23
Joined: Dec 2008
Reputation: 0
Post: #367
Indeed, multi-threading is obligatory. Otherwise only i5/i7 users will have a chance at decoding without heavy framedrops.

(Using the old experimental builds for 10bit on my Q6600 results in occasional framedrops even with 720p material, therefore single-threaded decoding is really no good.)
find quote
enolive Offline
Junior Member
Posts: 16
Joined: May 2011
Reputation: 0
Post: #368
(2012-03-31 17:54)lad1337 Wrote:  my question is has anyone figured out a way find out if a file is in 10-bit from the cli ?

mkvinfo displays the used h264 profile in its output, for example (in Shakugan no Shana from SS-Eclipse):

Code:
|  + private Codecdaten, Länge 49 (h.264-Profil: High 10 @L5.1)

btw, here is the shell script I use for transcoding.

http://pastebin.com/2rCh13Pk

@magao: thanks for your reply! I will try out your options in my cli solution later Wink
find quote
Shine Offline
Junior Member
Posts: 22
Joined: Apr 2012
Reputation: 1
Post: #369
(2012-03-31 18:34)jpsdr Wrote:  Things here : https://github.com/xbmc/xbmc/pull/810 are very promising.
Only hope the version will have the same multi-threading capability as ffdshow to be able to decode without problem 10 bits 1080p high bitrate video. :D

So I went ahead and compiled it. The latest commit (a0fc63df94) appears to break multithreading. So I went back to the previous one (3201695872). Multithreading is fine in this build, Hi10P 1080p content using 40-50% CPU on my Q9650 and no frame drops!

From a few quick tests, I found the following additional things to note (no idea whether these are specific to this build or present in 11.0 as well):
  • Vorbis and WMA audio is broken. No sound is playing and the video freezes after a few seconds.
  • MKV aspect ratio tags are finally being honored!!
  • There seems to be a rounding bug or something in the resizer calculations. E.g. a 1920x1038 MKV was resized to 1920x1039, leading to frame drops when using shader or software based scaling. I found only 1 affected file out of a handful tested, so it could as well be specific to this file.
  • Also noticed some ASS subtitle corruption that I'm quite sure hasn't been there before (I was using pre-Eden nightlies including bambi73's builds from this thread)

All in all, pretty promising!
(This post was last modified: 2012-04-01 21:51 by Shine.)
find quote
sereny Offline
Junior Member
Posts: 23
Joined: Dec 2008
Reputation: 0
Post: #370
@shine: Could you upload your compiled build somewhere? I'm really eager to test it and would also like to report my findings, but do not have a build-environment at hand.
find quote
Post Reply