2

I renamed video's extension from mp4 to webm. There are no problems with the playback, but I have to be sure that mp4 is mp4. Is there a 100% way to detect mp4 video?

0

2 Answers 2

2

You can use ffprobe:

$ ffprobe -loglevel error -show_entries format=format_name,format_long_name -of default=nw=1 input.webm
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV

It will show the proper container format if you renamed a file.

0

Usually programs will inspect the metadata to see what format the video or audio streams are in. The file extension is usually just an indicator and mostly indicates the container format for this information. Changing this shouldn't have any adverse effect (other than needing to drag and drop it into the player until you associate the new extension with the program)

If you want to check this, there's a free tool called MediaInfo that you could use. This inspects all the internal metadata to show what a player would see by opening the file.

It's only older players that may have an issue playing this as they might not inspect the metadata, and might expect a certain format inside the file just based on the file extension.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .