Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: VDR suggestion - record to TS?
Ralph Metzler wrote:
>
> Klaus Schmidinger writes:
> > When converting this TS into multiplexed PES (the format VDR uses to store the
> > recordings) I take care that the "first" audio packets get the id 0xC0 and the
> > "second" ones get 0xC1. That way I can filter either of them out upon replay.
> > This works fine for the 0xC0 packets, but with the 0xC1 packets video and audio
> > apparently can't be synced.
> >
> > It looks like the driver delivers the packets in a way that has the video
> > and "first" audio evenly interspersed, like
> >
> > v v v a1 v v v v a1 v v a1 v v v a1
> >
> > but the "second" audio packets come in large chunks that are often about half
> > a megabyte apart from each other, like
> >
> > v v v a1 v v v v a1 v a2 a2 a2 a2 a2 v a1 v v v a1 ... v v a2 a2 a2 a2 a2 v v v a1
> >
> > I looks as if the driver takes great care about the video and "first" audio
> > packets, but collects the "second" audio packets for a while and then delivers
> > them all at once - which is way too late.
> >
> > Is there a way to make the driver deliver the "second" audio packets as evenly
> > interspersed into the video packets as it does with the "first" ones?
>
> That's because of the buffer size used by the firmware for PES filters.
> You can change the buffer size the firmware uses by adjusting "mode" in
> StartHWFilter() in dvb.c:
>
> static int
> StartHWFilter(dvb_demux_filter_t *dvbdmxfilter)
> {
> dvb_demux_feed_t *dvbdmxfeed=dvbdmxfilter->feed;
> struct dvb_struct *dvb=
> (struct dvb_struct *) dvbdmxfeed->demux->priv;
> u16 buf[20];
> int ret, i;
> u16 handle;
> u16 mode=0x0820;
> ...
> }
>
> 0x0100 = 184 Bytes
> 0x0200 = 378 Bytes
> 0x0300 = 1KB
> 0x0400 = 2KB
> 0x0500 = 4KB
> 0x0600 = 8KB
> 0x0700 = 16KB
> 0x0800 = 32KB
>
> So, something like "mode=0x0520" should give you better results.
> You will probably never get them as evenly spread as the "first" audio
> streams packets though because the acquisition is done completely
> differently.
>
> This problem of course only arises with the card version with DSP.
> The "budget" or "Nova" cards will give you the TS packets with the
> original muxing as they come from the satellite.
I tried this and it appears to work fine with a value of 0x0320!
I can now record both audio tracks and select which one to replay
later :-) (This feature will be in the next version of VDR - I just
want to fix the "cutting bug" before releasing it).
The question now is: Ralph, would it have any unwanted side effects
if this were changed in the official dvb.c?
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index