MediaInfo库的编译 使用
生活随笔
收集整理的這篇文章主要介紹了
MediaInfo库的编译 使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
環境:windows10 VS2015?
第一步:下載代碼并編譯
選擇最后的一個標簽。點擊下載
?
下載后解壓,選擇
libmediainfo_AllInclusive\MediaInfoLib\Project\MSVC2015\MediaInfoLib.sln
打開項目
直接生成解決方案,在
libmediainfo_AllInclusive\MediaInfoLib\Project\MSVC2015\x64\Release
目錄下生成dll和lib 我這里是64位release版本。
2、開發測試
新建任意C++控制太程序。
添加dll和lib的環境。
在
libmediainfo_AllInclusive\MediaInfoLib\Source\MediaInfoDLL\MediaInfoDLL.h?
復制頭文件到工程目錄。
添加代碼
#include "MediaInfoDLL.h" //Dynamicly-loaded library (.dll or .so) using namespace MediaInfoDLL;int main() {MediaInfo MI;String s1, s2,s3;MI.Open(L"tt.mp4");s1 = MI.Get(Stream_Video, 0, __T("Width"), Info_Text, Info_Name);MI.Close();return 0; }點擊運行測試。
視頻的所有信息
General Complete name : videoTest.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 908 KiB Duration : 10 s 0 ms Overall bit rate mode : Variable Overall bit rate : 744 kb/s Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00 Writing application : Lavf52.64.2Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Baseline@L3 Format settings, CABAC : No Format settings, ReFrames : 3 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 10 s 0 ms Bit rate : 607 kb/s Nominal bit rate : 1 024 kb/s Width : 480 pixels Height : 360 pixels Display aspect ratio : 4:3 Frame rate mode : Variable Frame rate : 24.000 FPS Minimum frame rate : 15.000 FPS Maximum frame rate : 30.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.146 Stream size : 741 KiB (82%) Writing library : x264 core 85 Ubuntu_2:0.85.1448+git1a6d32-4 Encoding settings : cabac=0 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=0 / wpredp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=1024 / ratetol=3.9 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.41 / aq=1:1.00 Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 9 s 915 ms Bit rate mode : Variable Bit rate : 132 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 spf) Compression mode : Lossy Stream size : 160 KiB (18%) Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00?
完畢
感謝雷神
https://blog.csdn.net/leixiaohua1020/article/details/11902195
和
https://blog.csdn.net/danjuan123/article/details/65444009
代碼示例請自取
https://github.com/chenyuProject/MediaInfodemo
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的MediaInfo库的编译 使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux arp防火墙关闭,解决lin
- 下一篇: 7 款最好的免费 PDF 转 Word