[vlc] How does VLC determine stream time for MPEG4 streams?
Tomer Margalit
tomer.margalit at videocells.com
Thu Oct 27 13:33:31 CEST 2011
Hi John,
Thank you for you answer!
We have decided to go in a different direction and develop a new server
(that is much more standard (compliant) - it will use opensource servers
(possibly Flumotion or the GStreamer rtsp server) - so I will not pursue
this matter any further.
However if you make a tool that analyzes MPEG4 packets I would love to use
it for the development of the new system (and I'm sure other people would
like to use it too, since I didn't find any of those online), so please tell
me if there is any progress.
For packet analysis we tried dvbsnoop at first, but it seemed to only be
able to analyze MPEG 2 packets.
So then we built a small FFmpeg program to read and decode packets (for the
data) - and that worked out better (we actually used the dranger tutorial
and just dumped the meta data like the pts and others).
I'm not sure how good it is though since it won't give you a lot of MPEG 4
info - so it's certainly not good as a packet analyzer (but it was fine for
determining the pts of packets).
I used VLC for the playback and the problem is that it wasn't able to read
the stream (actually VLC receives packets, but it reports the same timestamp
for each packet). My initial idea was to find out why, but it seems I am in
well over my head with this, and it would be much easier just developing a
new video server.
Thanks,
Tomer
On Tue, Oct 25, 2011 at 8:56 PM, John Sokol <john.sokol at gmail.com> wrote:
>
> Cool company. I posted a link to it on my blog.
>
> http://videotechnology.blogspot.com/2011/10/web-based-carrier-grade-video.html
>
>
> After a seek you need to start on a GOP boundary and make sure you have an
> Iframe. Also the PTS for a/v should be too far out of place from each other.
>
> It would take some careful examination of packets which it looks like your
> starting to do.
>
> What are you using to examine packets. I just made a small tool to help me
> with with just this issue on MPEG2, so unfortunately It's not going to help
> you just yet, but want to add mpeg4 too.
>
> 1) pts cycles through the values 2-29 (in increments of 3) and repeats.
>> 2) decoded_picture_number is incremented by 1 each packet
>> 3) display_picture_number is a constant 0
>
>
> These fields sound bogus, and not correctly populated.
>
> Some mpeg decoders will not care and others will be very particular that
> these fields have legitimate values.
>
> What are you using for playback of streams?
>
> John L. Sokol
> videotechnology.com
>
>
> On Mon, Oct 24, 2011 at 7:10 AM, Tomer Margalit <
> tomer.margalit at videocells.com> wrote:
>
>> Hi,
>>
>> I'm currently working on integrating an old (highly customized) video
>> server that my company has.
>> The old player was a custom built player as well, and the player and
>> server were pretty much built one around the other.
>> Now trying to integrate it with VLC, I see a lot of problems (particularly
>> after a seek - since at that point everything seems to go out of sync).
>>
>> Sometimes (not always), after a seek the movie freezes - and when we use
>> VLCJ to play it, the time change callback shows the time is not changing
>> (but new packets are received).
>> I have checked the rtp timestamps and have tried altering them many times,
>> but nothing seems to work (actually the times in the callback are
>> unaffected) - which implies the problem lies within the mpeg packets (pts?).
>>
>> I have looked at the times of the mpeg4 packets being released from the
>> server (as an FFmpeg AVPacket) - pts, coded_picture_number,
>> display_picture_number. The things I have noticed are that:
>> 1) pts cycles through the values 2-29 (in increments of 3) and repeats.
>> 2) decoded_picture_number is incremented by 1 each packet
>> 3) display_picture_number is a constant 0
>>
>> I have two questions:
>> 1) Does anyone know what the problem could be, or why the values are
>> problematic for VLC?
>> 2) What value does VLC use to determine the movie time? pts,
>> decoded_picture_number, display_picture_number? A combination of the values?
>> Some other values?
>>
>> Thanks,
>> Tomer
>>
>> ______________________________________________________
>> vlc mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc
>>
>>
>
> ______________________________________________________
> vlc mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20111027/9f482954/attachment.html>
More information about the vlc
mailing list