I am trying to adapt output-example.c to work with writing raw YUV420P frames into an mp4 container, and I'm getting a /0 error in the library when making the av_interleaved_write_frame() call. I've also tried av_write_frame() to the same effect. There is no audio in this output, just video. This is a cross-platform project, and I've been testing it on Windows, Linux & Mac.
I'm using CODEC_ID_RAWVIDEO as the codec, and if I write to an AVI container everything works fine. As soon as I switch to MP4 output container the error appears. The error happens in the libavformat/utils.c function frac_add() because den = 0. My pkt.pts value in the av_interleaved_write_frame() call is =AV_NOPTS_VALUE. I've also tried pkt.pts = 0 here with no success. Other than that I'm very close to the output-example.c file. My ultimate goal is raw RGB output to the container (to match other quicktime output) so writing YUV420P was a stepping-stone in terms of minimal change to the output-example.c toward that goal but I can't seem to get it to work. This is my first foray into video, so still learning what parameters are required to be set for which formats/codecs. Any suggestion on what I'm missing? - Ray
_______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
