Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: VDR suggestion - record to TS?



Dave Chapman wrote:
> 
> On Wednesday 02 May 2001  8:26 pm, you wrote:
> > > Yesterday I tested this out on Pro-7, and successfully recorded all 3
> > > streams into the same TS file - PIDs 255 (video), 256 (mpeg audio) and
> > > 257 (ac3 audio).
> >
> > Can you please tell me exactly how you did this?
> >
> > I know how to set the video and audio PIDs in the new API, but don't
> > know how to set the AC3 PID (maybe I'm just not seeing it... ;-)
> 
> You just set up another PES filter as follows:
> 
> pesFilterParams.pid     = pid;
> pesFilterParams.input   = DMX_IN_FRONTEND;
> pesFilterParams.output  = DMX_OUT_TS_TAP;
> pesFilterParams.pesType = DMX_PES_OTHER;
> pesFilterParams.flags   = DMX_IMMEDIATE_START;
> 
> The output field tells the driver to either send the stream to the decoder
> only (DMX_OUT_DECODER), the decoder and the demux device as a single PES
> stream (DMX_OUT_TAP)  or the decoder and the dvr device as part of a
> multiplexed TS sttream (DMX_OUT_TS_TAP).
> 
> The pesType field tells the decoder what to do with the PES stream:
> 
> DMX_PES_VIDEO - this stream should be processed by the decoder as VIDEO
> DMX_PES_AUDIO - this stream should be processed by the decoder as AUDIO
> DMX_PES_TELETEXT - this stream should be processed by the decoder as TELETEXT
> DMX_PES_OTHER - this stream is something else - don't send it to the decoder
> 
> As you will see, the only way to tell the decoder not to try and process it
> is by setting the type to OTHER.

I am currently trying to set up the filters in a way that gives me a TS that
contains video, "first" audio and "second" audio. What I want is to be able to
record both sound tracks of a movie, the German one and the original one (if
it is broadcast).

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?

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