xbmc play video but hangs totally when I run this script...
#1
Hi,

I try to dynamically create a playlist depending on the time of the day but when I run the script the video plays but controller does not work so I can't do anything but hard-shutdown! Huh

do you have an idea?

here is the script:

Code:
#############################################################################
# FRANCE2
#############################################################################


# code
import time
import urllib
import xbmc, xbmcgui

currentHour= int(time.strftime ('%H'))

if currentHour > 20 or currentHour < 9:
  url1="20h_Repair.wmv"
  url2="13h_Repair.wmv"
  url3="08h_Repair.wmv"
else:
  if currentHour > 9 and currentHour < 14:
    url1="08h_Repair.wmv"
    url2="20h_Repair.wmv"
    url3="13h_Repair.wmv"
  else:
    url1="13h_Repair.wmv"
    url2="08h_Repair.wmv"
    url3="20h_Repair.wmv"

url1="ftp://192.168.1.1:21/share/Video/emissions/france2/"+url1
url2="ftp://192.168.1.1:21/share/Video/emissions/france2/"+url2
url3="ftp://192.168.1.1:21/share/Video/emissions/france2/"+url3

pl=xbmc.PlayList(1)
pl.clear()

listitem = xbmcgui.ListItem('France2-1',thumbnailImage='e:\\apps\\XBMC\\plugins\\video\\France2 (journal)\\default.tbn')
xbmc.PlayList(1).add(url1, listitem)
listitem = xbmcgui.ListItem('France2-2',thumbnailImage='e:\\apps\\XBMC\\plugins\\video\\France2 (journal)\\default.tbn')
xbmc.PlayList(1).add(url2, listitem)
listitem = xbmcgui.ListItem('France2-3',thumbnailImage='e:\\apps\\XBMC\\plugins\\video\\France2 (journal)\\default.tbn')
xbmc.PlayList(1).add(url3, listitem)


xbmc.Player().play(pl)
Reply
#2
perhaps a Debug Log will tell you what is happening
Reply
#3
15:46:12 M: 27258880 DEBUG: msg: Opening video decoder: [dmo] DMO video codecs
15:46:12 M: 27258880 DEBUG: LoadLibraryA('wmv9dmod.dll')
15:46:12 M: 26398720 DEBUG: Unable to resolve kernel32.dll GetModuleHandleW
15:46:12 M: 26398720 DEBUG: Unable to resolve kernel32.dll GetLocalTime
15:46:12 M: 26398720 DEBUG: Unable to resolve kernel32.dll GetDiskFreeSpaceA
15:46:12 M: 26398720 DEBUG: Unable to resolve kernel32.dll GetComputerNameA
15:46:12 M: 26398720 DEBUG: Unable to resolve kernel32.dll GetThreadPriority
15:46:12 M: 26398720 DEBUG: Unable to resolve msvcrt.dll _winver
15:46:12 M: 26398720 DEBUG: Unable to resolve gdi32.dll GetSystemPaletteEntries
15:46:13 M: 26398720 DEBUG: Unable to resolve ordinal oleaut32.dll 8
15:46:13 M: 26398720 DEBUG: Unable to resolve advapi32.dll GetUserNameA
15:46:13 M: 26398720 DEBUG: Dll SHLWAPI.dll was not found in path
15:46:13 M: 26398720 DEBUG: Unable to load referenced dll SHLWAPI.dll - Dll: Q:\system\players\mplayer\codecs\wmv9dmod.dll
15:46:13 M: 26398720 DEBUG: Unable to resolve SHLWAPI.dll SHDeleteKeyA
15:46:13 M: 26398720 DEBUG: Unable to resolve msdmo.dll DMORegister
15:46:13 M: 26398720 DEBUG: Unable to resolve msdmo.dll DMOUnregister
15:46:13 M: 26398720 DEBUG: dllGetProcAddress(007C7F88(kernel32.dll), 'UnhandledExceptionFilter') => 000CB0A8
15:46:13 M: 26398720 DEBUG: LoadLibrary('wmv9dmod.dll') returning: 010651B0
15:46:13 M: 26398720 DEBUG: dllGetProcAddress(02470000(wmv9dmod.dll), 'DllGetClassObject') => 024795C0
15:46:13 M: 26386432 DEBUG: LoadLibraryA('kernel32.dll')
15:46:13 M: 26386432 DEBUG: LoadLibrary('kernel32.dll') returning: 007C7FC8
15:46:13 M: 26386432 DEBUG: dllGetProcAddress(007C7F88(kernel32.dll), 'InterlockedCompareExchange') => 000CE964
15:46:13 M: 26386432 DEBUG: msg: DMO dll supports VO Optimizations 0 1
15:46:13 M: 26386432 DEBUG: msg: DMO dll might use previous sample when requested
15:46:13 M: 26386432 DEBUG: msg: GetOutput r=0x0 size:248832 align:1
15:46:13 M: 26386432 DEBUG: msg: StreamCount r=0x0 1 1
15:46:14 M: 26386432 DEBUG: msg: Decoder supports the following YUV formats:
15:46:14 M: 26386432 DEBUG: msg: YV12
15:46:14 M: 26386432 DEBUG: msg: YUY2
15:46:14 M: 26386432 DEBUG: msg: UYVY
15:46:14 M: 26386432 DEBUG: msg: YVYU
15:46:14 M: 26386432 DEBUG: msg: 
15:46:14 M: 26386432 DEBUG: msg: 
15:46:14 M: 26386432 DEBUG: msg: 
15:46:14 M: 26386432 DEBUG: msg: 
15:46:14 M: 26386432 DEBUG: msg:
15:46:14 M: 26386432 DEBUG: msg:
15:46:14 M: 26386432 DEBUG: msg: Decoder is capable of YUV output (flags 0x1b)
15:46:14 M: 26386432 DEBUG: msg: VDec: vo config request - 384 x 216 (preferred colorspace: Packed YUY2)
15:46:14 M: 26386432 DEBUG: msg: Trying filter chain:
15:46:14 M: 26386432 DEBUG: msg: vo
15:46:14 M: 26386432 DEBUG: msg:
15:46:14 M: 26386432 DEBUG: msg: VDec: using Planar YV12 as output csp (no 0)
15:46:14 M: 26386432 DEBUG: msg: Movie-Aspect is undefined - no prescaling applied.
15:46:15 M: 26386432 DEBUG: msg: VO Config (384x216->384x216,flags=1,'MPlayer',0x32315659)
15:46:15 M: 26386432 DEBUG: msg: VO: [directx] 384x216 => 384x216 Planar YV12 [fs]
15:46:15 M: 26386432 DEBUG: msg: VO: Description: XBOX Direct3D8 YUY2 renderer
15:46:15 M: 26386432 DEBUG: msg: VO: Author: Frodo/JCMarshall
15:46:15 M: 26386432 DEBUG: mplayer::video_config(384, 216, 384, 216, 1, 842094169)
15:46:15 M: 26386432 NOTICE: Display resolution AUTO : PAL 16:9 (7)
15:46:15 M: 25722880 DEBUG: Created YV12 texture 0
15:46:15 M: 25583616 DEBUG: Created YV12 texture 1
15:46:15 M: 25583616 DEBUG: msg: INFO: Win32/DMO video codec init OK.
15:46:15 M: 25583616 DEBUG: msg: Selected video codec: [wmv9dmo] vfm:dmo (Windows Media Video 9 DMO)
15:46:15 M: 25583616 DEBUG: msg: ==========================================================================
15:46:15 M: 25583616 DEBUG: msg: Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/6ch/16bit...
15:46:15 M: 25583616 DEBUG: msg: [libaf] Adding filter dummy
15:46:15 M: 25583616 DEBUG: msg: [dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
15:46:15 M: 25583616 DEBUG: msg: AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
15:46:16 M: 25583616 DEBUG: msg: AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
15:46:16 M: 25538560 DEBUG: Pause stream
15:46:16 M: 25538560 DEBUG: msg: AO: [win32] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
15:46:16 M: 25538560 DEBUG: msg: AO: Description: Windows waveOut audio output
AO: Author: SaschaSommer <[email protected]>
15:46:16 M: 25538560 DEBUG: msg: Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
15:46:16 M: 25538560 DEBUG: msg: [dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
15:46:16 M: 25538560 DEBUG: msg: [dummy] Was reinitialized, rate=44100Hz, nch = 2, format = 0x00000001 and bps = 2
15:46:16 M: 25468928 DEBUG: msg: Starting playback...
15:46:16 M: 25468928 DEBUG: msg: mplayer_open_file(ftpx://192.168.1.1:21/share/Video/emissions/france2/13h_Repair.wmv) done 1.0000
15:46:16 M: 25370624 DEBUG: Activating window ID: 12005
15:46:16 M: 25894912 DEBUG: Playback has started
15:46:16 M: 25894912 DEBUG: Checking if window ID 12005 is locked.
15:46:16 M: 27271168 DEBUG: msg:
avg. framerate: 24 fps
15:46:16 M: 27144192 DEBUG: Setting resolution 7
15:46:16 M: 27144192 DEBUG: msg: *** [vo] Allocating mp_image_t, 384x216x12bpp YUV planar, 124416 bytes
15:46:16 M: 27496448 DEBUG: We set resolution 7
15:46:16 M: 25841664 INFO: Starting async renderer thread
15:46:17 M: 25980928 DEBUG: Deleted YV12 texture 1
15:46:17 M: 25980928 INFO: Loading skin file: VideoFullScreen.xml
15:46:17 M: 25976832 DEBUG: Load VideoFullScreen.xml: 103.51ms
15:46:17 M: 25976832 DEBUG: Alloc resources: 155.27ms (155.26 ms skin load, 0.01 ms preload)
15:46:17 M: 25976832 INFO: Loading skin file: VideoOSD.xml
15:46:17 M: 25972736 DEBUG: Load VideoOSD.xml: 83.00ms
15:46:17 M: 25169920 DEBUG: Alloc resources: 41.62ms (0.00 ms skin load, 4.46 ms preload)
15:46:17 M: 25169920 INFO: Loading skin file: VideoOSDSettings.xml
15:46:17 M: 25174016 DEBUG: Load VideoOSDSettings.xml: 75.25ms
15:46:17 M: 24473600 DEBUG: Alloc resources: 47.62ms (0.00 ms skin load, 0.79 ms preload)
15:46:17 M: 24473600 INFO: Loading skin file: VideoOSDSettings.xml
15:46:17 M: 24465408 DEBUG: Load VideoOSDSettings.xml: 79.14ms
15:46:17 M: 24465408 DEBUG: Alloc resources: 0.68ms (0.00 ms skin load, 0.32 ms preload)
15:46:18 M: 24354816 INFO: Scriptresult: Succes
15:46:18 M: 24354816 INFO: Python script stopped
15:46:18 M: 24854528 INFO: Loading skin file: DialogProgress.xml
15:46:18 M: 24854528 DEBUG: Load DialogProgress.xml: 122.25ms
Reply
#4
Hi,
this script is run from video window on which I added a source to the python script.Maybe this detail can give a hint to the cause of the hung problem?

thanks
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc play video but hangs totally when I run this script...0