[FFmpeg-devel] Mjpeg to RTP without re-encoding
Louis-Paul CORDIER
lp.cordier at dynamixyz.com
Mon Oct 9 14:18:51 EEST 2017
Hi everybody,
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:
+----------------------+ +--------------+ +----------------------+ +----------------------+
| Camera Frame (JPEG) +-->+ JPEG to RGB +-->+ RGB to MJPEG encoder +-->+ RTP Format container |
+----------------------+ +--------------+ +----------------------+ +----------------------+
Actually I'm instantiating an MJPEG encoder that encodes the frame into a packet, then provide this packet to the "format container" for transmitting though the network.
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.
+----------------------+ +--------------------+ +----------------------+
| Camera Frame (MJPEG) +-->+ Writing to Packet +-->+ RTP Format container |
+----------------------+ +--------------------+ +----------------------+
Any clues?
Thanks!
More information about the ffmpeg-devel
mailing list