Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I'm uploading a file to an external system that accepts only mpg or mpeg extension files. I had a mp4 file so I changed the mp4 extension to mpg and I was able to upload the file into the system. Would other using the system who have access to this uploaded mpg file be able to view my video correctly?

Why is it that I can change the extension from .mp4 to .mpg and the video still plays fine? Should it not give me an error because the extension is not correct?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The .mpg and .mpeg extensions are typically associated with MPEG-1 and MPEG-2 files. The structure of these files is different than the .mp4 format used for H.264 video, part of the MPEG-4 family of formats.

I suspect VLC and WMP can play the file because they must not be using the file extension to determine file type, they probably parse the file with all the supported parsers until one works. To prove this point, I took a .wmv movie and renamed it to .mp4. When I played it in my Windows 7 PC with WMP I got a warning window saying that the extension did not match the format, but I told it to proceed anyway and the file played just fine.

If this online service requires MPEG-1 or 2 then you should transcode your video to one of those formats before uploading. Unless the online service transcodes all uploaded videos to some standard format. In that case it does not really matter what the format of the uploaded video is, as long as the service can read it and transcode to its own favorite format.

Good luck.

share|improve this answer
    
Perfect! Thanks for the answer. –  Arpit Rai Sep 11 '12 at 10:09
add comment

I think this a good explanation from iOrgSoft:

MPEG-4 is method of defining compression of audio and visual (AV) digital data. The MP4 file format defines the storage of MPEG-4 audio, scenes and multimedia content using the ISO Base Media File Format. MPEG4 is one of the most popular variants as it found prominent use in mobile devices.

So essentially your MPG video is packaged as a MP4, but inside there is still a MPG (or MPEG) video. So both extensions work (because inside is the same format)

I dont know of any other situations where you can do this. eg If you were to change the extension to something like .WMV or .MOV you wouldnt be able to open the file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.