The problem I found while implementing this approach was that using AVFMT_NOFILE meant no seeking support. I ended up using a custom URLProtocol and not specifying the AVFMT_NOFILE flag.
Mike ----- Original Message ----- From: "Stream Alerts Support" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, May 27, 2008 9:47 AM Subject: Re: [libav-user] is it possible to read a video from bytearrayinstead of a file? -------- Original Message -------- > From: Torsten Büchner <[EMAIL PROTECTED]> > Sent: Tuesday, May 27, 2008 9:39 AM > To: Libav* user questions and discussions <[email protected]> > Subject: [libav-user] is it possible to read a video from bytearray > instead of a file? > > Hi, > > i'am wondering if it is possible to open a video from bytearray > instead of a file so > when another part of my programm creates a video, i don't have to save > it on Disk. > > At the moment i am working with av_open_input_file > > torsten It is possible. You need to create an AVFormatContext and then load your data into AVFormatContext->pb->buffer. Set AVFormatContext->flags to AVFMT_NOFILE and then use av_open_input_stream() to open the feed. After that you need to initialize your codecs and manually reset and feed data into that buffer after each time you read a packet. That should get you started. Good luck! _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
