Convert MJPEG to Y4M
Turn MJPEG videos into YUV4MPEG. Uncompressed YUV 4:2:0 frames at 25 frames per second in a YUV4MPEG2 file, since a raw MJPEG stream carries no timing; the file is very large.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop MJPEG files on the dialor turn it to pick what to do
Raw frames from a webcam stream.Uncompressed video at 25 frames per second, in a Y4M file.
What you get
One Y4M file holding uncompressed YUV 4:2:0 frames in a YUV4MPEG2 container. Y4M is a raw frame format with a small header, and codec testing uses it to exchange video.
A raw MJPEG stream carries no timing, so the file is written at 25 frames per second. Set Frame rate (fps) to use a different rate.
Size of the file
The Y4M file is very large, because the frames are not compressed. Set Max width (px) or Max height (px) to shrink frames that are larger than the value. Frames that are smaller stay as they are, and the shape is kept.
Set Frame rate (fps) lower for fewer frames. That makes a smaller file and choppier motion.
Other options
Set Start at (s) to cut seconds from the beginning. Set Stop at (s) to end at a second counted from the start of the original, so it must be later than Start at (s).
Set Rotate to turn the video clockwise by 90, 180 or 270 degrees. Set Speed to play faster or slower, where 2 is twice as fast and 0.5 is half as fast.
When it stops
If the file cannot be parsed, the conversion stops with
input_corrupted. To go the other way, use Y4M to MJPEG.
MJPEG and Y4M.What each format is, and the options this conversion takes.
- 01 · max_height
Max height (px)
Shrinks anything taller than this, keeping its shape. Anything shorter stays as it is, so nothing is ever enlarged.
16 to 20000 - 02 · max_width
Max width (px)
Shrinks anything wider than this, keeping its shape. Anything narrower stays as it is, so nothing is ever enlarged.
16 to 20000 - 03 · rotate
Rotate
Turns the result clockwise by a quarter, a half or three quarters.
90 · 180 · 270 - 04 · speed
Speed
Plays faster or slower. 2 is twice as fast and 0.5 half as fast. Voices keep their pitch.
0.25 to 4 - 05 · trim_end
Stop at (s)
Stops at this second of the original. It counts from the start of the original, not from where trimming starts, so it must be later than Start at.
0 to 86400 - 06 · trim_start
Start at (s)
Cuts this many seconds from the beginning. Decimals such as 1.5 work.
0 to 86400 - 07 · video.fps
Frame rate (fps)
Frames per second. Fewer frames make a smaller file and choppier motion. 24 to 30 looks natural, and 10 to 15 is common for animated pictures.
1 to 120
The formats
Motion JPEG
A stream of JPEG frames, what many webcams and IP cameras send.
- Extensions
- .mjpeg .mjpg
- MIME type
- video
/x -motion -jpeg - Kind
- Video
YUV4MPEG
Raw uncompressed video frames with a small header, the exchange format of codec testing.
- Extensions
- .y4m
- MIME type
- video
/x -yuv4mpeg - Kind
- Video
In your code.The same MJPEG to Y4M conversion through the API, for your app or your agent.
$ cv convert clip.mjpeg clip.y4m$ cv convert clip.mjpeg clip.y4mQuestions.What people ask about MJPEG to Y4M.
The frames are stored uncompressed. A Y4M file holds raw YUV 4:2:0 frames, so it is very large.
25 frames per second, since a raw MJPEG stream carries no timing. Set Frame rate (fps) to change it.
Yes. Set Max width (px) or Max height (px) to shrink large frames, or lower Frame rate (fps) to use fewer frames. Frames are never enlarged.
Yes. Set Start at (s) and Stop at (s) to keep the part between those seconds of the original.