FFMpeg将RGB图像编码为H264 [英] FFMpeg encoding RGB images to H264
问题描述
请尝试检查手刹。具体来说,这个文件是 muxmp4.c ,这是一个jem我发现使用FFMpeg / RTP。请确保正确使用 av_interleaved_write_frame()和 extradata 字段。这些是我记得RTP的一些关键差异。
尽管如此,我在使用FFMpeg的RTP / RTSP还有一些稳定性问题(我确定它越来越好)。我有更好的运气与 live555 ,你可以看看 VLC 和 MPlayer for关于如何使用它的很好的例子。
I'm developing a DirectShow filter which has 2 input pins (1 for audio, 1 for video). I'm using libavcodec/libavformat/libavutil of FFMpeg for encoding the video to H264, audio to AAC and mux it/stream using RTP. So far I was able to encode video and audio correctly using libavcodec but now I see that FFMpeg seems to support RTP muxing too. Unfortunatelly, I can't find any example code which shows how to perform H264 encoding and RTP muxing. Does anybody know good samples?
Try checking out the code in HandBrake. Specifically, this file muxmp4.c, which was a jem I found working with FFMpeg / RTP. Be sure and use av_interleaved_write_frame() and the extradata fields correctly. Those were some key differences I remember for RTP.
Still, I had some stability issues with RTP/RTSP with FFMpeg, (I'm sure it's getting better). I had much better luck with live555, and you can look at the code in VLC and MPlayer for good examples on how to use it.
这篇关于FFMpeg将RGB图像编码为H264的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!