Feature #518
Samba streaming
Status: | Fixed | Start date: | 05/19/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | Filesystem | |||
Target version: | 3.4 |
Description
adding support to play from my samba shares would be great, upnp doesn't always work the way it should.
Associated revisions
Initial work on a native Samba/CIFS
This is not very well tested against different servers but should
hopefully work to some extent
Fixes #518
History
#1
Updated by Cassius c almost 10 years ago
Dan Smith wrote:
adding support to play from my samba shares would be great, upnp doesn't always work the way it should.
This is the one feature that would make this program complete and make this a true competitor to XBMC. You would then not need to worry about issues with specific UPNP media servers.
#2
Updated by Andreas Smas almost 10 years ago
- Category set to Filesystem
#3
Updated by Andreas Smas almost 10 years ago
- Assignee set to Andreas Smas
#4
Updated by Andreas Smas almost 10 years ago
- Target version set to 3.0
#5
Updated by Andreas Smas almost 10 years ago
- Target version changed from 3.0 to 33
#6 Updated by Anonymous over 9 years ago
Any further updates regarding this feature? It's the 1 feature that would make it the complete media player for me.
#7
Updated by Andreas Smas over 9 years ago
Ok I've been working on this back and forth.
I have something that works OK when playing from Showtime on my Linux to a local install of Samba on Linux.
Deals with authentication both on host and share level.
Still does not work OK when trying to connect to a Windows server. No idea why (yet) but i'll find out eventually.
Also there is no browsing on the network yet (you need to enter a bookmark like smb://hostname/SHARE to be able to use it)
I don't wanna publish this before at least the windows integration works ok cause i will probably just get loads of bugs for stuff I already know is broken.
So, there's the update. Don't loose faith!
#8
Updated by Dick Dahlgren over 9 years ago
This sounds good. Have you had the possibility to try a nas?
#9
Updated by Wayne Bryant over 9 years ago
Looking forward to this, Showtime is the reason I went down the cfw route and am very excited about something that can replace my XBMC without having to use the terrible TwonkyServer on my Lacie drive.
Keep up the good work Andreas, it very much appreciated
#10
Updated by Dick Dahlgren over 9 years ago
Andreas couldn't you release the function for smb as a beta ?
#11
Updated by Arg Tan over 9 years ago
This is the one feature stopping me from moving over from XBMC. I store all data on my NAS and hate using DNLA -so unreliable and odd sort methods.
#12
Updated by Andreas Smas over 9 years ago
- Status changed from New to Accepted
- Target version changed from 33 to 3.4
#13
Updated by Andreas Smas over 9 years ago
- Status changed from Accepted to Fixed
- % Done changed from 0 to 100
Applied in changeset 147fd043ae10e678568cc1e5c4d1bb2d77ae36b3.
#14
Updated by Andreas Smas over 9 years ago
Read a bit about it here: https://www.lonelycoder.com/redmine/projects/showtime/wiki/SAMBA_(CIFS)_client
#15
Updated by Alexandre Zia over 9 years ago
Hi Andreas,
Thank you very much for this feature, awesome achievement and most welcome.
Worked well on a Linux Samba Server
But did not work with MacOSX 10.6.8 which uses samba (3.0.28a-apple)
Not with a valid user and not with guest user (not providing username and password)
MacOSX server logs these lines (ending with a STATUS_BUFFER_OVERFLOW):
[2011/10/04 22:57:09, 1, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/service.c:make_connection_snum(1092)
10.0.1.122 (10.0.1.122) connect to service Movies initially as user arz (uid=501, gid=20) (pid 14348)
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/sec_ctx.c:set_sec_ctx(278)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/reply.c:reply_tcon_and_X(582)
tconX service=Movies
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/process.c:process_smb(1091)
Transaction 3 of length 80
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/process.c:switch_message(932)
switch message SMBtrans2 (pid 14348) conn 0x100852450
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/sec_ctx.c:set_sec_ctx(278)
setting sec ctx (501, 20) - sec_ctx_stack_ndx = 0
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/trans2.c:call_trans2qfilepathinfo(3426)
call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 257
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/vfs.c:reduce_name(841)
reduce_name [.] [/Volumes/EXT NTFS/Movies]
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/vfs.c:reduce_name(942)
reduce_name: . reduced to /Volumes/EXT NTFS/Movies
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/trans2.c:call_trans2qfilepathinfo(3483)
call_trans2qfilepathinfo . (fnum = -1) level=257 call=5 total_data=0
[2011/10/04 22:57:09, 3, pid=14348] /SourceCache/samba/samba-235.7/samba/source/smbd/error.c:error_packet_set(106)
error packet at /SourceCache/samba/samba-235.7/samba/source/smbd/trans2.c(618) cmd=50 (SMBtrans2) STATUS_BUFFER_OVERFLOW
While showtime logs a "connection timeout" message.
I'm trying to find out what is happening.
Thanks in advance.
Alexandre Zia
#16
Updated by Andreas Smas over 9 years ago
Ok, any additional input is interesting. Can you do packet dumps as well?
tcpdump -i networkinterfacename -s 1600 -w smb.cap port 445
should be sufficient on your MAC
Btw, I've tested it on 10.7 and there it even fails during negotiation :/
Also was your attempts done on a PS3 or something else?
#17
Updated by Alexandre Zia over 9 years ago
Just for information:
I've disabled native MacOSX samba and installed new samba via macports, and it worked very well.
Both MacOSX Snow Leopard(10.6.8) and Lion(10.7.1)
I'm using a PS3.
#18
Updated by Andreas Smas over 9 years ago
Ok cool. I'm gonna try to fix the code so it works fine with extended authentication too.
#19
Updated by Arg Tan over 9 years ago
Working nicely here from a Thecus n7700 nas with normal user/pass authentication.
I have added two share folders to different paths on the network, both working ok.
Browsing subfolders within the share works perfectly - no issues at all. Will be testing playback more extensively tonight, but it seems to be fine at this stage.
#20
Updated by Dick Dahlgren over 9 years ago
Keep getting "No handler for URL" probably because of me, but any guess on what to do ?
#21
Updated by Alexandre Zia over 9 years ago
I think that it will be very difficult to make it work with MacOSX Lion(10.7.x), since Apple discarded samba and developed a proprietary SMBv2 solution.
In this case, replacing native MacOSX SMB implementation by macports samba is a solution, but is not a job for beginners and regular users.
#22
Updated by sam azerty over 9 years ago
Hi,
I tried to stream a MKV movie file from my NAS (Synology DS410j):
- if I use UPnP/DLNA, the movie is fluid but I can not navigate through the movie (all cursor move raise the film's beginning)
- If I use the SMB protocol (same file in the server), the film stutters, the buffer is empty, for against the cursor can be moved in the movie.
When I look at the graph of the network I see the NAS with SMB flow that caps a 1500 bit/s and when it is DLNA/upnp that amounts to more than 8000 bit/s.
if I can help by testing and send you log and other informations, please feel free to ask me.
thank you for your great job and great to port to PS3.
#23
Updated by Jukka - over 9 years ago
I need to say that this feature kicks ass! Now at last I'm able to stream all needed material from my pc to living room. And showtime makes it well, movies, music etc even youtube, thanks!
I have used 3.3.127 version with windows 7 and managed get it to work just using the share function. (http://www.redsquirrel87.com/ShowtimeUnofficial.html)
I use anonymous access (no username, no password) and it works fine.
I have 1 Gb wired network.
As assumed max speed was about 1,5 limit so no hd etc. But otherwise it worked very well much better and pro than dlna.
I also managed get it to work via full speed using this information.
http://b.snapfizzle.com/2009/09/windows-7-nagles-algorithm-and-gaming/
After making the registry changes I was able to watch full hd material way over 10 Mb speed, difference was very clear.
Problem is that I tried to use v3.3.143 and v3.3.149 versions but they are broken.
I can browse directories but when I try to open exact same movie that worked with 3.3.127 version i just get error saying something unable to process input stream.
I switched back to 127 version and it was fine again.
So something went broke.
Is it possible to fix this or restore it as it was?
I can test versions.
-Jukka
#24
Updated by Andreas Smas over 9 years ago
I believe the win7 compat issue has been fixed.
I've also disabled TCP nagle on these connections so it should be able to load faster.
That said there is still more that can be done.
In particular I hope to be able to send more read requests at once if the internal
read requests exceeded the maximum read limit of CIFS
So right now it's like this:
Showtime SMB Server --------------------------- Read -> <- Reply Read -> <- Reply Read -> <- Reply
But i'd like to change this into:
Showtime SMB Server --------------------------- Read -> Read -> Read -> <- Reply <- Reply <- Reply
Which should hopefully be faster
#25
Updated by Miguel Ribeiro over 9 years ago
Jukka - wrote:
I need to say that this feature kicks ass! Now at last I'm able to stream all needed material from my pc to living room. And showtime makes it well, movies, music etc even youtube, thanks!
I have used 3.3.127 version with windows 7 and managed get it to work just using the share function. (http://www.redsquirrel87.com/ShowtimeUnofficial.html)
I use anonymous access (no username, no password) and it works fine.
I have 1 Gb wired network.
As assumed max speed was about 1,5 limit so no hd etc. But otherwise it worked very well much better and pro than dlna.
I also managed get it to work via full speed using this information.http://b.snapfizzle.com/2009/09/windows-7-nagles-algorithm-and-gaming/
After making the registry changes I was able to watch full hd material way over 10 Mb speed, difference was very clear.
Problem is that I tried to use v3.3.143 and v3.3.149 versions but they are broken.
I can browse directories but when I try to open exact same movie that worked with 3.3.127 version i just get error saying something unable to process input stream.
I switched back to 127 version and it was fine again.
So something went broke.
Is it possible to fix this or restore it as it was?
I can test versions.
-Jukka
how do you do that Jukka?
I have tried using samba but when it asks for a password i dont know what to do...i tried my windows account password but it doesnt work=/
#26
Updated by Arg Tan over 9 years ago
Tested again tonight on unofficial build 203 by a certain squirrel.
Working beautifully - speeds seem to be excellent. I haven't done any quantification of results, but speed of play over the network seems faster and very smooth. Will continue testing high res content, but all seems to be good at this stage.
Thanks Andreas!
#27
Updated by Andreas Smas over 9 years ago
Glad to hear that it's working better.
If you find any additional problems, please file a new ticket.
#28
Updated by Eric Sauner over 9 years ago
Just wondering how I would log in as guest; the ps3 complain authentication is necessary even though I have no login on my win7 machine....sorry not good with samba input1 Any help would be appreciated!
#29
Updated by Jeremy McLeod over 9 years ago
Eric,
Windows 7 by default will not let you share folders to users that don't have a password. You can disable that behavior by following this guide: http://www.windows7home.net/share-folders-or-printers-without-password-in-windows-7/
However, that's not an especially secure solution. I'd recommend setting a password on your windows account. If you don't want to be bothered to login when you boot up your computer you can hit WinKey+R and type "control userpasswords2" to select a default account to login to on boot.