Channel plugin (Updated 12-06-23)

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

Re: Chanel plugin

Postby SharkHunter » Thu Feb 17, 2011 10:15 am

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

Re: Chanel plugin

Postby grolschie » Thu Feb 17, 2011 11:56 am

SharkHunter wrote:grolschie - It is in fact so that the matcher is multiline. So you regexp should work. However regexps are normally greedy so constructs of .* are well dangerous. Try <h5>[^>]+<a title=\"([^\"]+)\" href=\"([^\"]+)


Marvelous. That worked well! Thanks very much! :D

Is there a way to tell the channel plugin to transcode the sound to a different format? I find that watching streaming tv via psmencoder and web.conf is fine, but getting an .flv file to play via channel plugin, I get picture but no sound on my renderer. Thanks heaps.
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby SharkHunter » Thu Feb 17, 2011 12:59 pm

grolschie - The Channel plugin is not a streaming tool. It just extracts the media links from the web and then pass them on to PMSEncoder (which in turns dumps them trough various scripts to other programs like rtmpdump,mencoder,ffmpeg etc.). If you have no sound I would suspect that there is something fishy with the stream it self. To check you can always use rtmpdump manually. If that works fine then we'll need some more logging....
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby grolschie » Thu Feb 17, 2011 7:39 pm

Thanks for that. :-)
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby Twosheds » Thu Feb 17, 2011 8:14 pm

SharkHunter wrote:Twosheds - cool :D. Pls share your result with the world (if you dare :) ).


Currently I include the matching string for the station within the 'matcher' parameter that matches the streams but this then only picks up the first stream and ignores the rest of the streams for that station. This does not improve on your(sharkhunter) original version that displays the stream type & speed but for ALL streams.

My only useful enhancement so far is to add a start & finish time to the events.

At the moment it isn't really working the way I would like and I can't see a way of getting it any better because the event web pages can contain multiple stations each with multiple streams and I want to combine identifying data for the station with that for each stream broadcast by that station. I don't think I can use a folder structure as that would mean that the same web page contains data for more than one folder and the 'matcher' parameter for a folder would need to be tailored to identify a particular station before matching the correct set of streams within the portion of the web page representing the station.

The facility I need is to be able to create a folder structure where each folder represents a section of the web page, each section starting on a matched regexp and finishing where the next match occurs, and each section of HTML then treated as a web page within the sub-folders for subsequent matching.
Twosheds
 
Posts: 37
Joined: Tue Apr 27, 2010 4:28 pm
Location: Lincolnshire, UK

Re: Chanel plugin

Postby dushashi » Thu Feb 17, 2011 9:39 pm

SharkHunter

I got SVT working. Yeay!

Here is the modified rtmp.groovy, if anyone interested. Sub parameters are not needed.

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 grolschie » Thu Feb 17, 2011 9:44 pm

SharkHunter wrote:grolschie - The Channel plugin is not a streaming tool. It just extracts the media links from the web and then pass them on to PMSEncoder (which in turns dumps them trough various scripts to other programs like rtmpdump,mencoder,ffmpeg etc.). If you have no sound I would suspect that there is something fishy with the stream it self. To check you can always use rtmpdump manually. If that works fine then we'll need some more logging....


The .flv video plays fine in VLC on my PC. It seems that the audio output format of pmsencoder+channel+flv is different than pmsencoder+web.conf+wmv/mms

EDIT: I just noticed the post above. Might something like this work for me?
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby grolschie » Fri Feb 18, 2011 7:57 am

Hi there. Is it possible to feed rtmpdump.exe other parameters from the Channel plugin? i.e --flashVer, −−swfUrl, −−pageUrl, --app, --con, etc?

Also, is there an IF, ELSE, kind of thing? i.e. a website has two types of streams (easily differentiated by two different matchers) in the same A-Z folder, but they require different Media Definitions to get the streams. Does that make sense?

Thanks. :-)
grolschie
 
Posts: 263
Joined: Thu Jun 10, 2010 7:05 am

Re: Chanel plugin

Postby SharkHunter » Fri Feb 18, 2011 8:29 am

dushashi - Great that you got it working :), can I add your RTMP version on to the github as an alternative for people who has problems?

grolschie - Now things are starting to get interesting :). There is no IF...ELSE in the respect of a true IF..ELSE construct. But if yo have two different media types on the same page it is easy to match both. Simply do:
media {
# Note this can be done for folders and items as well
# Media 1
matcher=some cool regexp
}
media {
# Media 2
matcher=other regexp
}

As long as the matcher doesn't overlap only one of them will match.
Look at the Viasat which has this construct https://github.com/SharkHunter/Channel/ ... /viasat.ch
Do you real a true IF..ELSE in the sense that you want to say "match A and only if A doesn't match then try to match B"? Or is what we have good enough?

Edit: Forgot. Yes you can pass arguments to RTMPDUMP. Currently there are two magic tokens !!!pms_ch_dash_y!!! and !!!pms_ch_dash_w!!! which are used by channels which needs to modify the playpath and the swfVfy respectivly. Take a look at https://github.com/SharkHunter/Channel/ ... els/tv4.ch or https://github.com/SharkHunter/Channel/ ... els/ard.ch
for examples how to use those magic tokens. These "tokens" are added to the URL you send along this URL ends up in the rtmp.groovy script where they are transformed into "-y" or "-W". I know chocolateboy is working of changing some things in PMSEncoder which will allow us to ditch these weird extra tokens. But for now this what you need.
Last edited by SharkHunter on Fri Feb 18, 2011 8:43 am, edited 1 time in total.
SharkHunter
 
Posts: 941
Joined: Tue Jun 01, 2010 8:39 pm

Re: Chanel plugin

Postby dushashi » Fri Feb 18, 2011 8:43 am

SharkHunter

Yes of course.
dushashi
 
Posts: 148
Joined: Sun Feb 13, 2011 11:11 pm

PreviousNext

Return to Additions and Plugins

Who is online

Users browsing this forum: No registered users and 4 guests