Issues with video playback and network paths
#1
In working with my SageTV addon I've been testing various network path playback options, both from the Python add-on and using XBMC's filemode.

As discussed on IRC the built-in command PlayMedia does strange things with leading \ in a path such as:

Code:
\\PVR\Recorded TV\

To get around this I have to inject "\\\\" before the path in order for it to work properly. To not have to do this workaround I tried using a smb: style path such as:
Code:
smb://PVR/Recorded TV/

But if I use this style path, the built-in PlayMedia command will fail to play the file every time.

I did more testing just using XBMC's filemode for video playback. I found that files that are growing would not playback in filemode with a smb:// style path as the source, but would playback using a \\PVR\ style source path. When using smb:// I would see the following in the log:
Code:
12:17:23 T:5144   DEBUG: Trying to connect to \\PVR\Media with username() and password(XXXX)
12:17:23 T:5144   ERROR: CWINFileSMB: Unable to open file '\' Error '32

Files that are not growing playback fine from the smb:// style path and do not show any attempt at connecting with a username and password in the log .
Reply
#2
Okay , this seems to be getting even more complicated. It is driving me crazy.

If I use a path such as:
Code:
//PVR/Media/Recorded TV

and pass that to the builtin PlayMedia command in the addon, it works perfectly.
Code:
12:25:16 T:4624  NOTICE: Attempting to playback mediafileid=2793637 with size=0 at strFilepath=//PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg
12:25:20 T:6132   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
12:25:20 T:5892   DEBUG: CAESinkDirectSound::Deinitialize: Cleaning up
12:25:20 T:5892   DEBUG: CSoftAE::Run - Sink restart flagged
12:25:20 T:5892    INFO: CSoftAE::InternalOpenSink - sink incompatible, re-starting
12:25:20 T:5892   DEBUG: CAESinkDirectSound::Initialize: Using Window handle: 1180958
12:25:20 T:5892   DEBUG: CAESinkDirectSound::Initialize: secondary buffer created
12:25:20 T:5892   DEBUG: CAESinkDirectSound::Initialize: Initializing DirectSound with the following parameters:
12:25:20 T:5892   DEBUG:   Audio Device    : Speakers (Realtek High Definition Audio)
12:25:20 T:5892   DEBUG:   Sample Rate     : 44100
12:25:20 T:5892   DEBUG:   Sample Format   : AE_FMT_FLOAT
12:25:20 T:5892   DEBUG:   Bits Per Sample : 32
12:25:20 T:5892   DEBUG:   Valid Bits/Samp : 32
12:25:20 T:5892   DEBUG:   Channel Count   : 2
12:25:20 T:5892   DEBUG:   Block Align     : 8
12:25:20 T:5892   DEBUG:   Avg. Bytes Sec  : 352800
12:25:20 T:5892   DEBUG:   Samples/Block   : 32
12:25:20 T:5892   DEBUG:   Format cBSize   : 22
12:25:20 T:5892   DEBUG:   Channel Layout  : FL,FR
12:25:20 T:5892   DEBUG:   Channel Mask    : 3
12:25:20 T:5892   DEBUG:   Frames          : 441
12:25:20 T:5892   DEBUG:   Frame Samples   : 882
12:25:20 T:5892   DEBUG:   Frame Size      : 8
12:25:20 T:5892    INFO: CSoftAE::InternalOpenSink - DirectSound Initialized:
12:25:20 T:5892    INFO:   Output Device : {6CCCB974-4414-4A58-84B6-0401E4C130B6}
12:25:20 T:5892    INFO:   Sample Rate   : 44100
12:25:20 T:5892    INFO:   Sample Format : AE_FMT_FLOAT
12:25:20 T:5892    INFO:   Channel Count : 2
12:25:20 T:5892    INFO:   Channel Layout: FL,FR
12:25:20 T:5892    INFO:   Frames        : 441
12:25:20 T:5892    INFO:   Frame Samples : 882
12:25:20 T:5892    INFO:   Frame Size    : 8
12:25:20 T:5892   DEBUG: CSoftAE::Initialize - Using speaker layout: 2.0
12:25:20 T:5892   DEBUG: CAESinkDirectSound::CheckPlayStatus: Resuming Playback
12:25:21 T:4624    INFO: Scriptresult: Success
12:25:21 T:4624    INFO: Python script stopped
12:25:21 T:4624   DEBUG: Thread XBPyThread 4624 terminating
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers(//PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg)
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: html
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/mms/udp
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
12:25:21 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
12:25:21 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
12:25:21 T:6132  NOTICE: DVDPlayer: Opening: //PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg
12:25:21 T:6132 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
12:25:21 T:6132   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
12:25:21 T:6132   DEBUG: DXVA - cheking samples array size using 842094158 render target
12:25:21 T:6132   DEBUG: DXVA - cheking samples array size using 842094169 render target
12:25:21 T:6980  NOTICE: Thread CDVDPlayer start, auto delete: false
12:25:21 T:6980  NOTICE: Creating InputStream

But using that same path with the normal "Play" command fails.
Code:
12:25:40 T:6132   DEBUG: ------ Window Deinit (DialogContextMenu.xml) ------
12:25:40 T:6132   DEBUG: CGUIWindowVideoBase::OnPlayMedia //PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers(//PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg)
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: html
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/mms/udp
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
12:25:40 T:6132   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
12:25:40 T:6132   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
12:25:40 T:6132  NOTICE: DVDPlayer: Opening: //PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg
12:25:40 T:6132 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
12:25:40 T:6132   DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
12:25:40 T:6132   DEBUG: DXVA - cheking samples array size using 842094158 render target
12:25:40 T:6132   DEBUG: DXVA - cheking samples array size using 842094169 render target
12:25:40 T:4084  NOTICE: Thread CDVDPlayer start, auto delete: false
12:25:40 T:4084  NOTICE: Creating InputStream
12:25:40 T:4084   ERROR: CDVDPlayer::OpenInputStream - error opening [//PVR/Media/Recorded TV/LooneyTunes-2758023-0.mpg]
12:25:40 T:4084  NOTICE: CDVDPlayer::OnExit()
12:25:40 T:4084  NOTICE: CDVDPlayer::OnExit() deleting input stream
12:25:40 T:4084   DEBUG: Thread CDVDPlayer 4084 terminating
Reply
#3
//PVR/Media/Recorded TV isn't a valid path on windows xbmc. I assume its somewhere wrongly seen as linux path and the first slash is stripped and then converted to windows style \.
using \\PVR\Recorded TV\ in code normally means to escape the slashes which means this would be correct \\\\PVR\\Recorded TV\\.
Dunno if we support smb:// paths but I assume we should.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
If you review the first post, you can see the issues with the PlayMedia command and it stripping the leading \ of a \\ style path. I therefore add \\\\ to the path in order for it to pass properly as a \\ path.

smb:// paths work great in file mode as well as the standard "play" context menu item in an addon. smb:// paths FAIL in an addon when passing it to the builtin PlayMedia command. See the first post.

// paths work perfectly fine in the addon with builtin PlayMedia command. You can even see in the logs of the seconds post how the path is passed and played. But then these paths fail with the standard "play" context menu item.

This makes no sense to me.

Also look at the last part of the first post about growing files. This is also another wrinkle to this issue.

I believe Linux likes // style paths, so in trying to make the addon work across all platforms, I was hoping to just use // style paths and be done with it. That is what led me to this next round of test and observations.

Another observation:
In video file mode, I added a video source as:
//PVR/Media/Recorded TV

The source was added. But playing any thing from that source it converts the path to \\PVR\Media\Recorded TV\

Reply
#5
I'm going to use this thread to log my various test, here are some more of them.

In each case I am playing back the exact same remote file.
TheTalk-S03E15-2776732-0.mpg

This file is growing as it is a show that is currently in progress recording from SageTV. The file is not locked for reading, only for writing.

I did the following tests using XBMC video file mode.

WORKS:
Mapped networked folder as Y:\. Path to file is:
Y:\TheTalk-S03E15-2776732-0.mpg

Video source added as //PVR/Media/Recorded TV/. Path is:
\\PVR\Media\Recorded TV\TheTalk-S03E15-2776732-0.mpg (Note the change of the /s)

Video source added as \\PVR\Media\Recorded TV\. Path is:
\\PVR\Media\Recorded TV\TheTalk-S03E15-2776732-0.mpg


FAILS:
Browsed to SMB source. Path to file is:
smb://PVR/Media/Recorded TV/TheTalk-S03E15-2776732-0.mpg

Video source added as smb://PVR/Media/Recorded TV/. Path is:
smb://PVR/Media/Recorded TV/TheTalk-S03E15-2776732-0.mpg
Reply
#6
What build of XBMC are you using? On current nightlies I get the "with username() and password(XXXX)" message on in-progress recordings but the same code works when the file is closed. On older builds pre Sept 15 it works fine,

Martin
Reply
#7
So are you saying you see the same thing as I stated above? In-progress recordings do not playback, but completed recordings do? Or are you saying something else?
Reply

Logout Mark Read Team Forum Stats Members Help
Issues with video playback and network paths0