[libav-api] h.264 avcodec_decode_video2
michaelni at gmx.at
Wed Oct 12 01:24:56 CEST 2011
On Tue, Oct 11, 2011 at 11:51:06PM +0200, Stefan Lederer wrote:
> Hi Michael,
> thanks for your response!
> > for the ISO base media format you need a demuxer. See libavformat from
> > ffmpeg.org you need to use av_read_frame() and feed the result (from
> > the video
> > stream) into avcodec_decode_video2()
> Of course I need to demux the mp4 file first :-). But the demuxer works only
> on files. In my case I download a MP4 file using an own streaming client
> (for the new standard, DASH - Dynamic Adaptive Streaming) and I need to feed
> to demuxer by the downloaded pieces on the fly. How can I do this? Or do I
> have to do the demuxing by my own without libav?
the demuxers work with AVIOContexts not just files, one can create one
on top of other things (see mplayer/trunk/libmpdemux/demux_lavf.c for
an example on how to do this.)
but first try to pipe it into ffmpeg -i - ...
to make sure it works in principle with your data
> > but as said its not enough on its own. you can see ffmpeg.c, ffplay.c
> > or ffprobe.c as examples, they might be a bit complex though.
> Do you maybe have an hint for me where I can find a piece of code which fits
> to my requirements or does something similar?
piping the stuff into ffprobe - -show_packets
is maybe the simplest example that will demux from a stream
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: Digital signature
More information about the libav-api