[Libav-user] an help to write a player and avformat_find_streaminfo
giorgio9 at libero.it
giorgio9 at libero.it
Thu Nov 1 23:38:10 CET 2012
Hi all I need your help. I'm trying to develop a simple decoder to
decode and show a network video streaming. Source generates a video
stream mpeg4 that does not have visual Object Sequence Start (VOSS) and
the Visual Object Start (VOS) headers.
VOSS = 000001B0 00000000; VOS = 000001B5 00000005
because there aren't mandatory in Elementary Stream.
I write a source where the decoder with avformat_open_input read an sdp
file and after it call the function avformat_find_stream_info, that if I
don't make mistakes, tries to understand type of flux and populate
AVFormatContext. After it calls the other function in order to populate
correctly AVCodecContext and AVCodec.
The problem is that:
1) if the stream arrive when I launch the program (just immediately) I
see the video with good quality but with 3 seconds of delay. But if in
these situation I kill the source and relaunch it (and I leave alive the
program in decoding) after I can see a very good and real time
streaming, probably because the decoder has loaded well all the
parameter and can decode in real time without the delay that I have
during the first launch
2) Instead if I launch the program and after for example 10 seconds I
start the source, the video is also very slowly. It seems that it does
not see the correctly frame rate.
I don't have all these problems with a source that generates correctly
voss and vos. So I thought to following solutions but I need your help,
considering that I can work only at the decoder side.
1) To find the point where I can add manuall voss and vos into the
decoder as the should be in the stream produced by the source. If this
can be a right workaround in which library I can make this modification.
2) I thought that another solution can be that of passing all the data
to AVCodec AVCodecContext and AVFormatContext programmatically and not
using avformat_find_streaminfo. But this is possible with
Please help me because I need to have a custom decoder for that stream.
Thanks to all for the attention
More information about the Libav-user