Given jpeg files in memory, how to transform them to mjpeg or, mp4 file?

Marianna Smidth Buschle msb at qtec.com
Tue Aug 29 07:42:51 UTC 2023


Hi,


I expect you should be able to create a MJPEG from JPEG buffers in 
memory if you write an application with an appsrc in order to feed your 
buffers in.


Simply for MJPEGs you should be able to do something like this:

|videtestsrc ! <SRC_CAPS> ! queue ! videoconvert ! jpegenc ! avimux ! 
filesink location=<LOCATION>|


Once you have that working you can change into feeding your own frames 
in with an appsrc:

|appsrc ! <SRC_CAPS> ! queue ! avimux ! filesink location=<LOCATION>|


Look into the appsrc tutorials for how to feed data into it.


I don't really know much about MP4 so I cannot help there.

But I don't expect you can get around decoding the JPEG and encoding to 
H264.


Best Regards

Marianna

On 28/08/2023 10.40, gstreamer-devel-request at lists.freedesktop.org wrote:
> Hi.
> ?
> I have jpeg files in memory (byte[] in terms of C#), how to transform them into mjpeg file?
> Can you help me with pipeline for that? Can it be done in memory, without dumping jpeg files? to disk?
> ?
> Same problem, but now I need mp4 file.?At least I can see way to transcode mjpeg into mp4, but maybe it
> ?could be done in a more straight way ??from jpegs to mp4?
> ?
> Thanks in advance.

-- 
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230829/fa11d5e2/attachment-0001.htm>


More information about the gstreamer-devel mailing list