On Thu, 3 Feb 2005, Bene Martin wrote:

I've run into a problem trying to handle Files recorded via DVB with
mythtv 0.16 with nuvexport-mpegcut:

* DVB recordings seem to be PES streams, which avidemux2 can't handle. A
seperate remultiplexing step to convert to PS stream is needed before
cutting.

I don't have a DVB card, but from what I understand it's probably not a PES, but a TS. From the libdvb dvb-mpegtools source README:


"Some information about the different stream types:

1) Elementary stream (ES):
        is the stream that contains the actual compressed
        audio and video data, like I, P, B-Frames
        etc., with respective headers and some
        other information.

2) Packetized elementary stream (PES):
        is composed of Packets containing ES data. The packets have
        headers, that specify the respective ES data, like
        0x000001E0 for the first video stream. The header also
        holds the packet length and stuff like the PTS.

3) Program Stream (PS):
        mainly contains PES packets with some
        additional packets containing some more
        information for the decoder, like the SCR,
        buffer sizes and mux rates. PSs are used by
        DVDs and distributed .vob files.

4) Transport Stream (TS):
        is composed of packets that all have the
        same size (188bytes). They all start with 0x47.
        The packets are identified by their PID.
        Some of them contain audio and video data
        in the form of PES packets which are spread
        over many packets of size 188 bytes. Other
        packets contain sections which contain various
        things like the PMT, the PAT or videotext
        data. A TS is meant for transporting data
        over networks."

The stream that comes off the air is a TS, and the DVB card probably just sends that down (although it might do PID filtering on the way). The dvb-mpegtools includes a number of utilities to encapsulate or strip off these layers... probably an invokation of 'ts2ps' from that toolkit is in your future... :)

Just as an aside, I'd like to say that this information from the dvb-mpegtools finally confirms my suspicions on why demuxing a stream into it's audio and video to remux them is a very bad idea. Those are ES (level 1 above), and the PTS (Presentation Time Stamp) isn't included until it's a PES (level 2). That's why some videos lose sync when remuxed in that way but others don't. If the PTS offset between the video and audio changes throughout the stream, demuxing to .m2v and .m2a will break sync. If the PTS offset stays constant, it'll work fine (maybe with at static offset like 'mplex -O 66ms...' or something).

-Cory


************************************************************************* * Cory Papenfuss * * Electrical Engineering candidate Ph.D. graduate student * * Virginia Polytechnic Institute and State University * *************************************************************************

_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to