1

I want to retrieve and Validate the Audio and Video files Codec Info, File-format and Media Format.Looking for a .Net Class Library and having a better Wrapper classes return so that I can retrieve this information from a File in C# .

Once it is returned need to create the XML related Audio/Video <source> tags based on the "codec Info"/"file-format"/"Media format" received for that file as below.

<source src="ABCGTH.mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'" />
<source src="QRSTBU.webm" type="video/webm; codecs='vp8, vorbis'" />
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Chat
  • 185
  • 1
  • 5
  • 15
  • 1
    you can use mediainfo.dll for that, since you have the ffmpeg tag, [ffprobe can be used as well](http://stackoverflow.com/a/34319972/1070452) – Ňɏssa Pøngjǣrdenlarp Jan 12 '16 at 20:43
  • - Plutonix I have used MediaInfo dll; and I am able to retrieve the codec Info for WebM Audio as "vorbis" and "VP8" for Video. But Mp4 and M4a Files could not retrieve the "avc1.42E01E" or "mp4a.40.2" as single property; Was able to retrieve only avc1 and mp4a not the remaining part. Is their a better way o retrieve the whole codec info. – Chat Jan 12 '16 at 20:51
  • 1
    [See this post](http://stackoverflow.com/q/16363167/1070452) some of the info you want like `42E01E` is data you can determine from other elements. mediaInfo returns a format profile as "Main@L3.0" - that would correspond to `4D401E`. I cant see the same info from FFPROBE, but `"codec_tag": "0x31637661"` may xlate to that – Ňɏssa Pøngjǣrdenlarp Jan 12 '16 at 21:27
  • MediaInfo result is not bijective with e.g. "avc1.42E01E", and it would be a pain to map every possibility to the right number. Please avoid this method. MediaInfo currently provides "avc1" codec identifier only, you can [open a feature request](https://sourceforge.net/p/mediainfo/feature-requests/) for asking for the exact value your are looking for (it is in the file). Jérôme, developer of MediaInfo. – Jérôme Martinez Jan 12 '16 at 21:52
  • @Plutonix Thank you for the [post](http://stackoverflow.com/questions/16363167/html5-video-tag-codecs-attribute) .Can I please know how can It be implemented; is their any .net library like MediaInfo.dll which can be used to retrieve the MP4/M4A codec information as specified in the link for getting profile info. – Chat Jan 14 '16 at 13:03

0 Answers0