Dirk Meyer wrote:
Hi,

Hi Dischi,

yesterday I played with three tv players supporting dvb to find the
right one for Freevo. All players have problems I want to have
removed. So here a list of what I found out:

1. mplayer
   + good output (many vo modules)
   + support to add infos on the screen with bmovl
   - no channel switching during runtime
   - no live pause
   - no seek back while watching

Thomas Schueppel made a patch for mplayer that let you to live pause. We could update it and work on that.


2. xine
   + also a wide range of output
   - bad channel switching during runtime
   - no live pause
   - no seek back while watching

Actually the input_pvr plugin in xine-lib does live pause and timeshifting. More on that later...



3. vdr
   + good channel switching during runtime
   + live pause
   - hard to control from inside Freevo
   - no seek back while watching
   - doesn't work with our recordserver

I am working on a streamdev-client plugin for Freevo to talk to streamdev-server of VDR. Even without this I can watch TV from VDR through Freevo using mplayer and a URL for each channel. The only problem here is slow channel switching because mplayer wants to buffer the new stream. I am hoping to work around this with a VTP (Video Transfer Protocol) streamdev-client in Freevo (as oposed to HTTP).


So we have too many '-' in all players and no one can seek backwards.
One idea would be to hack some support of the missing features in the
player. I looked at the code and adding live pause to xine shouldn't
be too hard. Adding anything to mplayer doesn't look easy. And vdr
isn't written to be controlled by Freevo at all.

Ok, about xine. One of my beefs about xine is how input_pvr is implimented. Using a ivtv or wintv pvr-2/350 card you can timeshift live tv in xine with a pretty OSD and it works. The problem here is they put this timeshifting layer right in the pvr plugin insted of having it as a seperate plugin available for ALL incomming streams. It would be wonderful to timeshift any stream comming from stdin, a fifo, a url, etc.


Some people wrote that they use tzap in combination with ts2pes to do
the recording. These tools are very small and maybe we can reuse the
source to build some tv app on our own. That isn't too hard if we use
mplayer or xine to do the real work.

My design:

o We merge tzap (and it's brothers szap and czap) with ts2pes. The
  result should be an application that get's a channel, converts the
  ts into pes and put it into a fifo.

o We use mplayer to read from that fifo. By that, we have complete
  control over the ts and don't have to care about displaying.

I like this design of having at least two layers, one to gather the input and feed it somewhere, another to pick it up and timeshift it.


o The new app (let's call it tzap2pes for now) starts mplayer in slave
mode and has slave mode on it's own. Now the new app can control
mplayer and can be controlled itself by Freevo.


o Now the fun part:
  - if we press PAUSE, tzap2pes starts dumping the steam to a file and
    also pauses mplayer.
  - on resume, tzap2pes still dumps the stream to a file, but also
    sends the recorded stream to mplayer
  - on channel change, tzap2pes switches the channel and mplayer
    doesn't even have to know

o The advanced setup:
  If we have an application like the one above, we have fast channel
  switching, complete control and live pause. To make an even better
  app, we could add the following stuff:
  - On PAUSE, don't pause mplayer, just send a still image to the fifo.
  - Always save the stream and on seeking, send the needed stuff into
    the fifo for mplayer. Maybe we have to rewrite some timestamps for
    that.
  - Scan the ts while getting it for more information like EPG
  - Support recording streams
  - Do not use one file for live pause, use a set of files. E.g. start
    writing to dump0001 and when this file is 50 MB, move on the
    dump0002. When dump0003 is the one tzap2pes sends to mplayer, we
    could remove dump0001.

This is where I disagree slightly. I think the player side should handle all aspects of timeshifting. Perhaps we use a ringbuffer and the stream collecting portion (tzap, mplayer -dumpstream, mp1e, cat /dev/video |, whtever) just sits there dumping its input to a pipe or fifo. The player (or 3rd layer for buffer) collects the data and puts it into the buffer, expiring old data as the buffer fills, It knows the start/end/reading positions of the buffer. The player layer reads from the buffer and knows about the different positions so it doesn't go past either end and knows its own pause position, etc.


Having these layers means timeshifting support in Freevo is not tied to only one type of television and can be used with multiple streams from DVB, pvr-250, URLs, mp1e or ffmpeg for analoge tv. I think this is where xine went wrong. I mentioned that Thomas made a patch for mplayer to to this wort of thing but we could also "fix" xines behaviour here. Xine also has some cool features like saving what you just watched (as long as its still in your buffer).

I want to spend most of my free hacking time on Freevo. So I need some
people (maybe two) to do this. The people need to have some C
programming skills and should not be afraid of stupid protocols like
ts. As doc I have a pdf about TS and PES and we should use the sources
of tzap and ts2pes. For cool stuff like EPG and teletext, we could
read some vdr source.

I will be writing a streamdev-client for Freevo before I do much else here. My C isn't too hot and I much prefer C++ where I can do ok. I can help design and test. I've also written some more notes about timeshifting which are at home.


I am at work and there's a very busy day ahead of me (2 weeks vacation next week!!) but I can elaborate on some of these things later today or tomorrow.

-Rob



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to