Sign up here and you can log into the forum!

livestreamer

The Traditional Anything Goes Section

Re: livestreamer   

Postby mad_ady » Tue Jan 06, 2015 11:44 pm

@ebo: Can you find out what format (container and codecs) your stream is in? In your case your HD HomeRun provides a compatible stream, in sorb's case he might need to transcode (on the wdtv) to get a similar stream
User avatar
mad_ady
Developer
 
Posts: 4553
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: livestreamer   

Postby ebo » Wed Jan 07, 2015 8:24 am

@mad_ady: The model of HDHomeRun I have doesn't transcode so it just passes along what it receives. For me that's an ATSC (MPEG-2) transport stream. The only modification is to remove the parts unrelated to the desired subchannel.

I have no technical knowledge of how DLNA works or doesn't. I was surprised that this worked since I'd thought the WDTV couldn't handle any video if it didn't know the length. I did notice that each time it starts to display a stream it sets an apparently random running time from a few seconds to over a minute (longer for SD than HD streams). The elapsed time counter goes up to that and stops but the show usually keeps playing. Once when it got to the running time the picture broke up, then froze and the WDTV became unresponsive, requiring a power cycle. Running 1.05.04_B/0.5.1.1 (flashed).
ebo
Donor
 
Posts: 72
Joined: Mon Dec 06, 2010 12:26 pm

Re: livestreamer   

Postby sorb » Fri Jan 09, 2015 3:05 pm

DJArty wrote:
sorb wrote: Can u share the experiment u did with youtube live streams.

I can add youtube stream support to iptvv3 but first need see its need for many peoples - not only for sorb ;)
(adding new functions into iptv make it more hard and slow - so need massive arguments to add new features)


i didnt ask u to add this to ur iptv. i simply seek help on how to do it. i m trying to help myself as well as others by developing plugins which will be available without any demo screen.
sorb
DLX'er
 
Posts: 150
Joined: Mon Nov 26, 2012 10:59 am

Re: livestreamer   

Postby DJArty » Sat Jan 10, 2015 4:29 am

1)grep youtube answer to find direct link to stream
2)make "engine" to make possibility to play m3u8 streams on WD (WD dont supported m3u8 by default).
When I make a decision to drop support WD to retire, then yes, I will share the code. But now I have an incentive (via donation) to make somethig new and new.. so whats the problem. I'm already do this job and can just add this support to iptvv3 if its really need for many peoples.
WD TV Live (1.02.21-WDLXTV-0.4.7.3);
Please Donate PayPal to email: djartyua ( a t ) gmail (d o t) com
WebMoney: WMZ114867333413; WMU219453404899; WMR161810775332
User avatar
DJArty
Developer
 
Posts: 540
Joined: Wed Jul 21, 2010 2:30 am
Location: Ukraine

Re: livestreamer   

Postby mad_ady » Sat Jan 10, 2015 6:17 am

I'm curious... what does m3u8 have to do with playback? Isn't it just a playlist (text) format? I know you use it for your plugins, but I don't know why it is needed in this case.

He probably needs to find out what upnp parameters he needs to send via dlna so that the wd would play the stream.
<offtopic> @Sorb: take a look at my IP camera plugin. It plays rtsp streams</offtopic>
User avatar
mad_ady
Developer
 
Posts: 4553
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: livestreamer   

Postby sorb » Sat Jan 10, 2015 9:44 am

mad_ady wrote:I'm curious... what does m3u8 have to do with playback? Isn't it just a playlist (text) format? I know you use it for your plugins, but I don't know why it is needed in this case.

He probably needs to find out what upnp parameters he needs to send via dlna so that the wd would play the stream.
<offtopic> @Sorb: take a look at my IP camera plugin. It plays rtsp streams</offtopic>


thanks mad_ady, will look that.
sorb
DLX'er
 
Posts: 150
Joined: Mon Nov 26, 2012 10:59 am

Re: livestreamer   

Postby sorb » Tue Jan 13, 2015 8:44 am

Anybody Help Please...
I am trying to run the rtmp /http links using the plugin written below. I am using two proxies one for http links and other for rtmp links. The http links are playing fine. But the rtmp links are working fine in vlc and in umsp-test.php but when played on wdtv i can see only loading icon.


Livetv.php
Code: Select all
<?php
function _pluginMain($prmQuery) {

  $items = _pluginCreateChannelList();
  return $items;
}

function _pluginCreateChannelList() {

  $videoItems = array (
     'Samaa Live' => 'rtmp://38.96.148.99:1935/samaalive&amp;y=samaalive&amp;W=http://hamariweb.com/mediaplayer-5.10-licensed/player.swf&amp;p=http://hamariweb.com/pakistan-tv-channels/sama_tv.aspx&amp;format=flv&amp;title=RajNews&amp;content-type=video/x-flv',
     'Ary One' => 'rtmp://109.163.232.58:1935/live/&amp;y=myStream&amp;W=http://live.seenreport.com:82/media/js/player/player-3.2.18.swf&amp;format=flv&amp;title=RajNews&amp;content-type=video/x-flv',
     'Raj' => 'rtmp://live.wmncdn.net/firstindianewslive/448c0fbc0b1318cda5333fdd256cf442.sdp&amp;format=flv&amp;title=RajNews&amp;content-type=video/x-flv',
     'Gem BollyWood' => 'rtmp://gemtv.fms.visionip.tv/live/gemtv-gemtv-gembollywood-live-25f-16x9-HD?ref=www.gemonline.tv&USER=Gem+Bollywood&amp;format=flv&amp;title=Bollywood&amp;content-type=video/x-flv',
     'Sky Sports 2' => 'rtmp://93.174.95.125:1935/edge/_definst_/&amp;y=on39ol6in4f2ewp&amp;format=flv&amp;title=SkySports2&amp;content-type=video/x-flv',

     'NDTV' => 'http://ndtv.indostan.epac.to/ndtv/indlo/live/native',
     'NDT2' => 'http://ndtv.live.cdn.bitgravity.com/ndtv/live/ndtv247live256',
);

  foreach ($videoItems as $name => $url) {
    $url_data = array('r' => $url);
    $url_data_string = http_build_query($url_data);
if (preg_match('/rtmp/',$url))
$p="http://127.0.0.1/umsp/plugins/liveTV/liveTV-proxy.php?";
else
$p="http://127.0.0.1/umsp/plugins/liveTV/http-proxy.php?";
    $retMediaItems[] = array (
      'id' => 'umsp://plugins/liveTV/liveTV?' . $url,
      'dc:title' => $name,
      'upnp:class' => 'object.item.videoitem',
      'res' => $p . urldecode($url_data_string),
'protocolInfo'   => 'http-get:*:video/x-flv:*',
    );
  }
  return $retMediaItems;
}

?>



Proxy for rtmp links
liveTV-proxy.php
Code: Select all
<?php
header('Content-type: video/x-flv');
header('Content-Disposition: attachment; filename="liveTV.flv"');
header('Accept-Ranges: bytes');
header('Connection: close');
//$cmd = "ffmpeg -y -i '$prmUrl' -vcodec copy -acodec copy -f flv pipe:1";
$cmd = "rtmpdump -r '".urldecode($_GET['r'])."' "
                        .((isset($_GET['y'])&&(''!=$_GET['y']))?" -y '".urldecode($_GET['y'])."'":'')
                        .((isset($_GET['p'])&&(''!=$_GET['p']))?" -p '".urldecode($_GET['p'])."'":'')
                        .((isset($_GET['W'])&&(''!=$_GET['W']))?" -W '".urldecode($_GET['W'])."'":'')
                        ." --live -q | ffmpeg -y -i pipe:0 -vcodec copy -acodec copy -f flv pipe:1 | cat";
passthru($cmd);
?>


Proxy for http links
htt-proxy.php
Code: Select all
<?php
if ( $_SERVER['REQUEST_METHOD'] == 'HEAD' )
{
//tvgolu
        header('HTTP/1.1 200 OK');
        header('Host: videa.hu');
        header('User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0');
        header('Connection: keep-alive');
        header('Cookie: __utma=247885952.240886776.1335387356.1335387356.1335387356.1; __utmz=247885952.1335387356.1.1.utmccn=(organic)|utmcsr=google|utmctr=|utmcmd=organic');
        header('Content-Type: video/x-flv');
        return;
}

$rawURL = $_GET['r'];

        doTheMiracle($rawURL);


function doTheMiracle($prmUrl)
{
        header('Content-type: video/x-flv');
        header('Content-Disposition: attachment; filename="wdlxtv.flv"');
        header('Cache-control: no-cache');
        header('Connection: keep-alive');
        $cmd = "ffmpeg -y -i '$prmUrl' -vcodec copy -acodec copy -f flv pipe:1";
        set_time_limit(0);
        passthru($cmd);
}


?>
sorb
DLX'er
 
Posts: 150
Joined: Mon Nov 26, 2012 10:59 am

Re: livestreamer   

Postby mad_ady » Tue Jan 13, 2015 10:57 am

I haven't tested the code, but it looks like you're remuxing rtmp to flv, right?

There are a couple of things you can try:
* restart medialogic in debug mode (see wiki umsp plugin development -> troubleshooting)
* the wdtv likes to buffer streams usually at least ~2MB before playback starts. Make sure you wait at least 2 minutes for playback to start.
* you could try to use tee to write the output of ffmpeg to a file while playing - this way you can check what/when gets transcoded.

Also there's a topic about ffmpeg transcoding in the umsp forum - might help you with finding a suitable format.

Did you try to save such a stream and play it as a file?
User avatar
mad_ady
Developer
 
Posts: 4553
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: livestreamer   

Postby sorb » Tue Jan 13, 2015 11:50 am

when i am trying to run
killall MediaLogic
MediaLogic AV MSGL_DBG
It is displaying the message as
-sh: MediaLogic: not found
sorb
DLX'er
 
Posts: 150
Joined: Mon Nov 26, 2012 10:59 am

Re: livestreamer   

Postby mad_ady » Tue Jan 13, 2015 11:05 pm

Are you working on Live/Plus or Gen3?
Code: Select all
root@Deneb:/root# which MediaLogic
/bin/MediaLogic


The instructions were tested on live. Not sure about Gen3... If you have a serial cable you can probably get the same output via serial...
User avatar
mad_ady
Developer
 
Posts: 4553
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

PreviousNext

Return to Unrelated

Who is online

Users browsing this forum: No registered users and 2 guests