Problem getting Broadcom Crystal HD BMC70015 to work with XBMC

  Thread Rating:
  • 4 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pmark Offline
Junior Member
Posts: 3
Joined: Aug 2010
Reputation: 0
Post: #41
pmark Wrote:Thanks!
Ok I will post a small sample later today.
If I use software decoding The macro-blocking artifacts do not appear but the playback freezes occasionally (I could say it is almost viewable)

here is the sample file
sample
find quote
vajonam Offline
Member+
Posts: 347
Joined: Sep 2008
Reputation: 0
Location: Toronto, Canada
Post: #42
I am seeing this issue when a "freshly" booted xbmc has much greater success of playing 1080p videos than a xbmc that has been running for sometime.

Please have a look at the logs around 23:40:xx i've tried playing the video twice. then rebooted and played the same video and seems to have played fine.

http://pastebin.com/xMWKTiuz

I am running Dharma Beta 1, CrystalHD 3.6.0 tag from git. BCM970015 decoder, Linux 8.04. Essentially following Davilla's wiki on how to install xbmc for linux.

The attached log is the following reboot, when i tried to run a Top Gear Polar special episode at 1080p.

http://pastebin.com/VMk7Kyu7 this video starts audio, then displays a frame or two before getting stuck. clicking stop on my remote stops it after about 2-3 minutes.

I am also on a 100Mb wired connection. Also if you need samples what is best way to get you say the 1st 10 minutes? just "dd"?
(This post was last modified: 2010-09-12 06:09 by vajonam.)
find quote
vajonam Offline
Member+
Posts: 347
Joined: Sep 2008
Reputation: 0
Location: Toronto, Canada
Post: #43
davilla Wrote:Turn off VDPAU, the AppleTV can't do it.

"top" is your friend in tracking memleaks and such.

i am using top to track this will post when i have more info.

the content i am playing is.

The only file that doesn't play after a fresh reboot is the following

Code:
General
Complete name                    : Top Gear - Polar Special.S00E109.mkv
Format                           : Matroska
File size                        : 7.08 GiB
Duration                         : 1h 2mn
Overall bit rate                 : 16.3 Mbps
Encoded date                     : UTC 2007-07-25 20:07:52
Writing application              : gdsmux
Writing library                  : Haali DirectShow Matroska Muxer 1.7.189.11

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 2 frames
Format settings, GOP             : M=3, N=12
Muxing mode                      : Container profile=Unknown@4.0
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 1h 2mn
Bit rate                         : 15.6 Mbps
Width                            : 1 440 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Original display aspect ratio    : 16:9
Frame rate                       : 25.000 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : MBAFF
Bits/(Pixel*Frame)               : 0.402
Stream size                      : 6.77 GiB (96%)
Title                            : BBC-HD H.264 1440x1080
Language                         : English

Audio
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Muxing mode                      : Header stripping
Codec ID                         : A_AC3
Duration                         : 1h 2mn
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Video delay                      : -109ms
Stream size                      : 170 MiB (2%)
Title                            : English AC3 2.0
Language                         : English


Should I expect my BCM970015 to play this on my appletv? It works on my ION w/ VDPAU enabled okay using 9.11 Camelot.


I can PM you the link to test file if you need.


Thanks
find quote
Einkoro Offline
Junior Member
Posts: 24
Joined: Jun 2010
Reputation: 0
Location: Canada
Post: #44
Video is playing as if CrystalHD isn't being used to decode the video on my AppleTV since updating from CrystalHD 2.0.1 and a nightly build to 3.6.0 and Beta 2. With debugging enabled I see 90-100% cpu usage and major frame drop on 480p h264/ac3 mkv which used to play just fine with low CPU usage.

I checked to make sure the kext is being loaded and the log seems to indicate the CrystalHD card is being initialized at startup.

http://janpingel.com/misc/files/xbmc.log
find quote
Einkoro Offline
Junior Member
Posts: 24
Joined: Jun 2010
Reputation: 0
Location: Canada
Post: #45
davilla Wrote:I'm sorry. I just don't believe it. sample please.

One minute sample with very noticeable frame drop: http://janpingel.com/misc/files/sample-002.mkv

The decoding performance is just like when I disabled CrystalHD as I did tests of what the AppleTV and CrystalHD could handle before I ripped and encoded my entire library starting back in January. Aside from the delay at the start of playing videos and the odd buffering hiccup these played great with CrystalHD previously.

I wish I could remember the revision of XBMC I was using. At the very least I could switch back to it to watch my media. Things were good until I updated Aug 31st but sadly I didn't mention what rev I was running.
(This post was last modified: 2010-09-16 06:39 by Einkoro.)
find quote
vajonam Offline
Member+
Posts: 347
Joined: Sep 2008
Reputation: 0
Location: Toronto, Canada
Post: #46
davilla,

i just finally managed to get build over on to my appletv of the tip of the Dharma branch.

http://trac.xbmc.org/ticket/10177 is fixed and that video plays back now. thanks for that.

I still see a large delay on the startup of the next 1080p. What is delay i should expect after i click on start to when i see the picture?

I have 1080p sample that will take close to 1-2 minutes to start playing correctly, is this expected? 720p plays flawlessly. I am uploading this video now will send you a PM when its done.

also i have annotated the following logs with times where i I am not sure what xbmc is doing? this is reading files off a nfs share. Dharma smb seems very flaky on hardy!


Code:
21:26:27 T:2839260048 M: 56999936   DEBUG: Open - av_find_stream_info finished
21:26:27 T:2839260048 M: 57040896    INFO: ffmpeg[A93BAB90]: Input #0, matroska, from '/net/kalahari/Video/English/Movies/HD/A Passage to India.mkv':
21:26:27 T:2839260048 M: 57040896    INFO: ffmpeg[A93BAB90]:   Duration: 02:43:57.85, start: 0.000000, bitrate: 1606 kb/s
21:26:27 T:2839260048 M: 57040896    INFO: ffmpeg[A93BAB90]:     Stream #0.0(eng): Video: h264, yuv420p, 1792x1080 [PAR 1:1 DAR 224:135], 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc
21:26:27 T:2839260048 M: 57040896    INFO: ffmpeg[A93BAB90]:     Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
21:26:27 T:2839260048 M: 57040896  NOTICE: Opening video stream: 0 source: 256
21:26:27 T:2839260048 M: 57040896  NOTICE: Creating video codec with codec id: 28
21:26:27 T:2839260048 M: 57040896   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:yes OpenMax:no VDPAU:yes VAAPI:no
21:26:27 T:2839260048 M: 57040896    INFO: Trying Broadcom Crystal HD Decoder...
21:26:27 T:2839260048 M: 57040896   DEBUG: FactoryCodec - Video:  - Opening
21:26:27 T:2839260048 M: 57040896   DEBUG: CrystalHD: profile 640029
21:26:27 T:2839260048 M: 57040896   DEBUG: CrystalHD: nal size 4
21:26:27 T:2839260048 M: 57040896   DEBUG: CrystalHD: num sps 1
21:26:27 T:2839260048 M: 57040896   DEBUG: CrystalHD: data size at end = 0
21:26:28 T:2797591440 M: 57131008   DEBUG: thread start, auto delete: 0
21:26:28 T:2797591440 M: 57131008   DEBUG: CrystalHD: Output Thread Started...
21:26:28 T:2839260048 M: 57131008    INFO: DVDVideoCodecCrystalHD: Opened Broadcom Crystal HD Codec
21:26:28 T:2839260048 M: 57131008   DEBUG: FactoryCodec - Video: chd-h264 - Opened
21:26:28 T:2839260048 M: 57131008  NOTICE: Creating video thread
21:26:28 T:2789198736 M: 57106432   DEBUG: thread start, auto delete: 0
21:26:28 T:2839260048 M: 57106432  NOTICE: Opening audio stream: 1 source: 256
21:26:28 T:2839260048 M: 57106432  NOTICE: Finding audio codec for: 86020
21:26:28 T:2839260048 M: 57106432   DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Opening
21:26:28 T:2839260048 M: 57106432    INFO: CDVDAudioCodecPassthroughFFmpeg::Open - Won't transcode for HDMI
21:26:28 T:2839260048 M: 57106432   DEBUG: FactoryCodec - Audio: PassthroughFFmpeg - Failed
21:26:28 T:2839260048 M: 57106432   DEBUG: FactoryCodec - Audio: FFmpeg - Opening
21:26:28 T:2789198736 M: 57106432   DEBUG: LinuxRendererGL: Cleaning up GL resources
21:26:28 T:2789198736 M: 57106432  NOTICE: running thread: video_thread
21:26:28 T:2839260048 M: 57106432   DEBUG: FactoryCodec - Audio: FFmpeg - Opened
21:26:28 T:2839260048 M: 57106432  NOTICE: Creating audio thread
21:26:28 T:2771385232 M: 57106432   DEBUG: thread start, auto delete: 0
21:26:28 T:2771385232 M: 57106432  NOTICE: running thread: CDVDPlayerAudio::Process()
21:26:28 T:2839260048 M: 57106432   DEBUG: ReadEditDecisionLists - Adjusting detected frame rate by half assuming 1080i (interlaced): 24.000
21:26:28 T:2839260048 M: 57106432   DEBUG: ReadEditDecisionLists - Checking for edit decision lists (EDL) on local drive or remote share for: /net/kalahari/Video/English/Movies/HD/A Passage to India.mkv
21:26:28 T:2839260048 M: 57106432   DEBUG: Process - Start position set
to last stopped position: 596000

What is it doing here??? for about 20 seconds

21:26:41 T:2856299408 M: 59068416   DEBUG: Thread 2856299408 terminating (autodelete)
21:26:45 T:2900536208 M: 59375616   DEBUG: Thread 2900536208 terminating (autodelete)
21:26:45 T:2814376848 M: 59375616   DEBUG: Thread 2814376848 terminating (autodelete)
21:26:46 T:2885294992 M: 59260928   DEBUG: Thread 2885294992 terminating (autodelete)

Again whats the delay for?

21:27:26 T:2839260048 M: 59654144   DEBUG: SeekTime - seek ended up on time 599641
21:27:26 T:2839260048 M: 59654144   DEBUG: Process - starting demuxer from: 596000
21:27:26 T:2839260048 M: 59654144   DEBUG: CDVDPlayer::SetCaching - caching state 2
21:27:26 T:2789198736 M: 59645952   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
21:27:26 T:2789198736 M: 59645952   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(599641000.000000, 1)
21:27:26 T:2789198736 M: 59645952    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
21:27:26 T:2771385232 M: 59645952   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(599808000.000000, 0)
21:27:26 T:2771385232 M: 59645952  NOTICE: Creating audio device with codec id: 86020, channels: 6, sample rate: 48000, no pass-through
21:27:26 T:2771385232 M: 59645952    INFO: AudioRendererFactory:  not a explicit device, trying to autodetect.
21:27:26 T:2789198736 M: 59613184 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
21:27:26 T:3043235680 M: 59613184   DEBUG: CGUIAudioManager::DeInitialize
21:27:26 T:2789198736 M: 59527168 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
21:27:26 T:2771385232 M: 59547648 WARNING: Previous line repeats 1 times.
21:27:26 T:2771385232 M: 59547648    INFO: CPCMRemap: Configured speaker layout: 2.0
21:27:26 T:2771385232 M: 59547648    INFO: CPCMRemap: I channel map: FL,FR,CE,LFE,SL,SR
21:27:26 T:2771385232 M: 59547648   DEBUG: CPCMRemap: Forcing side channel map to back channels
21:27:26 T:2771385232 M: 59547648    INFO: CPCMRemap: O channel map: FL,FR
21:27:26 T:2771385232 M: 59547648   DEBUG: CPCMRemap: Downmix normalization is disabled
21:27:26 T:2771385232 M: 59547648   DEBUG: CPCMRemap: FL = FL(1.000000) CE(0.707107) LFE(0.707107) BL(1.000000)
21:27:26 T:2771385232 M: 59547648   DEBUG: CPCMRemap: FR = FR(1.000000) CE(0.707107) LFE(0.707107) BR(1.000000)
21:27:26 T:2771385232 M: 59547648   DEBUG: CPulseAudioDirectSound::CPulseAudioDirectSound - Requested channels changed from 6 to 2
21:27:26 T:2771385232 M: 59547648   DEBUG: RemoveActiveDevice - Removing device 1
21:27:27 T:3043235680 M: 58494976   DEBUG: CAnnouncementManager - Announcement: PlaybackStarted from xbmc
21:27:27 T:2771385232 M: 58507264   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
21:27:27 T:2771385232 M: 58507264   DEBUG: RemoveActiveDevice - Removing device 0
21:27:27 T:3043235680 M: 57982976   DEBUG: CGUIInfoManager::SetCurrentMovie(/net/kalahari/Video/English/Movies/HD/A Passage to India.mkv)
21:27:27 T:3043235680 M: 57835520   DEBUG: SECTION:UnloadDelayed(SECTION: LCODE)
21:27:27 T:3043235680 M: 57835520   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-i486-linux.so)
21:27:27 T:3043235680 M: 57835520   DEBUG: Unloading: ImageLib-i486-linux.so
21:27:27 T:2797591440 M: 57843712   DEBUG: CrystalHD: Format Change Detected. Flags: 0x00030000
21:27:27 T:2797591440 M: 57843712   DEBUG: ----------------------------------
21:27:27 T:2797591440 M: 57843712   DEBUG:     TimeStamp: 0
21:27:27 T:2797591440 M: 57843712   DEBUG:     Picture Number: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     Width: 1792
21:27:27 T:2797591440 M: 57815040   DEBUG:     Height: 1080
21:27:27 T:2797591440 M: 57815040   DEBUG:     Chroma: 0x001
21:27:27 T:2797591440 M: 57815040   DEBUG:     Pulldown: 9
21:27:27 T:2797591440 M: 57815040   DEBUG:     Flags: 0x00000000
21:27:27 T:2797591440 M: 57815040   DEBUG:     Frame Rate/Res: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     Aspect Ratio: 1
21:27:27 T:2797591440 M: 57815040   DEBUG:     Color Primaries: 33686016
21:27:27 T:2797591440 M: 57815040   DEBUG:     MetaData: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     Session Number: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     TimeStamp: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     Custom Aspect: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     Frames to Drop: 0
21:27:27 T:2797591440 M: 57815040   DEBUG:     H264 Valid Fields: 0x00000000
21:27:27 T:2797591440 M: 57815040   DEBUG: CrystalHD: dec_par x = 1, dec_par y = 1
21:27:27 T:2797591440 M: 57815040   DEBUG: CrystalHD: resolution = 0  interlace = 0
21:27:27 T:2797591440 M: 57815040   DEBUG: CrystalHD: No timestamp detected: 0
21:27:27 T:2789198736 M: 46026752  NOTICE:  fps: 24.000000, pwidth: 1792, pheight: 1080, dwidth: 1791, dheight: 1080
21:27:27 T:2789198736 M: 46026752   DEBUG: OutputPicture - change configuration. 1792x1080. framerate: 24.00. format: YUY2
21:27:27 T:3043235680 M: 46026752   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
21:27:27 T:2789198736 M: 40136704 WARNING: CRenderManager::Configure - timeout waiting for previous frame
21:27:27 T:2789198736 M: 38289408  NOTICE: Display resolution DESKTOP : 1024x768 @ 60.00 - Full Screen (12)
21:27:27 T:3043235680 M: 38289408   DEBUG: Activating window ID: 12005
21:27:27 T:3043235680 M: 38289408   DEBUG: Checking if window ID 12005 is locked.
21:27:27 T:3043235680 M: 38289408   DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
21:27:27 T:2839260048 M: 38289408   DEBUG: CDVDPlayer::HandleMessages - player started 2
(This post was last modified: 2010-09-17 03:34 by vajonam.)
find quote
vajonam Offline
Member+
Posts: 347
Joined: Sep 2008
Reputation: 0
Location: Toronto, Canada
Post: #47
davilla Wrote:1792 x 1080, geez. where do you get these odd sized videos Smile

Spins right up for me.

let me see the output of "ifconfig" and dmesg when this happens.


i thought you'd say that after seeing the size! but anyway.. since i do have it..:-)

dmesg

Code:
[15471.141795] [FMT CH] DoneSz:0xa0, PIB:0 1 1 2020200 1 438 700 0 9 0
[15471.144894] [FMT CH] DoneSz:0xa0, PIB:0 1 1 2020200 1 438 700 0 9 0
[15471.148027] [FMT CH] DoneSz:0xa0, PIB:0 1 1 2020200 1 438 700 0 9 0
[15471.149933] [FMT CH] DoneSz:0xa0, PIB:0 1 1 2020200 1 438 700 0 9 0
[15520.351491] crystalhd 0000:02:00.0: number of rx success 198466 and failure 0

this is where i tried again.

[33973.642541] start_capture: pause_th:14, resume_th:3
[34035.606385] [FMT CH] DoneSz:0xa0, PIB:0 1 1 2020200 1 438 700 0 9 0

Code:
eth0      Link encap:Ethernet  HWaddr 64:b9:e8:ff:66:6f  
          inet addr:192.168.100.23  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::66b9:e8ff:feff:666f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5952061 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3009731 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:151111235 (144.1 MB)  TX bytes:241263006 (230.0 MB)
          Interrupt:19 Base address:0x1000

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:23461 (22.9 KB)  TX bytes:23461 (22.9 KB)

i have set the max cstate as well to 2.

what are you running this mkv? off the local disk or smb or other file sharing protocols?
find quote
vajonam Offline
Member+
Posts: 347
Joined: Sep 2008
Reputation: 0
Location: Toronto, Canada
Post: #48
curlyjs Wrote:Not sure if related, but I've seen a difference in start time if you use the library vs file manager. File manager open quickly vs library could take 4-5min in my case. Only happened to me with bbc rips.

I can give it a test from FM to see what the spin up time time is there.

EDIT: here is the log as launching from the File manager. same for me.

Code:
09:03:37 T:2771385232 M: 76599296   DEBUG: thread start, auto delete: 0
09:03:37 T:2771385232 M: 76660736  NOTICE: running thread: CDVDPlayerAudio::Process()
09:03:37 T:2883124112 M: 76660736   DEBUG: ReadEditDecisionLists - Adjusting detected frame rate by half assuming 1080i (interlaced): 24.000
09:03:37 T:2883124112 M: 76660736   DEBUG: ReadEditDecisionLists - Checking for edit decision lists (EDL) on local drive or remote share for: /net/kalahari/Video/English/Movies/HD/A Passage to India.mkv
09:03:37 T:2883124112 M: 76685312   DEBUG: Process - Start position set to last stopped position: 652000
09:03:59 T:2789198736 M: 90279936   DEBUG: Thread 2789198736 terminating (autodelete)
09:04:00 T:2891516816 M: 90316800   DEBUG: Thread 2891516816 terminating (autodelete)
09:04:01 T:2856299408 M: 90488832   DEBUG: Thread 2856299408 terminating (autodelete)
09:04:02 T:2839260048 M: 90476544   DEBUG: Thread 2839260048 terminating (autodelete)
09:04:41 T:2883124112 M: 90501120   DEBUG: SeekTime - seek ended up on time 656573
09:04:42 T:2883124112 M: 90529792   DEBUG: Process - starting demuxer from: 652000
09:04:42 T:2883124112 M: 90529792   DEBUG: CDVDPlayer::SetCaching - caching state 2
09:04:42 T:2805984144 M: 90529792   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
09:04:42 T:2805984144 M: 90529792   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(656573000.000000, 1)
09:04:42 T:2805984144 M: 90529792    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
09:04:42 T:2771385232 M: 90525696   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(656640000.000000, 0)
09:04:42 T:2771385232 M: 90525696  NOTICE: Creating audio device with codec id: 86020, channels: 6, sample rate: 48000, no pass-through
09:04:42 T:3043235680 M: 90505216   DEBUG: CGUIAudioManager::DeInitialize
09:04:42 T:2771385232 M: 90632192    INFO: AudioRendererFactory:  not a explicit device, trying to autodetect.
(This post was last modified: 2010-09-17 15:05 by vajonam.)
find quote
Einkoro Offline
Junior Member
Posts: 24
Joined: Jun 2010
Reputation: 0
Location: Canada
Post: #49
davilla Wrote:The change is in both trunk and Dharma branch. Pastebin xbmc.log.

http://janpingel.com/misc/files/xbmc.log

Just noticed:
18:43:27 T:2684407808 M:113786880 NOTICE: Starting XBMC, Platform: Mac OS X (8.8.2 i386). Built on Sep 10 2010 (SVN:33654M)

The Info.plist in the application bundle says r33913. Buggered build from sshcs?
find quote
n8op8o Offline
Junior Member
Posts: 9
Joined: Jul 2010
Reputation: 0
Post: #50
davilla Wrote:what crystalhd card ? xbmc.log ?

Sorry for the bit in delay.

CrystalHD Model#: BCM970015
XBMC Log: http://pastebin.com/reC1JSeb

When i start playing the file the audio comes through just fine but no picture. the xbmc hud is up too. once i click or press esc to hide the hud everything starts freezing up. if i drag the mouse around the screen i see a bunch of mouse cursors that don't get refreshed.

again this happens when playing VC-1 or MPEG2 content using the crystalhd decoder.

Thanks! hope this info helps.
find quote
Post Reply