Implement CrystalHD in Live TV
#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
Reply
#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.
Reply
#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.
Reply
#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
Reply
#20
who is doing the video demuxing under pvr ?
Reply
#21
davilla Wrote:who is doing the video demuxing under pvr ?

I was running xbmc as root, launching through an irexec script under gnome. I am now testing under my regular user (not root) and running an xbmc-live type of environment and everything is running much smoother but live tv and recordings are still speeding up and slowing down during H264 playback. This is all running under the cHD hack branch from FernetMenta. Here is a full debug log running xbmc as my regular user.

http://pastebin.com/CKr7WJLu
Reply
#22
davilla Wrote:who is doing the video demuxing under pvr ?

The various backends like tvheadend or vdr do the demuxing but they do not provide all required data in order to open a decoder. There are a couple of other problems related to this issue, e.g. vdpau can't do all required checks when being opened.
Maybe we should engage ffmpeg parser in pvr demux client, at least until we got all required data from the the stream and skipping all packets until we got the info.
Reply
#23
I misunderstood the question. Thank you for the clarification guys.
Reply
#24
@Gfunk117 do you want to try this patch. First attempt to store extra data (PSP) to video stream info. Make you you have reverted my previous hack.

https://github.com/FernetMenta/xbmc/comm...2784b469f9
Reply
#25
Gonna test out your patch tomorrow FernetMenta. Been away for a week. I will PM you and let you know how it tests out. Thank you for all your hard work.
Reply
#26
Any news on the the use of CrystalHD with XBMC LiveTV?
Reply
#27
also very curious about this...

FernetMenta: can you repost the URL? it's 404 and i can try to apply this patch on my openelec system
toxster @ freenode
Backend: QNAP TS-239 running Arch Linux, sundtek dvb-s2, tvheadend svn.
Backend 2: laptop, , 2x tevii s-660 usb, 1x sundtek sky ultimate dvb-s2 vdr/xvdr
Frontend 1: asrock ion 330, xbmc (Dharma-pvr dushmaniacs git branch)
Frontend 2: atv1 160gb, atv-usb BCM70015/r174 Dharma RC2 svn35567 | usb-key: openelec 2.0 rc4
Reply
#28
Note this is far away from being finished:
https://github.com/FernetMenta/xbmc/tree/pvr
Reply
#29
Any progress here? I just bought a 70015 card for my IP-TV setup, but i cannot watch live HD channels because this error. With recorded streams, it seems to be OK.
Reply
#30
EDIT: Try installing this CHD mpeg2 Live TV fixed Crystalbuntu version:
http://forum.osmc.tv/showthread.php?tid=...#pid113777


The only workaround I have found is to use the Smartphone XBMC app and left swipe once on the Remote Control screen.
Now tap More > Videos > Acceleration > Allow hardware acceleration (Crystal HD)

Then hold finger on screen to "Add a new Button" ie a shortcut toggle when you left swipe from the Remote Control Screen.

mpeg2 Live TV / Recordings now works properly when I remember to turn Off hardware acceleration with this toggle.

For ATV1 / Crystalbuntu users, Sam Nazarko's OSMC (when its released) will turn off CHD automatically when viewing ALL mpeg2 video I believe. This is the only reason I bought a RPi to view mpeg2 Live TV until OSMC is released.

There must be a way of turning ON / OFF Hardware Acceleration from within the XBMC GUI and assigning that to a favourites link ?

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

Well a free afternoon and Great Success ! I've finally coded a worked around for this very annoying issue: Smile

http://forum.osmc.tv/showthread.php?tid=16534

Reply

Logout Mark Read Team Forum Stats Members Help
Implement CrystalHD in Live TV0