Channel plugin (Updated 12-06-23)

Discuss third party additions, plugins and translations for PS3 Media Server

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 9:48 am

No it is not the url_separator that messes up. It is the rtmp.groovy that handles this incorrect. Modify your rtmp.groovy to simply remove the !!!pms_ch_dash_w!!! (or remove it from tv4.ch I'll check later but I think I needed that).
The url that is fed to rtmp.groovy looks like rtmp://xxxxxxxx!!!pms_ch_dash_y!!!yyyyy ... 4video.swf this is (on windows) broken up into "rtmp://xxxxxx" -y "yyyyyy" -W "http://cdn01.tv4.se/polopoly_fs/1.1615597.1280745068!approot/tv4video.swf" Your script breaks this correctly but it has some troubles with "
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby dushashi » Fri Feb 18, 2011 10:04 am

SharkHunter
You are correct. Works PERFECT!!!

Code: Select all
script {
    def RTMPDUMP = 'rtmpdump'
    def MENCODER = 'mencoder'

    profile ('RTMP(E)') {
        pattern {
            protocol ([ 'rtmp', 'rtmpe' ])
        }

        action {
            def strings = $URI.split('!!!pms_ch_dash_y!!!')
            if (strings.length > 1)
                $URI = strings[0] + ' -y ' + strings[1]
            def strings1 = $URI.split('!!!pms_ch_dash_w!!!')
            if (strings1.length > 1)
                $URI = strings1[0] + ' -W ' + strings1[1]
            $DOWNLOADER = "$RTMPDUMP -o $DOWNLOADER_OUT -r ${$URI}"
            $TRANSCODER = "$MENCODER -ss 0 -quiet  $DOWNLOADER_OUT -quiet -quiet -oac lavc -of mpeg -quiet -quiet -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 2 -lavdopts debug=0:threads=1 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=256:threads=1:keyint=1:vqscale=1:vqmin=1:vrc_maxrate=50000:vrc_buf_size=1835 -spuaa 3 -subfont /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf -subfont-text-scale 3 -subfont-outline 1 -subfont-blur 1 -subpos 98 -quiet -quiet -subdelay 20000 -quiet -quiet -ofps 25 -quiet -quiet -mc 0.1 -af lavcresample=48000 -srate 48000 -o $TRANSCODER_OUT"
        }
    }
}
dushashi
 
Posts: 148
Joined: Sun Feb 13, 2011 11:11 pm

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 10:08 am

Perfect :) You'll actually need that !!!....!!! stuff if you'll gonna watch some stuff via NaviX. Many sites needs both playpath (=-y) and sfwplayer(=-W). Please try some streams via NaviX and see if you have any troubles.
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 3:18 pm

Hi, New version.(=0.40) with save support!

You might ask why do I need that? But then again why not? Save your favourite TV show before it is removed from the net.

Easiest found here https://github.com/downloads/SharkHunte ... ug_040.jar
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby grolschie » Fri Feb 18, 2011 7:30 pm

grolschie wrote:Thanks. I mean if there is another string I need to search for within an smil file that is needed to make up a url for a parameter, can I do this? e.g. I need to make up "http://www.example.com/directory/XXXXXX" for the -p parameter, and I need to obtain XXXXXX from with the same file as I find the media url.



What need is something like this:

media {
# Media 1
matcher=aaaa(regexp1)aaaa
order=url
matcher=bbbb(regexp2)bbbb
prop=append_url=-p \"http://www.example.com/directory/(result from regexp2)\"
}

media {
# Media 2
matcher=yyyyy
}

Can this kind of thing work?
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 7:39 pm

grolschie - What happens with regexp1? I assume you want to do something like
folder {
# Some page which gives you more info
matcher=aaaa(re1)aaaa
type=empty
media {
matcher=xxxxx
prop=prepend_url=-p \"http://www.example.com/directory/,append_url=\"
}

Or ?
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby grolschie » Fri Feb 18, 2011 7:47 pm

regexp1 is a search for the media stream (.flv) url in the smil file.

regexp2 is a search for another string in the same smil file as the url, but is used to make up a parameter for rtmpdump.exe.

Also I need to reuse the result of regexp1 (the .flv file url) as part of the -y parameter also.

Can I run multiple regexps on the same file and use the results to populate append_url?
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 7:52 pm

Hmm, I don't think I done it that way. But maybe we should add that. Add an issue (https://github.com/SharkHunter/Channel/issues) where you describe more ni detail what you would like (and perhaps which pages you are trying to run on).
I have an idea to add NIPL like support to the channel "languages" (or at least some NIPL lite).
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby grolschie » Fri Feb 18, 2011 7:56 pm

How would I modify the following to search in the same smil file for strings to feed to rtmpdump.exe in addition the the url that I have already found please?

Code: Select all

# Create folders for each show.
folder {
  matcher=aaaa(regexp1)aaaa(regexp2)aaaa
  order=name,url
  url=http://example.com

  # Fetch the smil file.
  item {
    matcher=bbbb(regexp3)bbbb
    order=url
    url=http://example.com
    prop=auto_media

    # Find the stream in smil file.
    media {
      matcher=src=\"(rtmp.//example.com/[^\>].flv)
      order=url
    }      
  }
}
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 9:05 pm

So if I got it right.
You have http://example.com/regexp2 wich is the smil file.
Then in there you match (regexp3). If http://example.com/regexp3 isn't an url your sort of lost. Would yo like to add (for example) regexp2 to the (rtmp...) match in the last media there? Then I would say not possible.
Unfortunately I didn't add support for multi search in the same "page". That should perhaps be added.
Send me a PM with the page and then I could maybe add some new constructs to the .ch parser.

If anyone has requests pls add an issue on GitHub (easier for me to keep track of them). Also take a look on NaviX (http://navix.turner3d.net/) maybe your channel can be found there, and Channels has support for NaviX processors and playlists.
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

PreviousNext

Return to Additions and Plugins

Who is online

Users browsing this forum: No registered users and 7 guests