AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › Broadcom Crystal HD - the Nvidia killer for Linux HTPC?
New Posts  All Forums:Forum Nav:

Broadcom Crystal HD - the Nvidia killer for Linux HTPC? - Page 3

post #61 of 113
I just upgraded to the latest SVN. I now have version r27284.

I tried to play the full 1080p Blu-ray rip of the Star Trek movie, that I transcoded to a mp4 using ffmpeg. First, here are the specs of the file using mediainfo.
Code:
$ mediainfo StarTrek.mp4
General
Complete name                    : StarTrek.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 1.95 GiB
Duration                         : 2h 6mn
Overall bit rate                 : 2 198 Kbps
Writing application              : Lavf52.44.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 2h 6mn
Bit rate mode                    : Variable
Bit rate                         : 2 000 Kbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 23.976 fps
Minimum frame rate               : 4.795 fps
Maximum frame rate               : 23.976 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.040
Stream size                      : 1.77 GiB (91%)
Writing library                  : x264 core 80 r1376 3feaec2
Encoding settings                : cabac=1 / ref=4 / deblock=0:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=0 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=300 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=2000 / ratetol=0.1 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.41 / aq=1:1.00

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : No
Codec ID                         : 40
Duration                         : 2h 6mn
Bit rate mode                    : Variable
Bit rate                         : 192 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Rear: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Stream size                      : 175 MiB (9%)
The video seems to play flawlessly, but there still is an audio sync problem. I then used the audio tool in XBMC to delay the audio one second. This seems to have solved the problem, and the video is now completely watchable!

I am unsure as to what the CPU usage is. I opened up a second terminal window, and ran top. The CPU usage for XBMC.bin hovered around 35%. But when I used the XBMC tool to read the system specs (using the o key), it reports a 55%-60% CPU usage.


post #62 of 113
Thread Starter 
I'm going to build a new svn this weekend too, and then test it.

I also noticed the cpu load values shown inside XBMC when activating debug are weird, I would only trust the values given by 'top'.

I used the XBMC audio delay tool too, to resync the audio to the video, it works fine but it's not very practical since I found the delay varies between movies, so it needs adjusting for each movie... it's a 'better than nothing workaround' but I hope they fixe the audio sync issue with the CrystalHD soon.

BTW, I wonder if it has been reported on the XBMC bug report web site yet, if not I'm going to do a bug report for it.

Edit to add:
There has been another CrystalHD related change in XBMC just a few hours ago, not sure what it means but you might wanna rebuild the latest svn to have it:
http://xbmc.org/trac/changeset/27292
post #63 of 113
Thanks for the heads-up on the new revision. I'm installing it right now.

There may be more updates, as the developers use the weekends to do a lot of the work.
post #64 of 113
Thread Starter 
I tried svn27294 earlier today, but for me it's a step backward, with several files that used to work fine before (unmanipulated M2TS movie files extracted from BDs) now they don't play at all, or rather I get the audio but the video stays stuck on the XBMC menu...

I have downgraded to my previous build (I build them as packages, so it's easy to up/downgrade) for now.

I wish mplayer or vlc or xine had started supporting crystalhd, I would like to have some alternative to xbmc to test.
post #65 of 113
The version I just installed is r27294MS. I am not sure what the MS means, as the previous build had just the M suffix.

I also don't see a lot of improvement in this. The audio on the mp4 file is still off. And I still can't play my recorded HDTV shows. The selection of deinterlacers isn't sufficient to play these files. When I do get smooth video, the picture is very dark. And the audio is very out-of-sync and choppy, and unfixable even with the audio delay function.

It looks like this is the only option for Linux. From reading the XBMC forum threads, this may work much better on an AppleTV. That development seems to be further along.
post #66 of 113
Since my HDTV recordings aren't playable in XBMC, I decided to see how they played in mplayer. Surprisingly, they are actually watchable! There are the deinterlacing artifacts (comb), but it is much better than what XBMC does.

I decided to look into using XvMC. The Intel graphics chip does have this library available, so I set it up. I also re-compiled my mplayer to include XvMC as a -vo option.

Unfortunately, it doesn't seem to want to use the Intel libs. I even downloaded and installed the Intel driver, just to make sure that I had the source, but no difference.

I can play the files, and invoke deinterlacing, using the CPU, but it's usage is in the 90%-100% range. Yet the files play surprisingly smooth, with the audio in sync. Here are the options that worked for me.
Code:
mplayer -vf pp=lb -vc mpeg12 /home/paul/Videos/HowIMetYourMother.mpg
I have also compiled x264 support into mplayer too.

I am going to put the CrystalHD on the backburner, for now, and not spend much more time on it. I do hope that it will mature, maybe 6 months or a year from now.
post #67 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I am going to put the CrystalHD on the backburner, for now, and not spend much more time on it. I do hope that it will mature, maybe 6 months or a year from now.

I think it will be in much less time, 3-6 months at most, probably less.

There have been some more crystalhd related changes today, I might try them tomorrow:

17:56 Changeset [27364] by davilla
[crystalhd] wait until we have several decoded frames before letting …
17:52 Changeset [27363] by davilla
[crystalhd] refactor output handling, wait for decoder startup, then start …
16:30 Changeset [27361] by davilla
[crystalhd] drop CPU percent by not letting output thread free run without …
13:52 Changeset [27355] by davilla
[crystalhd] 1) refactor and simplify codec Decode function. 2) increase …
02:32 Changeset [27349] by wattazoum
add libcrystalhd dependency to the ppa build
post #68 of 113
I actually won't give up that easily. It was just how I felt at the time.

I started looking at the mplayer and Xine mailing list archives for any mention of this card. I found this on the Xine-devel list:

http://sourceforge.net/mailarchive/f...ame=xine-devel
http://sourceforge.net/apps/trac/arc...s/libcrystalhd
http://sourceforge.net/apps/trac/arc...ystalhd/README

I also see that vdpau is now supported in xine.
post #69 of 113
Thread Starter 
Seems lip-sync issues are gone with svn27420 (which I just tested), hurray!

But I have some files that used to play before, that don't play anymore now (or rather one seems to play without crystalhd decoding and the other has only sound, no video), I'm reporting issues directly to Davilla on the XBMC forum:
http://www.xbmc.org/forum/showthread.php?p=500514
post #70 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I

I started looking at the mplayer and Xine mailing list archives for any mention of this card. I found this on the Xine-devel list:

http://sourceforge.net/mailarchive/f...ame=xine-devel
http://sourceforge.net/apps/trac/arc...s/libcrystalhd
http://sourceforge.net/apps/trac/arc...ystalhd/README

I also see that vdpau is now supported in xine.

Thanks for the links.
I have installed xinelib1.2 and built the xine-crystalhd plugin but I'm not sure how to use it, I will have to look into this further.
post #71 of 113
I was going to update last night, but I fell asleep in my recliner instead. I'll do it tonight, then post what I get in that XBMC Forums thread.

If you look at my screenshot in an earlier post, the A/V is 0.039. I'll see what it is after I update.
post #72 of 113
Looks like these things are getting less scarce: Silent PC Review just posted a review for a sample obtained from a US vendor (Logic Supply). It appears to be in stock, and SPCR helpfully included a $10-off coupon code.
post #73 of 113
There is also a $10 off promotion for XBMC users.

http://xbmc.org/forum/showthread.php?t=69384

The promo codes:
XBMC: XBMC10
Silent PC Review: SPCR10

And once again, the card at Logic supply.
http://www.logicsupply.com/products/bcm970012

I don't seem to have any problems with the $22 one I got off of eBay. But it isn't fully supported yet, so I really don't know if it works correctly.
post #74 of 113
A link on the LogicSupply blog lead me to a blog by one of the Linux driver developers, Jarod Wilson. He gives some very interesting details on the development of this driver, and its libraries.

http://wilsonet.com/?cat=10
post #75 of 113
Thread Starter 
Just to add a note that might be useful to others:

I was noticing with my experimental CrystalHD based HTPC (Intel D945GSEJT mobo, Atom N270 cpu, 1GB RAM, Mandriva Linux 2010.0) that any playback of video files never looked 100% smooth, even with DVD backups, which any Atom can handle easily without hardware decoding.

Yesterday I noticed Pulseaudio (which needed no setup, the config worked fine out-of-the-box) using on average 12% cpu during video playback.
So I decided to disable it and guess what, video playback looks 100% smooth now...

So Pulseaudio, even when not giving any configuration headaches is still a useless nuisance and I would still recommend to disable and uninstall it, at least on Atom based systems (on my C2D it has no such effect as the cpu is powerful enough to cope with the extra load induced by Pulseaudio without affecting video smoothness).
post #76 of 113
When I try to uninstall pulseaudio on my netbook it also wants to uninstall this:

ubuntu-netbook-remix

That is the version of Ubuntu that I installed! I don't know if it will even have a desktop if I remove it.
post #77 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

When I try to uninstall pulseaudio on my netbook it also wants to uninstall this:

ubuntu-netbook-remix

That is the version of Ubuntu that I installed! I don't know if it will even have a desktop if I remove it.

I don't have much experience with Ubuntu but on RPM based distros you can use the "--nodeps" flag to uninstall a package ignoring dependencies.
That said I primarily disabled it and uninstalled most of the *pulse* packages, I still left some that had too many dependencies and that don't do any harm (i.e. won't get used) if left on the system (judging from my experience uninstalling pulse for more than 2 years now...).
post #78 of 113
Quote:
Originally Posted by tux99 View Post

Just to add a note that might be useful to others:

I was noticing with my experimental CrystalHD based HTPC (Intel D945GSEJT mobo, Atom N270 cpu, 1GB RAM, Mandriva Linux 2010.0) that any playback of video files never looked 100% smooth, even with DVD backups, which any Atom can handle easily without hardware decoding.

Yesterday I noticed Pulseaudio (which needed no setup, the config worked fine out-of-the-box) using on average 12% cpu during video playback.
So I decided to disable it and guess what, video playback looks 100% smooth now...

So Pulseaudio, even when not giving any configuration headaches is still a useless nuisance and I would still recommend to disable and uninstall it, at least on Atom based systems (on my C2D it has no such effect as the cpu is powerful enough to cope with the extra load induced by Pulseaudio without affecting video smoothness).

Ahh yes, death to pulseaudio. It causes nothing but problems for me.
post #79 of 113
I just tried to disable it, and keep it from respawning. I followed a how-to meant for Ubuntu 9.04. Not only did it not keep it from respawning, when it did respawn it was muted.

Was able to undo my tinkering, so it's back to abnormal.
post #80 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I just tried to disable it, and keep it from respawning. I followed a how-to meant for Ubuntu 9.04. Not only did it not keep it from respawning, when it did respawn it was muted.

Was able to undo my tinkering, so it's back to abnormal.

Unfortunately I can't help you there with Ubuntu.
In Mandriva purely disabling (without uninstalling) Pulseaudio is just a matter of a few mouse-clicks in the Mandriva Control Center (drakconf).

Maybe open a separate thread here in this forum to get more attention to this issue and I'm sure other Ubuntu users will be able to help you.
Getting rid of Pulseaudio is quite important for smooth video playback on an Atom in my experience, that's why I'm suggesting to insist with it.
post #81 of 113
Well, I was able to disable pulseaudio. I followed these guides:

http://n2.nabble.com/How-to-disable-...td3962312.html
http://n2.nabble.com/Re-Ubuntu-s-swi....html#a3886061

And pulseaudio is now definitely gone. But when I now play my .mp4 test clip, top reports that xbmc is now using 90% of the CPU!

I will call this test a failure. I hope that I can undo it, otherwise reinstallation will be necessary. I would try Mandriva, but I don't want to have to learn another distro, at this time.
post #82 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

And pulseaudio is now definitely gone. But when I now play my .mp4 test clip, top reports that xbmc is now using 90% of the CPU!

I doubt that's due to the removal of pulseaudio. sounds more like it's not using crystalhd.
post #83 of 113
Yea, after I replaced pulseaudio, XBMC CPU usage still remains high. I am going to do another update, and see what happens.

Otherwise, I have my Ubuntu-Desktp CD handy. I won't use the Netbook-Remix again. I may download Mandriva, in case I decide to use it. I also have Ubuntu-Studio, an audio studio version of Ubuntu. Since most studio type apps use Jack instead of pulse, I wonder if that would be a better choice.
post #84 of 113
Quote:
Originally Posted by waterhead View Post

Yea, after I replaced pulseaudio, XBMC CPU usage still remains high. I am going to do another update, and see what happens.

Otherwise, I have my Ubuntu-Desktp CD handy. I won't use the Netbook-Remix again. I may download Mandriva, in case I decide to use it. I also have Ubuntu-Studio, an audio studio version of Ubuntu. Since most studio type apps use Jack instead of pulse, I wonder if that would be a better choice.

Stop guessing and verify XBMC is using CrystalHD. To do this, look at ~.xbmc/temp/xbmc.log , if it's using CrystalHD, you will see an indication of this in xbmc.log.

You can kill pulseaudio using "pulseaudio -k", this tells pulseaudio to die and not re-spawn. If you reboot, you will have to do it again.

Also make sure "Component" is disabled in xorg.conf. It also causes issues. This as nothing to do with Component output, it's Xorgs 3d setting. Bad, Xorg, bad.
post #85 of 113
Well, I did a fresh install. Sometimes it's good to start anew.

Before I reinstalled, I updated the XBMC version. I was still finding XBMC was using +50% of the CPU, when not doing anything. It was going up to around 80% when playing a video. That is why I figured that I buggered something up.

I now have version 27551 installed.
Quote:
Originally Posted by sdavilla View Post

Stop guessing and verify XBMC is using CrystalHD. To do this, look at ~.xbmc/temp/xbmc.log , if it's using CrystalHD, you will see an indication of this in xbmc.log.

It appears to be using the CrystalHD:
Code:
ConsoleKit/Manager with interface org.freedesktop.ConsoleKit.Manager and method CanRestart
17:58:45 T:3077924720 M:1885618176  NOTICE: load settings...
17:58:45 T:3077924720 M:1885618176   DEBUG: SECTION:LoadDLL(libcrystalhd.so)
17:58:45 T:3077924720 M:1885618176   DEBUG: Loading: libcrystalhd.so
17:58:47 T:3077924720 M:1852227584    INFO: CrystalHD: device opened
===========================
17:59:03 T:2830154608 M:1815908352  NOTICE: Opening video stream: 0 source: 256
17:59:03 T:2830154608 M:1815908352  NOTICE: Creating video codec with codec id: 28
17:59:03 T:2830154608 M:1815908352    INFO: Trying Broadcom Crystal HD Decoder...
17:59:03 T:2830154608 M:1815908352   DEBUG: FactoryCodec - Video:  - Opening
17:59:03 T:2806967152 M:1815908352   DEBUG: thread start, auto delete: 0
17:59:03 T:2806967152 M:1815908352   DEBUG: CrystalHD: Input Thread Started...
17:59:03 T:2830154608 M:1815908352   DEBUG: CrystalHD: codec opened
17:59:03 T:2830154608 M:1815908352    INFO: DVDVideoCodecCrystalHD: Opened Broadcom Crystal HD Codec
17:59:03 T:2830154608 M:1815908352   DEBUG: FactoryCodec - Video: bcm-h264 - Opened
17:59:03 T:2830154608 M:1815908352  NOTICE: Creating video thread
There are also lots of these:
Code:
17:59:03 T:2789329776 M:1815908352   DEBUG: CrystalHD: dec_par x = 1, dec_par y = 1
17:59:03 T:2789329776 M:1815908352   DEBUG: CrystalHD: resolution = e  interlace = 0
17:59:03 T:2789329776 M:1815908352   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 0
17:59:03 T:2789329776 M:1813303296   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 1
17:59:03 T:2789329776 M:1809952768   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 2
17:59:03 T:2789329776 M:1806905344   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 3
17:59:03 T:2789329776 M:1803730944   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 4
Quote:


You can kill pulseaudio using "pulseaudio -k", this tells pulseaudio to die and not re-spawn. If you reboot, you will have to do it again.

I've tried that before, and it doesn't work. It just re-spawns itself. Besides, don't I need pulseaudio for sound? I tried to install and configure alsa, and that is what lead to this mess.
Quote:


Also make sure "Component" is disabled in xorg.conf. It also causes issues. This as nothing to do with Component output, it's Xorgs 3d setting. Bad, Xorg, bad.

I'll try that, but I didn't use it before, and my CPU usage with XBMC was much lower. Maybe this is a version bug. If you want, I'll take it to the XBMC forums.
post #86 of 113
http://code.google.com/p/atv-bootloader/wiki/atvdisplay

clearly shows the following:

Quote:


Section "Extensions"
Option "Composite" "Disable"
EndSection

I wonder why I put that there ?
post #87 of 113
Thread Starter 
Quote:
Originally Posted by waterhead View Post

I've tried that before, and it doesn't work. It just re-spawns itself. Besides, don't I need pulseaudio for sound? I tried to install and configure alsa, and that is what lead to this mess.

Pulseaudio is just a layer on top of Alsa, Alsa is the Linux kernel sound driver framework, so you always have Alsa installed anyway, without Alsa there is no sound on Linux (leaving aside OSS4 which is not relevant here).

So I'm not sure what you actually installed and configured when you "tried to install and configure alsa", if you are more specific maybe someone can help (my lack of Ubuntu/Debian package knowledge doesn't help here), but maybe it would be best in a separate thread to avoid getting off-topic here, as these Ubuntu Alsa/Pulseaudio issues are not really related to CrystalHD.
post #88 of 113
Like I said, I'll give it a try.

Ubuntu no longer has a xorg.conf file by default. One is created when you install the nVidia proprietary driver, but my netbook has Intel graphics.

In my previous install, I did create an xorg.conf file in trying to get the Intel version of XvMC working. But I could not get mplayer to use it, and mplayer wouldn't compile with that option unless I forced it. I didn't save that xorg.conffile before reinstalling. I knew there was something that I should have saved!
post #89 of 113
tux99: I posted links to the directions I followed in post #81. Like you said, it isn't relevant to this thread's topic so I won't go into too much detail.
post #90 of 113
Thread Starter 
Here is my xorg.conf from my Atom box (autogenerated by the Mandriva installer during installation), since it uses the same chipset as your netbook it should work for you too, beware though it's configured for a 1280x720 (720p) screen:

Code:
# File generated by XFdrake (rev )

Section "Extensions"
    Option "Composite" "Disable"
EndSection
# File generated by XFdrake (rev )

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "ServerFlags"
    Option "DontZap" "False" # disable  (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable / (resolution switching)
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "glx" # 3D layer
    Load "dri" # direct rendering
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Plug'n Play"
    ModelName "Optoma HD65"
    HorizSync 15-120
    VertRefresh 15-99
    Option "PreferredMode" "1280x720"

    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630

    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_120"  161.56  1280 1376 1512 1744  720 721 724 772  -HSync +Vsync

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_100"  131.85  1280 1368 1504 1728  720 721 724 763  -HSync +Vsync

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_85"  110.01  1280 1360 1496 1712  720 721 724 756  -HSync +Vsync

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_75"  95.65  1280 1352 1488 1696  720 721 724 752  -HSync +Vsync

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_60"  74.48  1280 1336 1472 1664  720 721 724 746  -HSync +Vsync

    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1280x720_50"  60.47  1280 1328 1456 1632  720 721 724 741  -HSync +Vsync
EndSection

Section "Device"
    Identifier "device1"
    VendorName "Intel Corporation"
    BoardName "Intel 810 and later"
    Driver "intel"
    Option "DPMS"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24

    Subsection "Display"
        Depth 8
        Modes "1280x720"
    EndSubsection

    Subsection "Display"
        Depth 15
        Modes "1280x720"
    EndSubsection

    Subsection "Display"
        Depth 16
        Modes "1280x720"
    EndSubsection

    Subsection "Display"
        Depth 24
        Modes "1280x720"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    Screen "screen1"
EndSection
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: HTPC - Linux Chat
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › Broadcom Crystal HD - the Nvidia killer for Linux HTPC?