Mailing List archive

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

[vdr] Re: Using cDevice::GetTSBuffer, cTSBuffer



On Fri, May 28, 2004 at 11:03:35AM +0200, Erich Bachl wrote:
> Hi,
> i'm implementing a new device and for test purposes i want read from a
> file cMyDevice::OpenDvr looks like
> 
>       if ((fd_pvr = open("videofile.mpg", O_RDONLY | O_NONBLOCK)) >= 0)
> {
>         tsBuffer = new cTSBuffer(fd_pvr, KILOBYTE(256), CardIndex() +
> 1);
> 
> How can i generate such a file?
> I had no success by using ffmpeg, tv stays dark:
>       ffmpeg -i input file -f mpegts videofile.mpg
> 
> The calls to
>       r = tsBuffer->Read();
> are reporting, that they are reading 188 bytes (TS size).
> Do I have to check if the Packets are valid? (because of the file
> header, the starting point of the ts packets does not match?) Or is
> ffmpeg not able to produce the right file format?

Don't now if ffmpeg is able to produce a Transport Stream but
if you'r reading such a TS you have to check this one, e.g. see
in remux.c at cTS2PES::ts_to_pes() ...

        Werner

-- 
AC3 loop through sound card http://bitstreamout.sourceforge.net/
Howto http://www.vdr-portal.de/board/thread.php?threadid=1958
------------------------------------------------------------------
 "Having a smoking section in a restaurant is like having
         a  peeing section in a swimming pool." -- Edward Burr




Home | Main Index | Thread Index