總網頁瀏覽量

咕狗大神

2012年4月19日 星期四

qt 4.8.1 播放 mp4

以下是我一個很佩服的高手 leo 的步驟, po 出來跟大家分享:

1. Download "qt-everywhere-opensource-src-4.8.1.zip" from official website.
2. Unzip it and then enter the installation location, e.g. C:\Qt\4.8.1
3. Type "configure -opensource -debug-and-release", "nmake"

PS. What if there's a error happened in this file, "DefaultLocalizationStrategy.cpp",
   just go to the error line (line 327) and fix it by modifying the capital character error from " to \".
   (This error will just happen in a XP system.)

4. Add this value inside the user variable of environment variables, QTDIR, which its value is "C:\Qt\4.8.1",
  and then append this value into system variable, Path, value is "C:\Qt\4.8.1\bin".
5. Download "qt-mobility-opensource-src-1.2.0.zip" from official website.
6. Unzip it and then enter the installation location, e.g. C:\QtMobility\qt-mobility-opensource-src-1.2.0
7. Type "configure -prefix C:\QtMobility -modules sensors" and then "nmake", "nmake install"
8. Type "configure -prefix C:\QtMobility -modules multimedia" and then "nmake", "nmake install"
9. Copy the files "QtMultimediaKit1.dll" and "QtSensors1.dll" just were made by step 7 & 8,
  into this location "C:\Qt\4.8.1\qt-everywhere-opensource-src-4.8.1\demos\browser\release".
10. run browser.exe and throw a html file containing <video> tag of html5 to it. It should play it successfully,
   by the way, you should be able to see a play/pause button, the seeking bar and audio volume control button, that is
   because your qtwebkit can recognize the video tag finanlly.
11. What if it can't be played, maybe your pc hasn't been installed the correct codec well,
   check your pc whether your pc has been installed the correct codec or not, maybe you can
   go the website "http://www.free-codecs.com/" to download a suitable codec for directshow to play.

沒有留言:

張貼留言