Hi!

Wolfram Gloger wrote:

> In some DVB streams, there are TS packets that belong to an mp2 audio
> stream, have payload_unit_start set but that are _not_ the start of an
> mp2 audio packet.  I noticed this when linking against ffmpeg-cvs and
> getting "Header missing skipping one byte.".

Actually, that's not a crime. There's no requirement that MPEG audio
frames are aligned inside PES packets (i.e. a frame header immediately
follows the PES header). While most stations send MPEG audio data that
way, some don't.

How often does the "skipping" message appear? Does it happen while the
file is indexed or when it is exported?

> However, also the old ffmpeg version included with dvbcut appears to
> have this "problem"; at least when the libavformat muxer is used there
> are error messages about "non-monotonous timestamp" when such packets
> are encountered.
> 
> Did anyone else ever notice this?

The "non-monotonous" message is not an indicator - the libavformat muxer
(at least the included version) uses a wrong formula to calculate the
timestamps (DTS, IIRC). You'd better not use it if you want correct
timestamps in the output file.

Updating ffmpeg might be an option. But that would probably open a new
can of worms. The library interface is a moving target, and I don't
consider the package dependable at all. If you use the latest CVS
version, you do so at your own risk (and I recommend you don't).

> I think the proper long-term solution would be to use a framer/parser
> such as the one from ffmpeg.  Below is a more minimal patch to make
> sure only full audio frames can become an "item".

That was on our wish list for the new indexer, as far as I remember.

An "item" is always a PES packet, not an audio or video frame. Since
your patch enforces an alignment that actually need not be there, you
may end up with no audio at all. We already had a similar problem with
Channel4 (UK) which transmits unaligned MPEG audio.

I'm not sure if the input file is the problem in the first place. It may
also be a bug in the version of ffmpeg you're using. Can you confirm
that the stream is malformed, or at least provide a ~20 MB snippet of
the original TS for analysis?

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to