Web content will not stream

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Re: Web content will not stream

Postby hans_gregor » Sun Dec 26, 2010 10:55 am

DSL = Domain-Specific Language i.e. the scripts are written in a "mini language" focused on web video scraping.

I live to learn new things

I will probably add support for an additional command that allows an independent process to be launched (and killed). SopCast doesn't fit into the downloader -> transcoder paradigm.


that's what is missing, so it can be done as you said. launch and kill it every time you change the channel (eg get a new sop uri request)


There is no $EXECUTABLE. That was removed.

now I understand why was not working and could not find it in src
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 11:01 am

hans_gregor wrote:I tried that too before, may be I'm wrong, but the problem could be here


On Windows, the downloader pipes its output into the transcoder like this (these are just examples):

Code: Select all
downloader.exe --input http://example.com/video.mp4 --output - | transcoder.exe --input -


i.e. the downloader writes to STDOUT and the transcoder reads from STDIN. (Windows doesn't have Unix-style named pipes.)

On every other platform, it's done with a FIFO (AKA named pipe) e.g.:

Code: Select all
mkfifo downloader.out
downloader --input http://example.com/video.mp4 --output downloader.out
sleep 1
transcoder --input downloader.out


So on (e.g.) Linux, the SopCast script works:

Code: Select all
sopcast sop://example.com/
sleep 1
transcoder --input http://127.0.0.1:8902/stream


But on WIndows, it becomes:

Code: Select all
sopcast.exe sop://example.com/ | transcoder.exe --input http://127.0.0.1:8902/stream


- which doesn't work.
Last edited by chocolateboy on Sun Dec 26, 2010 11:18 am, edited 1 time in total.
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 11:15 am

hans_gregor wrote:that's what is missing, so it can be done as you said. launch and kill it every time you change the channel (eg get a new sop uri request)


Yes, it can be done, and will be if that's the best solution. But is it? Is it not possible to just start the SopCast server manually and then request different channels with different (local) URIs?

Pseudo-commands:

Code: Select all
sopcast start --config channels.xml
mplayer http://127.0.0.1:8902/stream/channel1
mplayer http://127.0.0.1:8902/stream/channel2
mplayer http://127.0.0.1:8902/stream/channel3
sopcast stop
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby DonVito » Sun Dec 26, 2010 2:14 pm

This looks very promising but I can't get it to work.. There are a few questions I have;

- Where do I put the https://github.com/chocolateboy/pmsenco ... ast.groovy file?
- How can I get a Sopcast channel to work on the ps3?
- The .Groovy file says: change /path/to/sopcast to the path to the sopcast binary to use it, can you give me an example of the path? Does it need to direct to my Sopcast folder on Windows? I don't understand..
- Do I have to add the Sopcast URL to WEB.conf? f.e. adding the following line?

#Sopcast
Videofeed.Web, NVS 1=sop://broker.sopcast.com:3912/74177

Any help on this? I know there's no documentation available yet, but it would be awesome to have some sort of step by step guide to setup Sopcast Streaming on the PS3.
DonVito
 
Posts: 6
Joined: Sun Dec 26, 2010 2:02 pm

Re: Web content will not stream

Postby Osiris X » Sun Dec 26, 2010 3:01 pm

@DonVito

Regarding where to put the .groovy script file, I believe that this has been covered in this thread. Note particularly in the new pmsencoder 1.2.x you can can specify parameter pmsencoder.script.directory in PMS.conf.

Have you actually downloaded and installed sopcast?

If you have then you will be able to find it using
whereis sopcast
or
locate sopcast
on linux

or probably in an appropriately named sub-folder in the "Program Files" directory of a windows installation.
Regards

Os
User avatar
Osiris X
 
Posts: 26
Joined: Thu Dec 02, 2010 2:15 pm
Location: London, UK

Re: Web content will not stream

Postby DonVito » Sun Dec 26, 2010 3:22 pm

Osiris X wrote:@DonVito

Regarding where to put the .groovy script file, I believe that this has been covered in this thread. Note particularly in the new pmsencoder 1.2.x you can can specify parameter pmsencoder.script.directory in PMS.conf.

Have you actually downloaded and installed sopcast?

If you have then you will be able to find it using
whereis sopcast
or
locate sopcast
on linux

or probably in an appropriately named sub-folder in the "Program Files" directory of a windows installation.
Regards

Os


Thanks for your reply Os, I've been using Sopcast for many years now, mostly to stream football matches etc.

Thing is I am not really into coding etc so I don't know the commands to add it to the PMS.Conf file.. I am using the PMSEncoder 1.2.4, what command should I add to specify the parameter pmsencoder.script.directory in PMS.conf? Can you give me an example?

About the Sopcast path in the .Groovy file, should it be something like C:\Program Files (x86)\SopCast?

btw I am using:

PS3 Media Server v1.20.409
PMSEncoder 1.2.4
Sopcast 3.2.9
Windows 7 x 64
DonVito
 
Posts: 6
Joined: Sun Dec 26, 2010 2:02 pm

Re: Web content will not stream

Postby Osiris X » Sun Dec 26, 2010 3:34 pm

@chocolateboy

Outstanding!

Please clarify the following for me:
1) $DEFAULT_TRANSCODER_ARGS is a generic set of arguments that are appended to any defined transcoder - correct?
2) The variable in which you define the transcoder executable is $TRANSCODER? (and it can be specified in .groovy script file?)
3) I have used '$DEFAULT_TRANSCODER_ARGS +=' to add a parameter to the transcoder arguments (inside a script context, but outside the profile context). How do I delete a parameter from the transcoder arguments list as part of a resultant action i.e. in a profile -> action contect.?

One unforeseen upshot of being able to specify a specific directory for the pmsencoder.log file, is that starting PS3MS as a variety of different users but with the same log file path can lead to log access errors due to permission problems.
I am facing a similar problem with the PS3MS debug.log file. The solution I am attempting to employ is to use an MDC (Mapped Diagnostic Context) to push a variable containing the name of the executing user to the configuration xml so that it can be appended to the log file name.
Could such a technique be used in pmsencoder for pmsencoder.log? (It was not clear to me if you are using slf4j or indeed whether that is necessary to leverage mdc)

Os
Last edited by Osiris X on Sun Dec 26, 2010 4:00 pm, edited 2 times in total.
User avatar
Osiris X
 
Posts: 26
Joined: Thu Dec 02, 2010 2:15 pm
Location: London, UK

Re: Web content will not stream

Postby hans_gregor » Sun Dec 26, 2010 3:46 pm

chocolateboy wrote:Yes, it can be done, and will be if that's the best solution. But is it? Is it not possible to just start the SopCast server manually and then request different channels with different (local) URIs?



what if ones server is in the basemenent,? what about the bandwidth when starting multiple streams (I have to check this)?
you said that the $DOWLOADER_OUT thing will work on linux. I will give it a try if it's easier to implement.

in the actual configuration is working acceptable.
it starts the sopcast.
it changes the channels
is transcoding (here I have to use always the loooback, after changing channels.
Future work need to be done
I can not kill it
I need some temp file do play/transcode while sopcast is buffering for the first time after changing a channel
Last edited by hans_gregor on Sun Dec 26, 2010 4:11 pm, edited 1 time in total.
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

Postby Osiris X » Sun Dec 26, 2010 3:51 pm

@DonVito

DonVito wrote:About the Sopcast path in the .Groovy file, should it be something like C:\Program Files (x86)\SopCast?


Your sopcast path for a Windows 7 machine sounds like it could be right, but I do not have a windows machine - so I cannot be certain. Clearly you can check for yourself using windows explorer , no?

DonVito wrote:I don't know the commands to add it to the PMS.Conf file.


PMS.conf is a text file, add commands to it using a standard text editor like notepad

DonVito wrote:I am using the PMSEncoder 1.2.4, what command should I add to specify the parameter pmsencoder.script.directory in PMS.conf? Can you give me an example?


I don't quite understand your question - all parameters in PMS.conf are specified in the same way
e.g. <parameter> = <value>
Thus you would insert something like
pmsencoder.script.directory = <absolute path way to the script directory presumably starting with the drive specification e.g. C:\ on a windows machine>

Regards

Os
User avatar
Osiris X
 
Posts: 26
Joined: Thu Dec 02, 2010 2:15 pm
Location: London, UK

Re: Web content will not stream

Postby hans_gregor » Sun Dec 26, 2010 4:10 pm

DonVito wrote:Thing is I am not really into coding etc so I don't know the commands to add it to the PMS.Conf file.. I am using the PMSEncoder 1.2.4, what command should I add to specify the parameter pmsencoder.script.directory in PMS.conf? Can you give me an example?

Code: Select all
pmsencoder.script.directory = PATH_TO_WHERE_YOU_HAVE_THE_SCRIPTS

DonVito wrote:About the Sopcast path in the .Groovy file, should it be something like C:\Program Files (x86)\SopCast?

On windows I edited/added into the Environment Variable Path the directory where sopcast is located eg C:\Program Files (x86)\SopCast;


For info and to understand how PMS is working, read the thread and check the source code here
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

PreviousNext

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot] and 15 guests