[FFmpeg-devel] Mjpeg to RTP without re-encoding

Moritz Barsnick barsnick at gmx.net
Mon Oct 9 14:51:51 EEST 2017

On Mon, Oct 09, 2017 at 13:18:51 +0200, Louis-Paul CORDIER wrote:
> I'm currently using ffmpeg API to send video stream through RTP. The codec used in the RTP protocol is MJPEG. Below is my workflow:

For questions regarding the use of the libav* libraries, please contact
the libav-user mailing list, as described here:

ffmpeg-devel, the list you have contacted, is strictly for the
development *of* ffmpeg and its libraries.

That said:
> The video frames I want to send are already in JPEG format, so I'm wondering if it is possible to avoid converting from JPEG to RGB, and reencoding using FFmpeg MJPEG encoder.
> To my point of view, the ideal would be creating an AvPacket by hand and fill the buffer with my camera frame JPEG directly.

ffmpeg, the command line tool, is capable of doing that without
reencoding, so it should absolutely be possible through AvPacket.

$ ffmpeg -i %02d.jpg -c copy mjpeg.mkv


More information about the ffmpeg-devel mailing list