Hello,
I've been trying to use transcoding.c as a starting place for my project and I
can't seem to get it to work properly.
I have an .mp4 file that I want to transcode to .avi...all good until now.
When transcoding it fails saying that I should use the aac_adtstoasc filter.
I looked around the internet for quite some time and I added the following code
near line 367, before the ret = av_interleaved_write_frame(ofmt_ctx, &enc_pkt):
if (ifmt_ctx->streams[stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
{
AVBitStreamFilterContext* aacbsfc =
av_bitstream_filter_init("aac_adtstoasc");
av_bitstream_filter_filter(aacbsfc, ifmt_ctx->streams[stream_index]->codec,
NULL, &enc_pkt.data, &enc_pkt.size, enc_pkt.data, enc_pkt.size, 0);
av_bitstream_filter_close(aacbsfc);
}
Now it passes, generates the file but I can't open the file in anything other
than VLC. BSplayer even crashes with a seg fault. Looks like ffmpeg doesn't
write the headers properly
What am I doing wrong? (I'm using the latest version of FFMPEG)
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user