On Mon, Mar 23, 2009 at 7:11 PM, <[email protected]> wrote:
> Thanks for the reply, I would like to be using this code to read data from
> a network stream (and hence raw mpeg4 or mpeg4-ts).
> What I need is for the code to correctly setup the format context, open
> the stream, etc...
>
> I currently have a solution which basically "cuts out" frames from the
> network stream and decodes them as they arrive (without using
> AVFormatContext or any open_input_file or open_input_stream open
> commands), for this solution I need to manually input all the required
> information to an AVCodecContext and AVCodec before I can call the
> decode_frame function.
>
> Obviously this is a pain and I would much rather use libav* the correct
> way, as I have been trying to do with the code I posted.
>
> Do you think if I posted a .bin file containing the video-stream data you
> would be able to see if the code I posted works well for you, or perhaps
> if you could share the file/data that you used to test the code?
>
> Thanks again,
> Mark.
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
The first thing you have to do is check that AVFormat is recognizing a
transport stream.
printf("format %s\n", pAVInputFormat->name);
Make sure the stream starts with byte 0x47 otherwise the probe
function is likely to fail.
I did not do any mayor modifications to your code to get it to work,
with transport streams. Post you bin file somewhere, so I can take a
look. Make sure it can be played by vlc, ffplay or mplayer. I will
take a look.
-- Jose
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user