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 chocolateboy » Sat Dec 25, 2010 10:35 pm

stutunaru wrote:can you please test the latest pmsencoder against audiostream


We've discussed this at length, and, as I've said, I can't reproduce this issue with any version of PMS/PMSEncoder.

If it's a PS3 firmware issue, then you'll have to diagnose it yourself as I'm not on 3.5x and have no plans to "upgrade".

Alternatively, run two instances of PMS - one for video and one for audio.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby hans_gregor » Sun Dec 26, 2010 6:09 am

where I can find an example of how to replace a part of a string in a script/profile.
Because PMS ignores sop:// links in WEB.conf, I would like to input them as http:// and change them into sop:// in a script. is it possible?
Please ignore my ignorance, but I can't figure out how to do it.
thx
Last edited by hans_gregor on Sun Dec 26, 2010 6:39 am, edited 1 time in total.
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 6:26 am

hans_gregor wrote:where I can find an example of how to replace a part of a string in a script/profile.
Because PMS ignores sop:// links in WEB.conf, I would like to put them as http:// and change them into sop:// in a script. is it possible?


You can use this approach. i.e. match the modified URI in a pattern block, then change it to the correct URI in the action block.

Code: Select all
profile ('Sopcast Protocol') {
    pattern {
        // extract the domain/path into $address
        match $URI: '^http://sop/(?<address>.+)$' // e.g. http://sop/www.example.com/foo/bar.baz
    }

    action {
        // grab the stored $address value and reinstate the real URI
        $URI = "sop://${address}" // e.g. sop://www.example.com/foo/bar.baz
    }
}


I'll add native support for sop:// URIs in the next release.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 7:32 am

PMSEncoder 1.2.3 has been released.

This adds PMS support (e.g. via WEB.conf) for many new protocols, including sop:// and dvb://. See the release notes for more details.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby hans_gregor » Sun Dec 26, 2010 8:28 am

it's working great. thx

I need your help again. this is my script. I use a bdp370. The box manage to change channels in sopcast but is getting corrupt video message. I think has something to do with setting downloader. Is not able to connect back on the loopback profile.

Code: Select all
script {
def SURI = 'SOPCAST_URI'
def SLOO = 'SOPCAST_LOOPBACK'
def SPLA = 'SOPCAST_PLAY'


    profile (SURI) {
        def downloader = 'sopcast'

        pattern {
                 match $URI: '^http://sop/(?<address>.+)$'
      
                }

        action {
                 $URI = "sop://${address}"
       $DOWNLOADER = "$downloader ${$URI}"
      
               }
                            }
  profile (SLOO, after: SURI) {
        pattern {
                 
      match SURI

                }

        action {
      $URI = "http://127.0.0.1:8902/stream"
           
               }
                            }
  profile (SPLA, after: SLOO) {
        pattern {
                 
      match SLOO

                }

        action {
      
               set '-oac': 'lavc', '-of': 'lavf', '-lavfopts': 'format=dvd', '-ovc': 'lavc', '-lavcopts': 'vcodec=mpeg2video:acodec=mp2:abitrate=128', '-ofps': '24', '-cache': '16384', '-vf': 'harddup'


               }
                            }

       }
Attachments
pmsencoder.zip
(1.59 KiB) Downloaded 57 times
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 9:37 am

Nice work on figuring out the script DSL. :-) (I really need to finish the documentation.)

If you define a downloader command ($DOWNLOADER) and don't explicitly set a transcoder command ($TRANSCODER), the default transcoder (MEncoder) is used with the default transcoder args ($DEFAULT_TRANSCODER_ARGS) + any changes made via the Profile.set, Profile.remove, Profile.replace &c. methods, and the transcoder reads from $DOWNLOADER_OUT. In PMSEncoder 1.2.3, there's no way of overriding $DOWNLOADER_OUT. In the next version, it will be writable so that you can set it to the $URI.

I'll also upload a tweaked version of your script (you probably need to set the full path to the sopcast binary), but I can only verify that the script runs the right commands. I can't verify that it works, as I don't use SopCast.

Note: Modifying $DOWNLOADER_OUT won't work (i.e. will break all streams that use it) on Windows.
Last edited by chocolateboy on Sun Jan 23, 2011 1:30 pm, edited 4 times in total.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 10:00 am

PMSEncoder 1.2.4 has been released.

This release adds improved support for SopCast streaming.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: Web content will not stream

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

thanks. I worked with C++ & Co just as a hobby. never touched scripting. never heard about script DSL.

I knew that was a missing link somewhere between DOWNLOADER and TRANSCODER. but I was not sure how they work each other. I would have to read the source code and figure it out, but time is limited.

sopcast path is defined in enviro vars of windows. I wanted just to check if from logical pov i'm right.

1. get the uri from web.conf
2. send the uri and change the channel in sopcast. means define $DOWNLOADER to sopcast
3. change the uri to the local loopback because of sopcast protocol
4. transcode the local loopback

After changing channel in sopcast (redifine $DOWNLOADER in SURI), it seems it can not be redefined back to original value (whatever it is). I tried to redefine it in SPLA (assign $MENCODER or other twists that seemed logical to me), but is not working. I don't know if it's a bug or that's the way that should work (ie $DOWNLOADER can be redefined only once per script)
Code: Select all
profile (SPLA, after: SLOO) {
        pattern {
                 
      match SLOO

                }

        action {
      $DOWNLOADER = $MENCODER  //not working
               set '-oac': 'lavc', '-of': 'lavf', '-lavfopts': 'format=dvd', '-ovc': 'lavc', '-lavcopts': 'vcodec=mpeg2video:acodec=mp2:abitrate=128', '-ofps': '24', '-cache': '16384', '-vf': 'harddup'


               }
                            }


PS how can one use $EXECUTABLE? I tried this one too, insteed of redefining $DOWNLOADER, but I have hard time figuring what is doing. It would be possible just to execute something?
Last edited by hans_gregor on Sun Dec 26, 2010 10:40 am, edited 1 time in total.
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

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

chocolateboy wrote:Note: Modifying $DOWNLOADER_OUT won't work (i.e. will break all streams that use it) on Windows.


I tried that too before, may be I'm wrong, but the problem could be here
Code: Select all
 if (isWindows) {
            oldStash.put('$DOWNLOADER_OUT', '-')
        } else {
            oldStash.put('$DOWNLOADER_OUT', downloaderOutputPath)
        }

.
hans_gregor
 
Posts: 11
Joined: Thu Dec 23, 2010 1:00 pm

Re: Web content will not stream

Postby chocolateboy » Sun Dec 26, 2010 10:40 am

hans_gregor wrote:never heard about script DSL.


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

sopcast path is defined in enviro vars of windows.


OK.

1. get the uri from web.conf
2. send the uri and change the channel in sopcast. means define $DOWNLOADER to sopcast
3. change the uri to the local loopback because of sopcast protocol
4. transcode the local loopback


Yes, at the moment, but it's a hack, and it doesn't work on WIndows, so I will change it. SopCast isn't a downloader; it's a standalone server. The whole idea with the downloader is that it pipes its output in some way into the transcoder. SopCast doesn't do that (it just runs in the background).

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.

PS how can one use $EXECUTABLE?


There is no $EXECUTABLE. That was removed.
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

PreviousNext

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests