[vdr] Small VDR-streamdev patch for Popcorn Hour NMT

jori.hamalainen at teliasonera.com jori.hamalainen at teliasonera.com
Tue Nov 4 15:31:21 CET 2008


>> - Added automated audio track selection to default URL (+1)

>Is it a problem for PCH to receive multiple audio tracks?

PCH itself supports multiple audio (and subtitle) tracks at least on other
formats - but I believe that with VDR it might not be working. I need
to test this more when I get back to my PCH.

http://www.hdd-player.de/syabas/showthread.php?tid=1777&page=1

I don't know if this URL recommendation is because of the initial tests made
by some guys where they received video but not audio. I think this +1 as a
default might become a problem with channels with multiple sound tracks.
Maybe there could be additional feature that do not automatically add +1
if count.apid > 1?

I made a new patch (attached at the end)
- if 1 audio channel - add +1 because it would not harm PC clients - but
enable
  pch to work
- if more audio channels - do not add - PCH users needs to select language
for
  that channel

<ol class="items">
<li value="1"><A href="C-15-3-17.ts" vod prebuf=5000000 TVID="1">YLE TV1</A>
<a href="C-15-3-17+1.ts" class="apid" vod>fra</a> <a href="C-15-3-17+2.ts"
class="apid" vod>dut</a></li>
<li value="2"><A href="C-15-3-33+1.ts" vod prebuf=5000000 TVID="2">YLE
TV2</A></li>
<li value="3"><A href="C-0-2-49+1.ts" vod prebuf=5000000
TVID="3">MTV3</A></li>

>> - Added suffix for URL (TS w/ "C-123-123-123.ts or S-12-123-123.ts", 
>> ".ps", ".vdr" for PES and ".mpeg" for ES, extern no suffix)

> I wonder why these are needed?

I think PCH uses filename based analyzing for stream type recognition. 
It was at the web forum above that URL like "/PES/*.vdr" should work.

That is what I quickly implemented to see if this was required as streaming
previously did not work. And with this patch I was able to stream channels.

I don't know if this is the problem because streamdev is returning same
MIME-
type (video/mpeg) for all video streams and PCH needs to load some
parser-modules
based on actual stream.

>> These small enhancements are inside anchor tag and they do not affect 
>> other browsers, just MSP-compatible browsers - so in theory this patch 
>> could be built-in for streamdev. But naturally my vision is to have own 
>> GUI for MSP.

> I filed a feature request in the streamdev bugtracker:
> http://www.vdr-developer.org/mantisbt/view.php?id=494

> I wouldn't want to commit it to streamdev, if it's only a temporary
solution 
> (until an MSP plugin is available). Drop me a line if you think it makes
sense 
> to commit it anyway.

MSP plug-in is very VERY far away. My interest on the MSP-plugin might
increase 
if H.264 HD would work over streamdev to PCH. Without unable to see HD - I
can
use vanilla VDR to view TV with no additional work.. :)

But with this patch the PCH and VDR universes would come closer. But not
fully integrated.
Without this patch if you are testing PCH/streamdev - you need to do static
web pages
to form URLs and TAGs needed by PCH. This patch allows to easily test with
all channels 
found on VDR channels.conf.

MSP plugin would need be like vdradmin to be fully usable. Changing vdradmin
is a big task.
XXV MSP-plugin would be other option (but I don't like it - too complicated
to setup).

Ideally MSP plugin should implement all vdradmin-am features
- epg browsing
- epg searches
- setting timers
- streaming live channels
- streaming files (currently possible only via SMB-mount)

With PCH & MSP you could have feature rich setup as a VDR front-end. Similar
to vomp 
and mediamvp - but upto full HD 1080p support without any micro judder. And
simultaneously 
have nice setup to view other HQ media on disk & network.

So I guess if you see it possible to add this into tree - please do it. But
if 
you see adding filename suffix a bad decision then don't. For my own
experiments 
I can do this patching manually. And the patch is already out there for
interested
people to find.

Now the problem is that h.264 streaming is not working. It should happen via
TS-container?
And for this probably streamdev should be modified. I cannot tell why it is
not working
as PCH does not give any clue on it. Just returns to menu.

Best regards,
Jori

New patch is here (against 0.3.4):
vdr server # diff menuHTTP.c menuHTTP.orig.c
201c201
<                       (std::string) "[<a href=\"/TS/" + self + "\"
TVID=\"RED\">TS</a>] ");
---
>                       (std::string) "[<a href=\"/TS/" + self + "\">TS</a>]
");
203c203
<                       (std::string) "[<a href=\"/PS/" + self + "\"
TVID=\"GREEN\">PS</a>] ");
---
>                       (std::string) "[<a href=\"/PS/" + self + "\">PS</a>]
");
205c205
<                       (std::string) "[<a href=\"/PES/" + self + "\"
TVID=\"YELLOW\">PES</a>] ");
---
>                       (std::string) "[<a href=\"/PES/" + self +
"\">PES</a>] ");
207c207
<                       (std::string) "[<a href=\"/ES/" + self + "\"
TVID=\"BLUE\">ES</a>] ");
---
>                       (std::string) "[<a href=\"/ES/" + self + "\">ES</a>]
");
339,341c339,341
<       std::string suffix;
<       std::string autoaudio = "";
<       int count = 0;
---
>       line += (std::string) "<li value=\"" + (const char*)
itoa(current->Number()) + "\">";
>       line += (std::string) "<a href=\"" + (std::string)
current->GetChannelID().ToString() + "\">" +
>               current->Name() + "</a>";
342a343
>       int count = 0;
345,349d345
<
<       if (count == 1) {
<               autoaudio = "+1";
<       }
<
352,369d347
<
<       switch (streamType) {
<               case stTS: suffix = (std::string) ".ts"; break;
<               case stPS: suffix = (std::string) ".ps"; break;
<               case stPES: suffix = (std::string) ".vdr"; break;
<               case stES: suffix = (std::string) ".mpeg"; break;
<               default:
<               case stExtern: suffix = (std::string) ""; break;
<       }
<
<       line += (std::string) "<li value=\"" + (const char*)
itoa(current->Number()) + "\">";
<       line += (std::string) "<A href=\"" + (std::string)
current->GetChannelID().ToString() + autoaudio + suffix  + "\" vod
prebuf=5000000";
<
<       if (current->Number() < 1000) {
<               line += " TVID=\"" + (std::string) (const char*)
itoa(current->Number()) + "\"";
<       }
<       line += (std::string) ">" + current->Name() + "</A>";
<
376c354
<                                       "+" + (const char*)itoa(index) +
suffix + "\" class=\"apid\" vod>" + current->Alang(i) + "</a>";
---
>                                       "+" + (const char*)itoa(index) + "\"
class=\"apid\">" + current->Alang(i) + "</a>";
380c358
<                                       "+" + (const char*)itoa(index) +
suffix + "\" class=\"dpid\" vod>" + current->Dlang(i) + "</a>";
---
>                                       "+" + (const char*)itoa(index) + "\"
class=\"dpid\">" + current->Dlang(i) + "</a>";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5933 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20081104/357a2815/attachment.bin 


More information about the vdr mailing list