Kodi Community Forum
XBMC buffering live tv. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: MythTV (https://forum.kodi.tv/forumdisplay.php?fid=170)
+---- Thread: XBMC buffering live tv. (/showthread.php?tid=154881)



XBMC buffering live tv. - thomasgorilla - 2013-02-05

Hi,

I have recently just started playing with the new PVR functions of XBMC and I am experiencing buffering on HD/Digital channels. I live in Australia using DVB as the myth tv source. I have also tested recording of tv to see if the playback of a recorded file is fine but this also buffers.

It seems to be a probelm with the ATV2 as xbmc 12 on my Linux computers works fine. Why would this be happening when ATV2 can play 1080p content fine?

I have attached log file.

Code:
13:43:46 T:129236992   DEBUG: LinuxRendererGL: Cleaning up GL resources
13:43:46 T:151093248  NOTICE: Creating InputStream
13:43:46 T:151093248   DEBUG: PVRManager - OpenLiveStream - opening live stream on channel 'ABC1'
13:43:46 T:151093248   DEBUG: opening live stream for channel 'ABC1'
13:43:46 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: Suspend
13:43:46 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: Suspend Stopping Thread
13:43:46 T:114528256   DEBUG: AddOnLog: MythTV cmyth PVR Client: Process FileOps Thread Stopped
13:43:46 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: EnablePlayback
13:43:46 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: IsTunable: called for recorder 1, channel 1021
13:43:46 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: IsTunable: using recorder, input is tunable: source id: 1, multiplex id: channel: 4, input: 0)
13:43:46 T:129236992   DEBUG: ------ Window Init (DialogBusy.xml) ------
13:43:49 T:147292160   DEBUG: AddOnLog: MythTV cmyth PVR Client: prog_update_callback
13:43:49 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: SpawnLiveTV: Delay channel switch: 100
13:43:49 T:151093248   DEBUG: PVRFile - Open - playback has started on filename pvr://channels/tv/All TV channels/9.pvr
13:43:49 T:151093248   DEBUG: CDVDInputStreamPVRManager::Open - stream opened: pvr://channels/tv/All TV channels/9.pvr
13:43:49 T:151093248  NOTICE: Creating Demuxer
13:43:49 T:151093248   DEBUG: Open - probing detected format [mpegts]
13:43:49 T:151093248   DEBUG: Open - avformat_find_stream_info starting
13:43:49 T:151093248   DEBUG: ffmpeg[9018000]: [mpegts] parser not found for codec dvb_teletext, packets or times may be invalid.
13:43:54 T:151093248   DEBUG: ffmpeg[9018000]: [mpegts] max_analyze_duration 5000000 reached at 5016000
13:43:54 T:151093248   DEBUG: ffmpeg[9018000]: [mpegts] decoding for stream 2 failed
13:43:54 T:151093248   DEBUG: ffmpeg[9018000]: [mpegts] decoding for stream 3 failed
13:43:54 T:151093248   DEBUG: ffmpeg[9018000]: [mpegts] Could not find codec parameters (Unknown: none ([11][0][0][0] / 0x000B))
13:43:54 T:151093248   DEBUG: ffmpeg[9018000]: [NULL] start time is not set in estimate_timings_from_pts
13:43:54 T:151093248   DEBUG: AddOnLog: MythTV cmyth PVR Client: prog_update_callback
13:43:55 T:151093248   DEBUG: Previous line repeats 1 times.
13:43:55 T:151093248   DEBUG: Open - av_find_stream_info finished
13:43:55 T:151093248    INFO: ffmpeg[9018000]: Input #0, mpegts, from 'pvr://channels/tv/All TV channels/9.pvr':
13:43:55 T:151093248    INFO: ffmpeg[9018000]:   Duration: 00:00:05.76, start: 45795.524433, bitrate: 5610 kb/s
13:43:55 T:151093248    INFO: ffmpeg[9018000]:   Program 1
13:43:55 T:151093248    INFO: ffmpeg[9018000]:     Stream #0:0[0x200]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 10000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
13:43:55 T:151093248    INFO: ffmpeg[9018000]:     Stream #0:1[0x28a](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 256 kb/s
13:43:55 T:151093248    INFO: ffmpeg[9018000]:     Stream #0:2[0x240](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
13:43:55 T:151093248    INFO: ffmpeg[9018000]:     Stream #0:3[0x1388]: Unknown: none ([11][0][0][0] / 0x000B)
13:43:55 T:151093248  NOTICE: Opening video stream: 0 source: 256
13:43:55 T:151093248  NOTICE: Creating video codec with codec id: 2
13:43:55 T:151093248   DEBUG: CDVDFactoryCodec: compiled in hardware support: VDADecoder:no VideoToolBoxDecoder:yes CrystalHD:no OpenMax:no
13:43:55 T:151093248   DEBUG: FactoryCodec - Video:  - Opening
13:43:55 T:151093248  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-2 video
13:43:55 T:151093248   DEBUG: FactoryCodec - Video: ff-mpeg2video - Opened
13:43:55 T:151093248  NOTICE: Creating video thread
13:43:55 T:154079232  NOTICE: running thread: video_thread
13:43:55 T:151093248  NOTICE: Opening audio stream: 1 source: 256
13:43:55 T:151093248  NOTICE: Finding audio codec for: 86016
13:43:55 T:151093248   DEBUG: FactoryCodec - Audio: libmad - Opening
13:43:55 T:151093248   DEBUG: SECTION:LoadDLL(libmad.0.dylib)
13:43:55 T:154079232   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
13:43:55 T:151093248   DEBUG: Loading: /var/stash/Applications/XBMC.frappliance/Frameworks/libmad.0.dylib
13:43:55 T:151093248   DEBUG: FactoryCodec - Audio: libmad - Opened
13:43:55 T:151093248  NOTICE: Creating audio thread
13:43:55 T:157450240  NOTICE: running thread: CDVDPlayerAudio::Process()
13:43:55 T:151093248  NOTICE: Opening teletext stream: 2 source: 256
13:43:55 T:151093248  NOTICE: Creating teletext data thread
13:43:55 T:160182272  NOTICE: running thread: CDVDTeletextData
13:43:55 T:151093248   DEBUG: CDVDPlayer::SetCaching - caching state 2
13:43:55 T:157450240   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(89755.888890, 1)
13:43:55 T:157450240  NOTICE: Creating audio stream (codec id: 86016, channels: 2, sample rate: 48000, no pass-through)
13:43:55 T:157450240    INFO: CCoreAudioAE::MakeStream - AE_FMT_FLOAT, 48000, 0, FL,FR
13:43:55 T:157450240   DEBUG: AERemap: Downmix normalization is disabled
13:43:55 T:157450240    INFO: CCoreAudioGraph::Open: Input Stream Format  [lpcm] Mixable Interleaved 2 Channel 32-bit Floating Point LE (48000Hz)
13:43:55 T:157450240    INFO: CCoreAudioGraph::Open: Output Stream Format [lpcm] Mixable Non-Interleaved 2 Channel 32-bit Signed Integer LE (44100Hz)
13:43:55 T:154079232   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(295322.555554, 0)
13:43:55 T:154079232    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
13:43:55 T:157450240   DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
13:43:55 T:151093248   DEBUG: CDVDPlayer::HandleMessages - player started 1
13:43:55 T:154079232  NOTICE:  fps: 25.000000, pwidth: 720, pheight: 576, dwidth: 720, dheight: 405
13:43:55 T:154079232   DEBUG: OutputPicture - change configuration. 720x576. framerate: 25.00. format: YV12
13:43:55 T:129236992   DEBUG: ------ Window Init (DialogSeekBar.xml) ------
13:43:55 T:154079232 WARNING: CRenderManager::Configure - timeout waiting for previous frame
13:43:55 T:154079232  NOTICE: Display resolution DESKTOP : 1280x720 (16)
13:43:55 T:129236992   DEBUG: CGUIInfoManager::SetCurrentMovie(pvr://channels/tv/All TV channels/9.pvr)
13:43:55 T:129236992   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
13:43:55 T:129236992   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
13:43:55 T:129236992  NOTICE: Using GL_TEXTURE_2D
13:43:55 T:129236992   DEBUG: GL: Requested render method: 0
13:43:55 T:129236992  NOTICE: GL: Using software color conversion/RGBA render method
13:43:55 T:129236992  NOTICE: GL: NPOT texture support detected
13:43:55 T:129236992   DEBUG: GL: Creating RGB NPOT texture of size 720 x 576
13:43:55 T:129236992   DEBUG: GL: Creating RGB NPOT texture of size 720 x 288
13:43:55 T:129236992   DEBUG: Previous line repeats 1 times.
13:43:55 T:129236992   DEBUG: GL: Creating RGB NPOT texture of size 720 x 576
13:43:55 T:129236992   DEBUG: GL: Creating RGB NPOT texture of size 720 x 288
13:43:55 T:129236992   DEBUG: Previous line repeats 1 times.
13:43:55 T:129236992   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
13:43:55 T:151093248   DEBUG: set caching from pvr to done. audio (1) = 14. video (1) = 13
13:43:55 T:151093248   DEBUG: CDVDPlayer::SetCaching - caching state 0
13:43:55 T:157450240   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:511710.138890, should be:68446.597220, error:-443263.541670
13:43:55 T:129236992   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
13:43:55 T:151093248   DEBUG: CDVDPlayer::HandleMessages - player started 2
13:43:56 T:157450240 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
13:44:00 T:151093248 WARNING: Previous line repeats 21 times.
13:44:00 T:151093248   DEBUG: audio stream stalled. start buffering
13:44:00 T:151093248   DEBUG: CDVDPlayer::SetCaching - caching state 2
13:44:00 T:129236992   DEBUG: ------ Window Init (DialogSeekBar.xml) ------
13:44:00 T:151093248   DEBUG: CDVDPlayer::HandleMessages - player started 1
13:44:00 T:151093248   DEBUG: CDVDPlayer::HandleMessages - player started 2
13:44:00 T:151093248   DEBUG: set caching from pvr to done. audio (1) = 11. video (1) = 13
13:44:00 T:151093248   DEBUG: CDVDPlayer::SetCaching - caching state 0
13:44:00 T:157450240   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:4650742.472220, should be:4508447.597224, error:-142294.874995
13:44:00 T:157450240 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
13:44:00 T:129236992   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
13:44:00 T:157450240 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available
13:44:03 T:151093248 WARNING: Previous line repeats 12 times.
13:44:03 T:151093248   DEBUG: audio stream stalled. start buffering
13:44:03 T:151093248   DEBUG: CDVDPlayer::SetCaching - caching state 2

Thanks in advance for any help.


RE: XBMC buffering live tv. - Qiztrek1 - 2013-02-06

Am also experiencing bad buffering with back end Mediaportal on atv2. Works fine with XBMC and Mediaportal on windows 7 so it must be something within Atv2. Playing movies from my media server is also Ok and NaviX and all other streaming are acceptable but Live Tv is just unbearable. Any suggestions will be welcome.


RE: XBMC buffering live tv. - adamc - 2013-03-22

Me too, previously used the myth box plugin with this atv2 on xbmc11 no issues there


RE: XBMC buffering live tv. - jwdv22 - 2013-03-29

Out of curiosity can you post the recorded files details with something like MediaInfo? I had a Atv2 second gen and I got rid of it cause of I was having so many issues with HD recorded video 1080p. The Atv2 I had was unable to do anything above 720p. Do you have a file that isn't from Mythtv in 1080p that you can test against?


RE: XBMC buffering live tv. - skippy - 2013-03-29

ATV2 cannot handle MPEG2 OTA content. That's why you are getting all the stuttering / buffering. The atv2 can handle mpeg 4 content at 720p and some 1080p. All the HD OTA stuff will not be playable. You may occasionally get lucky with some standard def content.


RE: XBMC buffering live tv. - adamc - 2013-03-30

Skippy, it works fine via myth://user:pass@ipaddress no skipping, just poor integration and detail


RE: XBMC buffering live tv. - FernetMenta - 2013-03-30

According to the snippet of the log pasted above those are audio issues of XBMC. I observe this too, on every commercial break when audio switches from 5.1 to stereo of back audio stalls and triggers buffering.


RE: XBMC buffering live tv. - fritsch - 2013-03-30

On a commercial break, that audio format probably changes. AE initializes its audio stream, when MakeStream is called the first time, the sink is inited and so on. Afterwards packages are just added. When you don't use passthrough, that is the case with mp2, the transcoding and everything else is setup.

Now, format changes and the sink should be reinitialized - I am not sure if that is to be done by AE, or if pvr should call reinit of the sink, when the stream changes. Never the less, we must find a solution for this.


RE: XBMC buffering live tv. - FernetMenta - 2013-03-31

Quote:I am not sure if that is to be done by AE, or if pvr should call reinit of the sink, when the stream changes

That is out of scope of pvr. Player calls drain on the audio stream before opening a new one. Currently it looks like that drain loses audio packets.


RE: XBMC buffering live tv. - adamc - 2013-04-02

It doesn't just happen during commercial breaks, it's continual. TBH it's my mum experiencing the issue, she has a mythtv backend, 3 atv2 front ends and a raspberry pi. A wired network 10/100 to the house 1gb to he server (Cisco cat 2960)

The pi will play with no issue, the atv2's will buffer unless played via myth://

Next time I'm there I'll see if I can grab some logs from the atv2's and the pi for comparison.