[Live-devel] Problem using MPEG1or2VideoStreamDiscreteFramer
Dmitri Schamschurko
schamschurko at medialan.de
Sun Sep 9 12:21:04 PDT 2012
Hello Ross,
thank you for your great work. I am new here and have a question which
I could not answer even after reading the Live555 mailing archive carefully.
Could you please help me with the following points in relation to MPEG-2
streaming from a live source.
I implemented my own MPEG-2 device source based on your device source sample
and the event trigger mechanism. I use MPEG1or2VideoStreamDiscreteFramer
as a
filter because I get the data from my source as individual frames (I-,
P- and
B-pictures). That works quite well.
But I have problems with the understanding when and how to inject Sequence
headers. My source provides I-frames which have a sequence header in
front of
each of them. When I checked the RTP stream with Wireshark I found that the
picture type of the I-picture in the RTP header (RFC2250 MPEG1) is not
correct.
The picture type field of the RTP header is always 0 (forbidden) or the
last picture
type which was transmitted. If the last transmitted picture was a
B-picture the
I-picture is identified as well as B-picture (type 3) in the RTP header. The
same holds for the temporal_reference value of the I-picture. It is the same
as that of the last B-picture which was sent. That happens if the I-picture
contains a sequence header at its start.
If I remove the sequence headers – the I-picture starts now with a picture
start marker – then everything seems to be ok – except for the very first
I-frame which starts the streaming. It must still contain the sequence
header.
Otherwise the stream cannot be replayed. With that the very first I-frame
gets the picture type 0 (forbidden) as mentioned above.
Am I doing anything wrong? Should the sequence header sent separated from
the picture? Am I to send sequence headers at all? What is the right
strategy to refresh sequence header information regularly?
Additionally the MPEG1or2VideoStreamDiscreteFramer has the parameter
vshPeriod.
I used the default of 5 and stripped all Sequence headers off from the
I-pictures except the very first one to provide that information to the
framer
at all. But when inspecting the stream I could see the sequence header just
ones (with the very first I-frame). Shouldn’t it be injected regularly
with the vshPeriod of the discrete framer.
Currently I have some jerking effects in the replay which is probably caused
by the wrong information in the RTP headers (my assumption). That’s why
I analyzed that a bit more in depth.
Best regards
Dmitri
More information about the live-devel
mailing list