Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6355591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:47:44+00:00 2026-05-24T22:47:44+00:00

Mencoder has a lovely option for converting a mjpeg file into an avi file

  • 0

Mencoder has a lovely option for converting a mjpeg file into an avi file with an ‘MJPG’ codec that plays in VLC.

The command line to do this is:

mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3

where 0.3 is the ratio of the desired play framerate to the default 25 fps. All this does is make a copy of the mjpeg file, put an avi header on top and at the end, what seems to be an index of the frame positions in the file.

I want to replicate this in my own code, but I can’t find documentation anywhere. What is the exact format of the index section? The header has extra filler bytes in it for some reason – whats this about?

Anyone know where I can find documentation? Both mencoder and vlc seem to have this codec built in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:47:45+00:00Added an answer on May 24, 2026 at 10:47 pm

    After much work, study and fiddling around with HxD and RiffPad, I finally figured it out. It would take a long blog entry to explain it all, but basically there isn’t really an ‘MJPG’ codec out there – mjpg just uses a few tricks and unusual parts of the avi standard to produce an indexed file.

    The key is to place ’00dc’ and an Int32 length tag 8 bytes in front of each Jpeg open tag. If you want the avi to be random access, then you need an index at the end which points to each of the ’00dc’ tag positions.

    VLC will play this natively. If you have ffmpeg installed, then Windows Media Player uses that to decode these types of mjpg files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to write Python code that gets a video file (mpg, avi,
I have 28,000 images I need to convert into a movie. I tried mencoder
My Delphi app has created a squence called frame_001.png to frame_100.png. I need that
I've been digging through the mplayer/mencoder and ffmpeg documentation and I can't seem to
I am having a problem using mencoder (SVN-r30531-4.2.1) through a python (2.6.1) subprocess. I
I have three videos: a lecture that was filmed with a video camera a
I have a group of H.264 images (I-frames only) that I want to encode
I have 16,000 jpg's from a webcan screeb grabber that I let run for
I am creating an app that needs to know the current status of dynamically
I'm developing a PHP application that uses FFMPEG-PHP to split videos and convert them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.