>>
>> Has anybody tried output-example.c lately?
>I did, I'll try again soon. Exactly what are you doing with it?
I believe the issue with output-example.c is that it assumes certain codec
format parameters. For instance vorbis needs AV_SAMPLE_FMT_FLT instead of
S16. That's one issue right away that will make it not work with webm.
// c->sample_fmt = AV_SAMPLE_FMT_S16;
c->sample_fmt = AV_SAMPLE_FMT_FLT;
c->bit_rate = 64000;
c->sample_rate = 44100;
c->channels = 2;
That gets me past avcodec_open2, but there are still issues with writing
audio. The following returns 0 for no error, but never fills got_packet with
a true value. I'm wondering if there's an issue of returning before
incrementing the stream when got_packet is zero. If the codec ignores the
packet because of silent data, shouldn't it still increment the stream?
e = avcodec_encode_audio2(c, &pkt, frame, &got_packet);
if (!got_packet)
return;
pkt.stream_index = st->index;
>> I'm wondering if it has issues with it. The next thing I'll try is stepping
>> through avconv, but I was hoping that maybe I could use something simpler.
>Ok.
MP4 writing gives the error "non-strictly-monotonic PTS" when calling
avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
I assume these errors are related to the particulars of setting up and
formatting webm & mp4 codecs & data streams.
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api