Kodi Community Forum

Full Version: PVR.Demo with HDHomerun strm
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm doing some simple tests with the PVR.Demo Addon trying to get it to play an HDHomerun stream for a channel. I figured I would start with this addon since it already had the stream element in the PVRDemoAddonSettings.xml file for each channel.

Unfortunately it's not playing the stream. Here is how it is setup with some log comparisons.

Any ideas about why the hdhomerun stream behaves differently when played from the PVR environment than it does from the XBMC file browser are welcome.

PHP Code:
<channel>
      <
name>Demo TV Channel 1</name>
      <
radio>0</radio>
      <
number>1</number>
      <
encryption>0</encryption>
      <
icon></icon>
      <
stream>hdhomerun://1314D5C5-0/tuner0?channel=auto:16&program=660</stream>
</channel

The following log shows the strm file playing just fine when loaded from the XBMC file browser.

Code:
23:54:07 T:5348  NOTICE: DVDPlayer: Opening: hdhomerun://1314D5C5-0/tuner0?channel=auto:50&program=727
23:54:07 T:5348 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:54:07 T:5348   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
23:54:07 T:5348   DEBUG: DXVA - cheking samples array size using 842094158 render target
23:54:07 T:5348   DEBUG: DXVA - updated maximum samples count to 1
23:54:07 T:5348   DEBUG: DXVA - cheking samples array size using 842094169 render target
23:54:07 T:2708  NOTICE: Thread CDVDPlayer start, auto delete: false
23:54:07 T:2708  NOTICE: Creating InputStream
23:54:07 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/hdhomerun.dll)
23:54:07 T:2708  NOTICE: Creating Demuxer
23:54:07 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avutil-51.dll)
23:54:07 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avcodec-53.dll)
23:54:07 T:5348   DEBUG: ------ Window Init (DialogBusy.xml) ------
23:54:07 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avformat-53.dll)
23:54:07 T:2708   DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [mpegts]
23:54:07 T:2708    INFO: ffmpeg[A94]: [mpegts] Unable to seek back to the start
23:54:07 T:2708   DEBUG: CDVDDemuxFFmpeg::Open - avformat_find_stream_info starting
23:54:12 T:5348   DEBUG: ------ Window Deinit (Pointer.xml) ------
23:54:12 T:2708   DEBUG: ffmpeg[A94]: [mpegts] decoding for stream 3 failed
23:54:12 T:2708   DEBUG: ffmpeg[A94]: [mpegts] Could not find codec parameters (Unknown: none ([5][0][0][0] / 0x0005))
23:54:12 T:2708   DEBUG: ffmpeg[A94]: [mpegts] Estimating duration from bitrate, this may be inaccurate
23:54:12 T:2708   DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info finished
23:54:12 T:2708    INFO: ffmpeg[A94]: Input #0, mpegts, from 'hdhomerun://1314D5C5-0/tuner0?channel=auto:50&program=727':
23:54:12 T:2708    INFO: ffmpeg[A94]:   Duration: N/A, start: 64021.755267, bitrate: 10192 kb/s
23:54:12 T:2708    INFO: ffmpeg[A94]:   Program 727
23:54:12 T:2708    INFO: ffmpeg[A94]:     Stream #0:0[0x1c67]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 9808 kb/s, 59.96 fps, 59.96 tbr, 90k tbn, 119.88 tbc
23:54:12 T:2708    INFO: ffmpeg[A94]:     Stream #0:1[0x1c68](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 192 kb/s
23:54:12 T:2708    INFO: ffmpeg[A94]:     Stream #0:2[0x1c69](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 192 kb/s
23:54:12 T:2708    INFO: ffmpeg[A94]:     Stream #0:3[0x1c6a]: Unknown: none ([5][0][0][0] / 0x0005)
23:54:12 T:2708  NOTICE: Opening video stream: 0 source: 256
23:54:12 T:2708  NOTICE: Creating video codec with codec id: 2
23:54:12 T:2708   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:yes DXVA:yes
23:54:12 T:2708   DEBUG: FactoryCodec - Video:  - Opening
23:54:12 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swscale-2.dll)
23:54:12 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swresample-0.dll)
23:54:12 T:2708   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avfilter-2.dll)
23:54:12 T:2708  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
23:54:12 T:2708   DEBUG: FactoryCodec - Video: ff-mpeg2video - Opened
23:54:12 T:2708  NOTICE: Creating video thread
23:54:12 T:2708  NOTICE: Opening audio stream: 1 source: 256

The following log shows what happens when playing the stream from the PVR interface. Playing a stream from here always results in "buffer size too small, will most likely fail" even with the buffer size in the advanced settings xml turned up high.

Code:
23:01:45 T:3528  NOTICE: DVDPlayer: Opening: pvr://channels/tv/All TV channels/0.pvr
23:01:45 T:3528 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:01:45 T:3528   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
23:01:45 T:3528   DEBUG: DXVA - cheking samples array size using 842094158 render target
23:01:45 T:3528   DEBUG: DXVA - updated maximum samples count to 1
23:01:45 T:3528   DEBUG: DXVA - cheking samples array size using 842094169 render target
23:01:45 T:10344  NOTICE: Thread CDVDPlayer start, auto delete: false
23:01:45 T:10344  NOTICE: Creating InputStream
23:01:45 T:10344   DEBUG: PVRManager - PVR::CPVRManager::OpenLiveStream - opening live stream on channel 'Demo TV Channel 1'
23:01:45 T:10344   DEBUG: opening live stream on url 'hdhomerun://1314D5C5-0/tuner0?channel=auto:16program=660'
23:01:45 T:10344   DEBUG: PVRFile - XFILE::CPVRFile::Open - playback has started on filename pvr://channels/tv/All TV channels/0.pvr
23:01:45 T:10344   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/hdhomerun.dll)
23:01:45 T:10344   DEBUG: CDVDInputStreamPVRManager::Open - stream opened: hdhomerun://1314D5C5-0/tuner0?channel=auto:16program=660
23:01:45 T:10344  NOTICE: Creating Demuxer
23:01:45 T:10344   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avutil-51.dll)
23:01:45 T:10344   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avcodec-53.dll)
23:01:45 T:3528   DEBUG: ------ Window Init (DialogBusy.xml) ------
23:01:45 T:10344   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avformat-53.dll)
23:01:45 T:10344   DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [mpegts]
23:01:45 T:10344 WARNING: CHomeRunFile::Read - buffer size too small, will most likely fail
23:01:50 T:3528   DEBUG: ------ Window Deinit (Pointer.xml) ------
23:01:50 T:10344 WARNING: CHomeRunFile::Read - buffer size too small, will most likely fail
23:01:53 T:3528   DEBUG: ------ Window Init (Pointer.xml) ------
23:01:56 T:10344   DEBUG: CDVDDemuxFFmpeg::Open - avformat_find_stream_info starting
23:01:56 T:10344   DEBUG: ffmpeg[2868]: [mpegts] Estimating duration from bitrate, this may be inaccurate
23:01:56 T:10344   DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info finished
23:01:56 T:10344    INFO: ffmpeg[2868]: Input #0, mpegts, from 'pvr://channels/tv/All TV channels/0.pvr':
23:01:56 T:10344    INFO: ffmpeg[2868]:   Duration: N/A, bitrate: N/A
I found a couple threads talking about playing media from the PVR.Demo addon's streamurl element in the settings xml file:

http://forum.xbmc.org/showthread.php?tid=123779

(2012-02-24, 02:32)dushmaniac Wrote: [ -> ]right, now I know. there's no stream path set in the default demo settings.

open system/PVRDemoAddonSettings.xml and fill in some url that can be opened by xbmc's vfs, and it'll open that file when you start the channel stream.

http://forum.xbmc.org/showthread.php?tid=125069

(2012-03-17, 12:57)dushmaniac Wrote: [ -> ]yes, you can change the xml to use any internet stream or video file you like.
this add-on only compiles on linux atm, and is just a quick hack so skinners can do their jobs without pvr hardware. so don't expect a correct epg or something from an internet channel. the add-on just reads the xml file, and displays the contents as channels in the pvr gui.

I believe that the "hdhomerun://" url form is compatible with the VFS as a *.strm file can be played from the file browser with the url within it. To test I tried using a file path to the *.strm file instead of using the hdhomerun url but that too failed. Here is a log excerpt for the attempt:

Code:
20:44:21 T:9388  NOTICE: Creating InputStream
20:44:21 T:9388   DEBUG: PVRManager - PVR::CPVRManager::OpenLiveStream - opening live stream on channel 'Demo TV Channel 2'
20:44:21 T:9388   DEBUG: opening live stream on url 'C:\Users\Public\HDHR Streams\tuner0\512 - WWBTDT (WWBT-DT).strm'
20:44:21 T:9388   DEBUG: PVRFile - XFILE::CPVRFile::Open - playback has started on filename pvr://channels/tv/All TV channels/1.pvr
20:44:21 T:9388   DEBUG: CDVDInputStreamPVRManager::Open - stream opened: C:\Users\Public\HDHR Streams\tuner0\512 - WWBTDT (WWBT-DT).strm
20:44:21 T:9388  NOTICE: Creating Demuxer
20:44:21 T:9388   ERROR: CDVDDemuxFFmpeg::Open - error probing input format, pvr://channels/tv/All TV channels/1.pvr
20:44:21 T:9388   ERROR: Previous line repeats 9 times.
20:44:21 T:9388   ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
20:44:21 T:9388  NOTICE: CDVDPlayer::OnExit()
20:44:21 T:9388  NOTICE: CDVDPlayer::OnExit() deleting input stream

Any thoughts on why it behaves different from the PVR environment?

Shouldn't it just play like normal?
Bump - 261 views and no replies. Am I misunderstanding something about the PVR system? Am I off base completely in what I'm trying to do?
no you're not, but nobody has investigated this (yet) or come up with a fix. it should have worked, but i only created that add-on to provide a demo environment for people without pvr hardware. it's never been tested much with these kinds of streams.
Thanks for the feedback and I understand that this was just as a skeleton. If nothing else, I hope that the information here can help lead to a workaround or a fix wherever the problem may be.

It appears to me to be a difference in what is trying to be opened by Ffmpeg. See the log clip below from the file browser opening the stream vs the one below that with PVR opening it.

Is pvr://channels/tv/All TV channels/0.pvr expected to map to directly to hdhomerun://1314D5C5-0/tuner0?channel=auto:50&program=727 ?

The URL passed to Ffmpeg when launched from PVR is pvr://channels/tv/All TV channels/0.pvr

However when launched from the file browser it gets the correct URL sent as hdhomerun://1314D5C5-0/tuner0?channel=auto:50&program=727

You can see that Ffmpeg fails to get the start and bitrate values when the *.pvr URL is passed but not when the correct hdhomerun URL is passed.

From the file browser:

Code:
23:54:12 T:2708    INFO: ffmpeg[A94]: Input #0, mpegts, from 'hdhomerun://1314D5C5-0/tuner0?channel=auto:50&program=727':
23:54:12 T:2708    INFO: ffmpeg[A94]:   Duration: N/A, start: 64021.755267, bitrate: 10192 kb/s

From the demo.pvr

Code:
23:01:56 T:10344    INFO: ffmpeg[2868]: Input #0, mpegts, from 'pvr://channels/tv/All TV channels/0.pvr':
23:01:56 T:10344    INFO: ffmpeg[2868]:   Duration: N/A, bitrate: N/A
that url is translated into the real url in cdvdinputstreampvrmanager
I'll poke around in there tonight to see if there is anything obvious. Thanks!
I hate to bump an old thread but I am curious if any solutions were ever found to this issue? I am using the IPTV Simple PVR client, based on the Demo PVR code and it is working beautifully. However, my new HDHomeRun just showed up and after setting up all of the HDHR streams, they fail to load with the same error message mentioned above...

WARNING: CHomeRunFile::Read - buffer size too small, will most likely fail

I would love to get this sorted so any help would be fantastic!
Even better would be if we could get this to work with the UPnP beta firmware for the HDHomeRun Prime. That baby doesn't even need STRM files to work in XBMC :D
That feature actually quit working for me with 12.1. Haven't had time to test further. Hopefully be able to investigate soon. (my life story)
(2013-04-13, 02:30)bry- Wrote: [ -> ]That feature actually quit working for me with 12.1. Haven't had time to test further. Hopefully be able to investigate soon. (my life story)

Known issue, and devs are looking into it. Hopefully we'll have a fix in time for v12.2 release (cross fingers).
(2013-04-13, 04:59)Ned Scott Wrote: [ -> ]
(2013-04-13, 02:30)bry- Wrote: [ -> ]That feature actually quit working for me with 12.1. Haven't had time to test further. Hopefully be able to investigate soon. (my life story)

Known issue, and devs are looking into it. Hopefully we'll have a fix in time for v12.2 release (cross fingers).

I happened to stumble upon the info on the silicon dust site this evening. Thanks for the heads up
(2013-04-13, 04:59)Ned Scott Wrote: [ -> ]
(2013-04-13, 02:30)bry- Wrote: [ -> ]That feature actually quit working for me with 12.1. Haven't had time to test further. Hopefully be able to investigate soon. (my life story)

Known issue, and devs are looking into it. Hopefully we'll have a fix in time for v12.2 release (cross fingers).

Does that include the issue that me and the OP have or is this a different issue?
(2013-04-17, 13:05)CrimsonGT Wrote: [ -> ]
(2013-04-13, 04:59)Ned Scott Wrote: [ -> ]
(2013-04-13, 02:30)bry- Wrote: [ -> ]That feature actually quit working for me with 12.1. Haven't had time to test further. Hopefully be able to investigate soon. (my life story)

Known issue, and devs are looking into it. Hopefully we'll have a fix in time for v12.2 release (cross fingers).

Does that include the issue that me and the OP have or is this a different issue?

Doubtful :(
Sorry to bring this up, but has this ever been addressed?

I also use the Simple-IPTV pvr addon and some channels provide .strm urls that do not start via the pvr\livetv. Those same urls work just fine via favourites or as an added source. So they do work in XBMC but not in the pvr section. Why is that?

I ran this also via debug, and noticed that it is trying to create a demuxer on "pvr://channels/tv/All TV channels/1.pvr" and not the main stream-url behind it. That's when it fails.
Pages: 1 2