Implement CrystalHD in Live TV

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #11
FernetMenta Wrote:The point is that in case of pvr not ffmpeg demuxer is used but pvr demuxer which does not set the extra data needed by chd. Will look into this in more detail.

I really appreciate you looking into this further FernetMenta. If cHD is implemented in recording playback of h264 pvr then the pvr demuxer for live h264 tv shouldn't be too much different, but what do I know Wink
find quote
FernetMenta Offline
Team-XBMC Member
Posts: 1,622
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #12
This is not a fix just a test! Could you try this and report back?
https://github.com/FernetMenta/xbmc/commits/pvr/

In the meantime I try to get a hold of davilla.
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #13
FernetMenta Wrote:This is not a fix just a test! Could you try this and report back?
https://github.com/FernetMenta/xbmc/commits/pvr/

In the meantime I try to get a hold of davilla.

Awesome! I am going to start building right now...I will report my results later today. Thank you FernetMenta!
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #14
YOU ARE THE MAN FernetMenta!!!! I just finished testing your pvr build with the cHD hack and so far things are working great. I am going to do some more Live TV testing right now and report more detailed results after a period of watching. Here are the debug logs for Live H264 HDTV with xbmc addon xvdr.

Thank You, Thank You, Thank You!

Code:
17:35:36 T:2967468912   DEBUG: CrystalHD: Format Change Detected. Flags: 0x00030000
17:35:36 T:2967468912   DEBUG: ----------------------------------
17:35:36 T:2967468912   DEBUG:     TimeStamp: 0
17:35:36 T:2967468912   DEBUG:     Picture Number: 0
17:35:36 T:2967468912   DEBUG:     Width: 1280
17:35:36 T:2967468912   DEBUG:     Height: 720
17:35:36 T:2967468912   DEBUG:     Chroma: 0x001
17:35:36 T:2967468912   DEBUG:     Pulldown: 9
17:35:36 T:2967468912   DEBUG:     Flags: 0x00000800
17:35:36 T:2967468912   DEBUG:     Frame Rate/Res: 0
17:35:36 T:2967468912   DEBUG:     Aspect Ratio: 1
17:35:36 T:2967468912   DEBUG:     Color Primaries: 16843008
17:35:36 T:2967468912   DEBUG:     MetaData: 0
17:35:36 T:2967468912   DEBUG:     Session Number: 0
17:35:36 T:2967468912   DEBUG:     TimeStamp: 0
17:35:36 T:2967468912   DEBUG:     Custom Aspect: 0
17:35:36 T:2967468912   DEBUG:     Frames to Drop: 0
17:35:36 T:2967468912   DEBUG:     H264 Valid Fields: 0x00000000
17:35:36 T:2967468912   DEBUG: CrystalHD: dec_par x = 1, dec_par y = 1
17:35:36 T:2967468912   DEBUG: CrystalHD: resolution = 0  interlace = 0
17:35:36 T:2946489200 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
17:35:36 T:8792736   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 0
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 1
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 2
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 3
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 4
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 5
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 6
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 7
17:35:36 T:2967468912   DEBUG: Previous line repeats 1 times.
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 8
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 9
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 10
17:35:36 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 11
17:35:36 T:2956979056   DEBUG: AddOnLog: VDR XVDR Client: SendPing
17:35:36 T:3053443952   DEBUG: CDVDPlayer::HandleMessages - player started 2
17:35:37 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 12
17:35:37 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84475566838.267975, should be:84475432437.632416, error:-134400.635559
17:35:37 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 13
17:35:38 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 14
17:35:38 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84476472180.254410, should be:84476455412.958954, error:-16767.295459
17:35:38 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84476610462.074951, should be:84476726886.912735, error:116424.837784
17:35:38 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 15
17:35:38 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 16
17:35:39 T:2967468912   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 17
17:35:39 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84477783373.561737, should be:84477838960.381912, error:55586.820177
17:35:40 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84478875564.544907, should be:84478822274.254776, error:-53290.290125
17:35:41 T:2759822192   DEBUG: CDVDPlayerAudio:: Discontinuity - was:84479901986.263779, should be:84479875295.793900, error:-26690.469880
17:35:42 T:2956979056   DEBUG: AddOnLog: VDR XVDR Client: SendPing
17:35:44 T:8792736   DEBUG: LIRC: Update - NEW at 370543:000000037ff07bd9 00 Guide mceusb (Guide)
17:35:44 T:8792736   DEBUG: OnKey: 229 (e5) pressed, action is CodecInfo
17:35:48 T:2956979056   DEBUG: AddOnLog: VDR XVDR Client: SendPing
17:35:50 T:8792736   DEBUG: LIRC: Update - NEW at 376443:000000037ff07bd9 00 Guide mceusb (Guide)
17:35:50 T:8792736   DEBUG: OnKey: 229 (e5) pressed, action is CodecInfo
17:35:54 T:2956979056   DEBUG: AddOnLog: VDR XVDR Client: SendPing
17:35:57 T:8792736   DEBUG: LIRC: Update - NEW at 383910:000000037ff07be6 00 Stop mceusb (Stop)
17:35:57 T:8792736   DEBUG: OnKey: 224 (e0) pressed, action is Stop
(This post was last modified: 2011-09-11 00:54 by Gfunk117.)
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #15
Well I spoke too soon. Now Live TV isn't playing period. The logs report buffers but the screen stays blank with the buffering window open. Recordings are working still. Live TV worked at first so not sure what the problem is. I'll reinstall xbmc addon xvdr and see what happens.
(This post was last modified: 2011-09-11 02:01 by Gfunk117.)
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #16
I really don't know what happened but now Live TV will not show any picture. Going to test vnsi addon and delete the *db files. Here is the full debug log for xvdr addon:

Code:
19:10:36 T:3037289328 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
19:10:37 T:3012062064 WARNING: Previous line repeats 3 times.
19:10:37 T:3012062064   DEBUG: CrystalHD: Format Change Detected. Flags: 0x00030000
19:10:37 T:3012062064   DEBUG: ----------------------------------
19:10:37 T:3012062064   DEBUG:     TimeStamp: 0
19:10:37 T:3012062064   DEBUG:     Picture Number: 0
19:10:37 T:3012062064   DEBUG:     Width: 1440
19:10:37 T:3012062064   DEBUG:     Height: 1080
19:10:37 T:3012062064   DEBUG:     Chroma: 0x001
19:10:37 T:3012062064   DEBUG:     Pulldown: 3
19:10:37 T:3012062064   DEBUG:     Flags: 0x00000868
19:10:37 T:3012062064   DEBUG:     Frame Rate/Res: 0
19:10:37 T:3012062064   DEBUG:     Aspect Ratio: 255
19:10:37 T:3012062064   DEBUG:     Color Primaries: 16843008
19:10:37 T:3012062064   DEBUG:     MetaData: 0
19:10:37 T:3012062064   DEBUG:     Session Number: 0
19:10:37 T:3012062064   DEBUG:     TimeStamp: 0
19:10:37 T:3012062064   DEBUG:     Custom Aspect: 0
19:10:37 T:3012062064   DEBUG:     Frames to Drop: 0
19:10:37 T:3012062064   DEBUG:     H264 Valid Fields: 0x00000000
19:10:37 T:3012062064   DEBUG: CrystalHD: dec_par x = 1, dec_par y = 1
19:10:37 T:3012062064   DEBUG: CrystalHD: resolution = 0  interlace = 0
19:10:37 T:2868857712   DEBUG: set caching from pvr to done. audio (1) = 43. video (1) = 6
19:10:38 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:10:38 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 0
19:10:38 T:3037289328 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
19:10:38 T:2868857712   DEBUG: CDVDPlayer::SetCaching - caching state 0
19:10:38 T:2868857712   ERROR: Get - failed to get stream
19:10:38 T:2868857712 WARNING: CDVDPlayer::CheckContinuity - resync forward :1, prev:33957681011.000000, curr:33967889011.000000, diff:10208000.000000
19:10:38 T:3037289328  NOTICE:  fps: 25.000000, pwidth: 1440, pheight: 1080, dwidth: 1920, dheight: 1080
19:10:38 T:3037289328   DEBUG: OutputPicture - change configuration. 1440x1080. framerate: 0.00. format: YUY2
19:10:38 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 0
19:10:38 T:2868857712   DEBUG: Previous line repeats 1 times.
19:10:38 T:2868857712   DEBUG: CDVDPlayer::HandleMessages - player started 2
19:10:38 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33958387949.020000, should be:33953521026.369961, error:-4866922.650040
19:10:39 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 2
19:10:39 T:8784240  NOTICE: Using GL_TEXTURE_2D
19:10:39 T:8784240   DEBUG: GL: Requested render method: 0
19:10:39 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 3
19:10:39 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 4
19:10:39 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 5
19:10:40 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 6
19:10:40 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 7
19:10:40 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 8
19:10:40 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 9
19:10:41 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 10
19:10:41 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:10:41 T:8784240   DEBUG: GL: BaseYUV2RGBGLSLShader: defines:
                                            #define XBMC_texture_rectangle 0
                                            #define XBMC_texture_rectangle_hack 0
                                            #define XBMC_STRETCH 0
                                            #define XBMC_YUY2
19:10:41 T:8784240  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
19:10:42 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 8
19:10:42 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 9
19:10:43 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 2
19:10:43 T:3012062064   DEBUG: CrystalHD: Added a new Buffer, ReadyListCount: 4
19:10:44 T:8784240   DEBUG: GL: Vertex Shader compilation log:
19:10:44 T:8784240   DEBUG: GL: Vertex Shader compiled successfully
19:10:44 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33959068667.774960, should be:33954289011.000000, error:-4779656.774960
19:10:44 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33954606137.344002, should be:33954289011.000000, error:-317126.344002
19:10:44 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33954433599.469002, should be:33954321011.000000, error:-112588.469002
19:10:45 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33954460288.089001, should be:33954321011.000000, error:-139277.089001
19:10:45 T:8784240   DEBUG: GL: Pixel Shader compilation log:
19:10:45 T:8784240   DEBUG: GL: Fragment Shader compiled successfully
19:10:45 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33954551122.275002, should be:33954385011.000000, error:-166111.275002
19:10:46 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33955215483.402000, should be:33955356754.859646, error:141271.457645
19:10:46 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33955621051.883644, should be:33955722767.444286, error:101715.560642
19:10:46 T:8784240  NOTICE: GL: NPOT texture support detected
19:10:46 T:8784240  NOTICE: GL: Using GL_ARB_pixel_buffer_object
19:10:47 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:10:48 T:2858367856   ERROR: ffmpeg[AA5F3B70]: [ac3] frame CRC mismatch
19:10:48 T:2858367856   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(33967889011.000000, 1)
19:10:48 T:2858367856 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
19:10:49 T:2858367856   DEBUG: CDVDPlayerAudio:: Discontinuity - was:33958356009.586380, should be:33967953011.000000, error:9597001.413620
19:10:50 T:8784240   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
19:10:52 T:2958031728   DEBUG: Thread Jobworker 2958031728 terminating (autodelete)
19:10:52 T:2937052016   DEBUG: Thread Jobworker 2937052016 terminating (autodelete)
19:10:52 T:2970102640   DEBUG: Thread Jobworker 2970102640 terminating (autodelete)
19:10:53 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:11:32 T:8784240   DEBUG: Previous line repeats 6 times.
19:11:32 T:8784240   DEBUG: LIRC: Update - NEW at 335754:000000037ff07bf4 00 Enter mceusb (Enter)
19:11:32 T:8784240   DEBUG: OnKey: 22 (16) pressed, action is FullScreen
19:11:32 T:8784240   DEBUG: Activating window ID: 12005
19:11:32 T:8784240   DEBUG: ------ Window Deinit (MyPVR.xml) ------
19:11:33 T:8784240   DEBUG: ------ Window Init (VideoFullScreen.xml) ------
19:11:33 T:8784240    INFO: Loading skin file: VideoFullScreen.xml
19:11:34 T:8784240   DEBUG: Load VideoFullScreen.xml: 361.81ms
19:11:34 T:8784240   DEBUG: Alloc resources: 612.44ms (362.37 ms skin load)
19:11:35 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:11:37 T:8784240   DEBUG: LIRC: Update - NEW at 340457:000000037ff07bf0 00 More mceusb (More)
19:11:37 T:8784240   DEBUG: OnKey: launch_media_center (c3) pressed, action is Info
19:11:41 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:11:41 T:8784240   DEBUG: LIRC: Update - NEW at 345331:000000037ff07bf0 00 More mceusb (More)
19:11:41 T:8784240   DEBUG: OnKey: launch_media_center (c3) pressed, action is Info
19:11:45 T:8784240   DEBUG: LIRC: Update - NEW at 348641:000000037ff07bd9 00 Guide mceusb (Guide)
19:11:45 T:8784240   DEBUG: OnKey: 229 (e5) pressed, action is CodecInfo
19:11:47 T:2947541872   DEBUG: AddOnLog: VDR XVDR Client: SendPing
19:11:58 T:8784240   DEBUG: Previous line repeats 1 times.
19:11:58 T:8784240   DEBUG: LIRC: Update - NEW at 361678:000000037ff07bd9 00 Guide mceusb (Guide)
19:11:58 T:8784240   DEBUG: OnKey: 229 (e5) pressed, action is CodecInfo
(This post was last modified: 2011-09-11 02:36 by Gfunk117.)
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #17
After further testing looks like the hack has SOME problems. Playback is speeding up and slowing down during cHD use. Waiting to test live tv again but recordings are having problems so I would assume live will get the same results. I really appreciate the attention this issue is getting. I am going do some more testing throughout the night between your cHD hack branch, your master branch and opdenkamp master git.
(This post was last modified: 2011-09-11 05:37 by Gfunk117.)
find quote
FernetMenta Offline
Team-XBMC Member
Posts: 1,622
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #18
Ok thanks, this was just a quick test. Here is an update on my investigation:

1)
The pvr (live tv) demuxer does not provide the decoding configuration data. Those are parsed by ffmpeg and provided to the decoders.

2)
XBMC's implementation of CrystalHD does not use ffmpeg for decoding but it uses ffmpeg demuxer which provides decoding configuration data.

The question is how to provide this data when using pvr and CrystalHD, where ffmpeg is not involved.

Now I need to think about possible solution and discuss with the devs. Please be patient, there won't be a working solution by tomorrow.
find quote
Gfunk117 Offline
Junior Member
Posts: 42
Joined: Jun 2011
Reputation: 0
Post: #19
FernetMenta Wrote:Ok thanks, this was just a quick test. Here is an update on my investigation:

1)
The pvr (live tv) demuxer does not provide the decoding configuration data. Those are parsed by ffmpeg and provided to the decoders.

2)
XBMC's implementation of CrystalHD does not use ffmpeg for decoding but it uses ffmpeg demuxer which provides decoding configuration data.

The question is how to provide this data when using pvr and CrystalHD, where ffmpeg is not involved.

Now I need to think about possible solution and discuss with the devs. Please be patient, there won't be a working solution by tomorrow.

I totally understand that there wont be a fix out tomorrow. I am happy to test anything you devs come up with and report my debug logs. I have picture again after recompiling. Here is a more detailed live tv debug log at pastebin for examining.

http://pastebin.com/36a0L6Ha

http://pastebin.com/khF1ytsm
(This post was last modified: 2011-09-11 20:10 by Gfunk117.)
find quote
davilla Online
Team-XBMC Developer
Posts: 10,397
Joined: Feb 2008
Reputation: 58
Post: #20
who is doing the video demuxing under pvr ?


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote