Mailing List archive

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

[vdr] Re: vdr cuts recordings with ugly artifacts at cutting-points



Sergei Haller wrote:
[...]

>
>  -  Now I mark the GOP of the package p6 as "broken".
>     Thus I have the video stream until (and including) the GOP of package
>     p5. And I have all the Audio frames which correspond to the frames of
>     the GOP of p5.
>                        --- or did I miss something here? ---
>

It could be that there is a misunderstanding here of what the "broken link"
mark does: Essentially it tells the decoder to ignore all B-frames that are
(in time) before the first I-frame. So if you mark a GOP with the "broken
link" flag it is not that the GOP is suppressed as a whole, but only the
first few frames (if any - depending on the GOP structure).

The problem in the way cutting is handled in vdr right now is due to the
fact that the cut marks are essentially file positions and, apart from the
fact that they point to GOP-starts, disregarding the file structure.

A "clean" cut should be done by PTS marks....

A patch to VDR could do the following:

get the PTS of the first frame of the first GOP not to be included
("cut-PTS").
Copy over all data with PTS up to but not including the cut PTS.

get the PTS of the first frame of the GOP which is to be included after the
cut ("in-PTS")
from the in-position back up the file pointer and then start outputting data
with a PTS equal to or higher than the in-PTS.

(and of course mark the first GOP afterthe cut with the "broken link" flag).

That way only A/V inside the wanted PTS range is included.

But you will have to do some analyzing of the data and most probably
remuxing as part of the MPEG2 pack structure might have to be changed.

just my 2c

    Wiljo



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index