On 5/9/11 3:45 PM, Vadim Gusev wrote:
Hi everyone in this list. I'm trying to write a simple video split/merge
program, that will be part of daemon.
I've looked trough api-example.c and output-example.c and written simple
program that almost works.
For now i'm just trying to re-encode input file, actual encoding works
almost fine but muxing causes problems:

1) when trying to seek output file with mplayer i get this messages: [mpeg4
@ 0x7fcd7bf12b80]warning: first frame is no keyframe
and playback is broken till next keyframe, like it happens when keyframe is
missing/broken.
But i've checked CODEC_ID_MPEG4 codec case: kayfarmes are exactly
first+n*gop_size (30 in my case)
CODEC_ID_H264 is more complex, will describe below

av_write_frame(out_ctx, &packet);

Probably using av_interleave_write_frame might help.


2) both CODEC_ID_H264 and CODEC_ID_MPEG4 give much lower bitrate, than i've
set.
Desired bitrate: 10Mbps
CODEC_ID_H264: 723kbps
CODEC_ID_MPEG4: 1142kbps

Not sure, the source params might fit within lower bitrates (e.g. frame too small or frame rate not that intense)

3) when trying CODEC_ID_H264 i get error for each frame: [libx264 @
0xf3e160] non-strictly-monotonic PTS
and additionally first 50 frames are 0-sized, plus post-encode statistics
are completely broken.
Keyframes for gop size = 30, 200 frames input are this: 49, 100, 143. Looks
strange for me.

&frame_finished isn't checked, I guess that might explain that. The decoder might not output a frame immediately when handling B frames.

I hope that helps ^^;


lu
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to