[libav-api] demux without FFmpeg's decoding

Ran Shalit ranshalit at gmail.com
Fri Apr 17 09:37:57 CEST 2015


I would like to ask if it is possible to read complete frame from
stream without requiring to decode each packet with
avcodec_decode_video2 function.
I use HW accelerator decoder in my case therefore I don't need FFmpeg
decoding call (avcodec_decode_video2).

In FFmpeg's example for demuxing it seems that detection of complete
frame is done only by the decoder :

while (av_read_frame(fmt_ctx, &pkt) >= 0) {
      if (pkt.stream_index == video_stream_idx) {
     /* decode video frame */
       ret = avcodec_decode_video2(video_dec_ctx, frame, got_frame, &pkt);
......<-- got_frame is indication for complete frame receive.

Thank you,

More information about the libav-api mailing list