weird guy
weird guy

Reputation: 187

Can ffprobe return the mime type?

I want to get the mime type (e.g. video/mp4) of a media file using ffprobe. Is that possible or do I need another program for that?

Upvotes: 3

Views: 3533

Answers (2)

weird guy
weird guy

Reputation: 187

I have just found out, while working on another project, if you do ffmpeg -h muxer=mp4, it also shows the mime type. This has made it a lot easier for me. I can run ffprobe testvid.mp4, find the file type and then use the -h muxer= method to get the mime type.

Upvotes: 4

Jeremy Meadows
Jeremy Meadows

Reputation: 2561

The file command may be able to get you what you want. It even has a --mime-type flag you can set to pull that data out specifically.

Upvotes: 7

Related Questions