Hi, my flashsv encoder is almost finished for patch submission. I just just need to know how to pass the frametype info to the flv muxer. I tried this code but the muxer didn't catch it anyway. int first = 1; static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) { FlashSVContext * const s = (FlashSVContext *)avctx->priv_data; AVFrame *pict = data; AVFrame * const p = &s->pic; AVFrame temp; int res, w, h; int optim_sizes[16][16]; int smallest_size; if (!s->previous_frame) s->previous_frame = av_mallocz(s->image_width*s->image_height*4); if (!s->encbuffer) s->encbuffer = av_mallocz(s->image_width*s->image_height*4); if (!s->frame.data[0]) { avctx->get_buffer(avctx, &s->frame); avctx->get_buffer(avctx, &s->prev_frame); } temp = s->frame; s->frame = s->prev_frame; s->prev_frame = temp; *p = *pict; if (first) { p->pict_type = FF_I_TYPE; p->key_frame = 1; first = 0; } else { p->pict_type = FF_P_TYPE; p->key_frame = 0; } So how should I do it ? MvH Benjamin Larsson -- new tiny signature
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4